WHERE
58. Write the SQL query to "Find the commission percentage and year of hire of salesperson 186":: SELECT
COMMPERCT, YEARHIRE
FROM SALESPERSON WHERE
SPNUM=186;
59. Write the SQL query to "Retrieve the entire record for salesperson 186":: SELECT
FROM SALESPERSON WHERE
SPNUM=186;
60. Write the SQL query to "List the salesperson numbers and salesperson names of those salespersons who
have a commission percentage of 10.":: SELECT SPNUM, SPNAME FROM SALESPERSON WHERE COMMPERCT=10;
61. Write the SQL query to "List the salesperson numbers, salesperson names, and commission percentages
of the salespersons whose commission percent- age is less than 12.":: SELECT SPNUM, SPNAME, COMMPERCT FROM SALESPERSON WHERE COMMPERCT<12;
62. Write the SQL query to "List the customer numbers and headquarters cities of all customers that have a
customer number of at least 1700":: SELECT CUSTNUM, HQCITY
8 / 15
FROM CUSTOMER
WHERE CUSTNUM>=1700;
63. Write the SQL query to "List the customer numbers, customer names, and headquarters cities of the
customers that are headquartered in New York and that have a customer number higher than 1500":: SELECT CUSTNUM, CUSTNAME, HQCITY FROM CUSTOMER WHERE HQCITY='New York' AND CUSTNUM>1500;
64. Write the SQL query to "List the customer numbers, customer names, and headquarters cities of the
customers that are headquartered in New York OR that have customer numbers higher than 1500":: SELECT CUSTNUM, CUSTNAME, HQCITY FROM CUSTOMER WHERE HQCITY='New York' OR CUSTNUM>1500;
65. Write the SQL query to "List the customers, customer names, and headquar- ters cities of the customers
that are headquartered in New York or that satisfy the two conditions of having a customer number higher than 1500 and being headquartered in Atlanta":: SELECT CUSTNUM, CUSTNAME, HQCITY FROM CUSTOMER WHERE HQCITY='New York' OR (CUSTNUM> AND HQCITY='Atlanta');
66. Write the SQL query to "List the customer records for those customers whose names begin with the letter 'A'
":: SELECT *
10 / 15
71. Write the SQL query to "List the NAMES of the products of which salesperson Adams has sold more
than 2000 units":: SELECT PRODNAME FROM SALESPERSON, PRODUCT, SALES WHERE SALESPERSON.SPNUM=SALES.SPNUM AND SALES.PRODNUM=PRODUCT.PRODNUM AND SPNAME='Adams' AND QUANTITY>2000;
72. CREATE TABLE command: The command that creates base tables and tells the system what attributes will be in them.
73. CREATE VIEW command: Specifies the base tables on which the view is to be based and the attributes and rows of the table that are to be included
in the view.
74. DELETE command: Specify which row(s) of a table are to be deleted based on data values within those rows.
75. DROP TABLE command: Discards an entire table from a database.
76. DROP VIEW command: Discards views.
77. Normalization: The process of organizing the fields and tables of a relational database to minimize redun- dancy (duplication) and dependency.
78. Second Normal Form: All non-key attributes must be functionally dependent on the entire key of that table.
79. Third Normal Form: Non-key attributes are not allowed to define other non-key attributes.
80. What are three important points about Third Normal Form?: 1. It is completely free of redundancy
2. All foreign keys appear where needed to logically tie together related tables.
3. It is the same structure that would have been derived from a properly drawn entity-relationship diagram of the same business environment.
11 / 15
81. Write the SQL query to "Add a new salesperson into the SALESPERSON table whose salesperson number
is 489, name is Quinlan, commission percentage is 15, year of hire is 2011, and department number is 59.":: INSERT INTO SALESPERSON VALUES ('489','Quinlan',15,'2011','59'); *Hint, this is DML, so remember that INSERT is one of the keywords for DML.
82. Write the SQL query to "Delete the row for salesperson 186 from the SALES- PERSON table.":: DELETE
FROM SALESPERSON
WHERE SPNUM = '186';
83. What is the correct syntax of the INSERT command?: INSERT INTO table_name VALUES (value1,value2,value3,...):
84. What is the correct syntax of the CREATE VIEW command?: CREATE VIEW view_name AS
SELECT column_name(s) FROM table_name WHERE condition
85. What is called a decomposition process?: Data normalization
86. In which of the normal forms should every non-key attribute be fully func- tionally dependent on the
entire key of a table?: Second form
87. What is the correct syntax of the CREATE TABLE command?: CREATE TABLE table_name (
column_name data_type(size), );
88. What is the correct syntax of the UPDATE command?: UPDATE table_name SET
column1=value1,column2=value2,... WHERE some_column=some_value;
13 / 15
- Used for analysis and not transactional processing.
- Data is nonvolatile.
- Target location for integrating data from multiple sources.
97. What is the general theme of the ETL process?: 1. Get the data
2. Map the data to staging area
3. Validate and clean the data
4. Apply necessary transformations
5. Map data to loading model
6. Move data to repository
7. Load data to warehouse
98. What is the key factor based on the need for linear scalability?: Performance
99. What is used for populating summaries or any cube dimensions that can be performed at the staging area
(ETL)?: Aggregation
100. What data mining activity is a process of assigning some continuously valued numeric value to an
object?: Estimation
101. What includes exploiting the discovery of table and foreign keys for repre- senting linkage between
different tables?: Integration
102. What data mining activity is the process of organizing data into predefined classes?: Classification
14 / 15
103. Which activity groups data members that have similarities?: Clustering
104. Data Warehouse: A data warehouse is the primary source of information that feeds the analytical processing within an organization.
105. Data Mart: A data mart is a subject-oriented data repository, similar in structure to the enterprise data warehouse, but it's main purpose is to serve
directed reporting and drill down into specific data.
106. OLAP: OLAP (Online Analytical Processing) is both a process of viewing comparative metrics via a multidimen- sional analysis of data and the
infrastructure to support that process.
107. OTAP: OTAP (online transaction processing) provides a means for presenting data sourced from a data ware- house or a data mart in a way that allows the
data consumer to view comparative metrics across multiple dimensions.
108. Cartesian product: Usually the result of a missing join condition or a method of expanding the data of 1 table by the number of rows in the second
table.
109. Data volatility: Describes how often stored data is updated.
110. DCL: Data control language is used to control access to data stored in a database.
111. Definer: Definer is a MySQL term where AuthID is the same for another DBMS
112. Domain of values: The shared values between a primary key and foreign key.
113. Extraction essentially boils down to two questions:: 1. What data should be extracted?
- How should that data be extracted?
114. Inner join: Shows row that have matches in both tables
115. Logical view: Logical view is a mapping onto a physical table or tables that allows an end user to access only a specified portion of data.
116. Outer join: Shows rows in one table that have no match in the other table. Two kinds of outer joins are left and right joins.
117. Referential Integrity: Referential integrity is a database concept that ensures that relationships between tables remain consistent.