* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download 1) Write SQL Statements to create the following tables:
Survey
Document related concepts
Microsoft Access wikipedia , lookup
Serializability wikipedia , lookup
Oracle Database wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Functional Database Model wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Ingres (database) wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Concurrency control wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Versant Object Database wikipedia , lookup
Clusterpoint wikipedia , lookup
Relational algebra wikipedia , lookup
ContactPoint wikipedia , lookup
Transcript
King Saud university Community College Of Riyadh Computer Science Department Section: Number: Name: Comp 203 Final Exam 28-29 1) Write your answers to the following questions in this table: Question 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Answer A B C B C B A C A B C A A C C B D A B C 1. A database is an organized collection of _____ related data. A) logically B) physically C) not D) badly 2. Each column in a table represent a(n) _____ of an entity. A) description B) attribute C) byte D) logical element 3. A user view is: A) what a user sees when he or she looks out the window. B) a table or set of tables. C) a logical description of some portion of the database. D) a procedure stored on the server. 4. A rule that canNOT be violated by database users is called a: A) password. B) constraint. C) program. D) view. 5. Which of the following is software that is used to create, maintain, and provide controlled access to databases? A) Network operating system B) User view C) Database management system D) Attribute 6. Organizing the database in computer disk storage is done in the _____ phase. A) logical design B) physical design C) analysis D) implementation 7. _____ concentrate on determining the requirements for the database component of an information system. A) Database analysts B) Systems analysts C) Programmers D) All of the above 8. The definition of the database that provides all the specifications to the specific database management system is contained in a(n): 1 9. 10. 11. 12. 13. 14. 15. 16. 17. A) conceptual schema. B) data definition specification. C) physical schema. D) database technical system. Customers, cars, and parts are examples of : A) entities. B) attributes. C) cardinals. D) relationships. Which of the following is a generic entity type that has a relationship with one or more subtypes? A) Megatype B) Supertype C) Subgroup D) Class The property by which subtype entities possess the values of all attributes of a supertype is called: A) hierarchy reception. B) class management. C) attribute inheritance. D) generalization Subtypes should be used when: A) there are attributes that apply to some, but not all instances of an entity type. B) supertypes relate to objects outside the business. C) the instances of a subtype do not participate in a relationship that is unique to that subtype. D) None of the above. The process of defining one or more subtypes of a supertype and forming relationships is called: A) specialization. B) generalization. C) creating discord. D) selecting classes. An attribute (or attributes) that uniquely identifies each row in a relation is called a: A) column. B) foreign field. C) primary key. D) duplicate key. An attribute in a relation of a database that serves as the primary key of another relation in the same database is called a: A) link attribute. B) link key. C) foreign key. D) foreign attribute. A primary key that consists of more than one attribute is called a: A) foreign key. B) composite key. C) multivalued key. D) cardinal key. Which of the following are properties of relations? A) Each attribute has a unique name. B) No two rows in a relation are identical. C) There are no multivalued attributes in a relation. 2 D) All of the above 18. _____ is a set of commands used to update and query a database. A) DML B) DDL C) DCL D) DPL 19. The first in a series of steps to follow when creating a table is to: A) identify columns that must be unique. B) identify each attribute and its characteristics. C) create an index. D) identify columns that must be null. 20. In an SQL statement, which of the following parts states the conditions for row selection? A) Select B) From C) Where D) Group By N.B. Do not forget to answer Q2, Q3, Q4 and Q5 3 2) Write SQL Statements to create the following tables: Table Name Attribute List DIRECTOR MOVIE number lname fname born died number title type aanom aawon year critics director DIRECTOR Attribute Name Attribute Description NUMBER Unique director's number LNAME Last name FNAME First name BORN Year of birth DIED Year of death Data Type INTEGER VARCHAR(15) VARCHAR(15) INTEGER INTEGER MOVIE AttributeName NUMBER TITLE TYPE AANOM AAWON YEAR CRITICS DIRECTOR Attribute Description Unique number for a movie Title Type of the movie Number of nominations for Academy Awards Number of AA won Year when the movie was made Critics' rating Director's number Data Type INTEGER VARCHAR(30) VARCHAR(15) INTEGER INTEGER INTEGER VARCHAR(2) INTEGER 3) Write SQL statements to answer the following questions Produce a list of all movies, showing only the movie number, title and director number. What is the name of director number 8? List the titles numbers and directors names of all movies that have been made after 1988. 4) Map the above database tables to a Relational Schema. 5) Map the Relational Schema to an Entity Relationship Schema 4 5 6 7