Вы находитесь на странице: 1из 2

DATABASE AND CLIENT/SERVER APPLICATIONS

ASSESSMENT 03 SQL
NAME: JAIME SALATHIEL PEJAY BAUTISTA INSTRUCTIONS 1. Use the word processor on the computer to fill in this assessment. 2. Start by inserting your name in the space above. 3. After reviewing these questions, save this file with your answers to your computer using the required file name format: <YourStudentID> Assessment03.doc where <YourStudentID> is your StudentID and there is a blank between it and the Assessment03. When you are finished with the assessment, save the document again and then upload it to the LMS. 4. Click the Choose File button. 5. Locate the file for attachment. 6. Once the file is attached, click Upload File. ASSESSMENT QUESTIONS Mark as True or False. Worth 5 points each. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. True or False True or False True or False True or False True or False True or false True or false True or False True or False True or False True or False True or False The theoretical basis of the relational data model is set theory and first-order predicate logic. Attributes must have unique domains. It is possible for several attributes to have the same domain Tuples in a relation are ordered. NULL values may mean value unknown, value exists but is not available, attribute does not apply to this tuple (value undefined). All tuples in a relation must be distinct. A key uniquely identifies a tuple in a relation. A relation schema may only have one key. Attributes that represent the same real-world concept must have identical names in different relations. Semantic integrity constraints may be enforced using mechanisms called triggers and assertions. The INSERT operation can violate domain constraints, key constraints, entity integrity, or referential integrity. When the INSERT operation violates a constraint, the default option is to reject the insertion. The DELETE operation can violate referential integrity.

13. 14. 15.

True or False True or False True or False

When the DELETE operation violates a constraint, the deletion must be rejected. SQL is both a data definition language (DDL) and a data manipulation language (DML). If a multi-table query refers to two or more attributes with the same name, we must qualify the attribute name with the table name, e.g., TABLE.Attribute, to prevent ambiguity.

SQL Writing. Worth 12.5 points each. Using Figure 4.6 from Fundamentals for Database Systems, write the SQL queries requested for the Library database described in the schema. 16. Write the SQL to list the name and phone number of each publisher. Order the publisher names alphabetically. SELECT Name, Phone FROM Publisher ORDER BY Name; 17. Write the SQL to list the book titles published by Basic Books. SELECT Title FROM Book INNER JOIN Publisher ON Publisher.Name=Book.Publisher_name WHERE Publisher.Name=Basic Books;

Вам также может понравиться