



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Define data definition language. - correct answer - Includes commands to create database objects such as tables, indexes, and view, as well as commands to define access rights to those database objects. It changes stored data but not the data objects. The commands include things like: CREATE TABLE, NOT NULL, UNIQUE, etc. Data manipulation language. - correct answer - Data manipulation language: Includes commands to insert, update, delete, and retrieve data within the database tables. It refers to a language that describes the database structures. The commands include things like: GROUP BY, DESCRIBE, DELETE, WHERE, etc. Before you can create a new RDBMS, you must complete two tasks: - correct answer
How do you restore table contents and delete table rows? - correct answer
FROM tablelist [WHERE conditionlist ] [ORDER BY columnlist [ASC | DESC] ]; Define what a cascading order sequence is. - correct answer
Define GROUP BY clause. - correct answer - Generally used when you have attribute columns combined with aggregate functions in the SELECT statement. Valid only when used in conjunction with one of the SQL aggregate functions, such as COUNT, MIN, MAX, AVG, and SM. Define HAVING clause. - correct answer - Operates like the WHERE clause in the SELECT statement, however, the WHERE clause applies to columns and expressions for individual rows, while the HAVING clause is applied to the output of a GROUP BY operation. Example: SELECT V_CODE, SUM(P_QOH * P_PRICE) AS TOTCOST FROM PRODUCT GROUP BY V_CODE HAVING (SUM(P_QOH * P_PRICE) > 500) ORDER BY SUM(P_QOH * P_PRICE) DESC; How do you join database tables? - correct answer - You must simply list the tables in the FROM clause of the SELECT statement. The DBMS will create the Cartesian product of every table in the FROM clause. However, to get the correct result-that is, a natural join-you must select only the rows in which the common attribute values match. To do this, use the WHERE clause to indicate the common attributes used to link the tables; this WHERE clause is sometimes referred to as the join condition. Explain the difference between an ORDER BY clause and a GROUP BY clause. - correct answer An ORDER BY clause has no impact on which rows are returned by the query, it simply sorts those rows into the specified order. A GROUP BY clause does impact the rows that are returned by the query. A GROUP BY clause gathers rows into collections that can be acted on by aggregate functions. What is the difference between the COUNT aggregate function and the SUM aggregate function? - correct answer COUNT returns the number of values without regard to what the values are. SUM adds the values together and can only be applied to numeric values. What is a recursive join? - correct answer A recursive join is a join in which a table is joined to itself.