Chapter 6 Review Questions

Ace your homework & exams now with Quizwiz!

Describe the four clauses in the syntax of a simple SQL retrieval query. Show what type of constructs can be specified in each of the clauses. Which are required and which are optional?

- SELECT FROM WHERE ORDERED BY ( <attribute list> <table list> <condition> <attribute list>) SELECT D.Dname, E.Lname FROM DEPARTMENT WHERE D.Dnumber = E.Dno ORDERED BY D.Dname,E.Lname - SELECT and FROM are the only two that are mandatory.

How does SQL allow implementation of the entity integrity and referential integrity constraints described in Chapter 3? What about referential triggered actions?

- SQL allows implementation of the entity integrity by using the PRIMARY KEY and UNIQUE clause. Referential integrity is maintained by using the FOREIGN KEY clause. - Referential triggered actions can be specified by the designer, by using the SET NULL, CASCADE, and SET DEFAULT clauses. The default action is to reject an update or delete operation.

List the data types that are allowed for SQL attributes

Numeric (INT, FLOAT) , Character-String (Char(n), VARCHAR(n)), Bit-String (BIT(n), BIT VARYING(n)), Boolean ( TRUE, FALSE, UNKNOWN), DATE (YYYY-MM-DD, TIME[HH:MM:SS])


Related study sets

Cell Bio - DNA Structure & Replication

View Set

Maternity and Newborn Medications Qestions

View Set

Home-working tips - Lingua House

View Set