Test1 Key

The University of Texas

CS 327e

Fall 2001

 

 

NAME: ________________________ LAST 4 DIGITS of SSN: __________________

Date: 2001-09-24

Duration: 45 minutes

Total: 100 points, Each Question is weighted equally.

 

Circle the correct answer in each question.

 The correct answers are in bold.

 

1.         Which of the following is NOT a DBMS software package?

a.    OS/2

b.     DB2

c.     ORACLE

d.      Access

 

 

2.         Components of the DBMS's query language include:

a.    Data Definition Language

b.     Data Manipulation Language

c.     Data Description Language

d.     Both A and B

 

 

3.         Each United States President may be associated with many Congresses, and any given Congress may serve with more than one President (for example, the Congress that served both J.F. Kennedy and L.B. Johnson). This is an example of which kind of relationship?

a.    1:1

b.     1:M

c.     M:N

d.     M:1

 

 

4.         In the hierarchical database model, each segment has a(n) ____________ relationship to the segment below it.

a.    1:1

b.     1:M

c.     M:N

d.     M:1

 

 

5.         In network terminology, a relationship is called a ____________.

a.    set

b.     segment

c.     schema

d.     link

 

 

6.         The user perceives the relational database as a collection of ___________ in which data are stored.

a.    records

b.     sets

c.     rows

d.     tables

 

 

7.         Which of the following is NOT a component of the E-R data model?

a.    Process

b.     Entity

c.     Attribute

d.     Relationship

 

 

8.         The following statements are all advantages of E-R Diagrams, EXCEPT:

a.    E-R Diagrams provide an effective communication tool.

b.     E-R Diagrams offer an exceptional conceptual simplicity.

c.     E-R Diagrams provide integration with the relational database model.

d.     None of the above.

 

 

9.         The difference between DDL and DML is that one defines the data structures while the other allows users to extract the data.

a.    true

b.     false

 

 

10.     The conceptual database model is concerned with HOW data is represented.

a.    true

b.     false

 

 

11.     In the relational model, a grouping of related entities becomes a(n)

a.    class type.

b.     object group.

c.     entity instance.

d.     entity set.

 

 

12.     Each column of a table represents a(n)

a.    entity set.

b.     attribute.

c.     tuple.

d.     row.

 

 

13.     ___________ yields a horizontal subset of a table.

a.    DIFFERENCE

b.     PRODUCT

c.     SELECT

d.     PROJECT

 

 

14.     The real power behind the relational database, allowing the use of independent tables linked by common attributes, is ___________.

a.    SELECT

b.     PROJECT

c.     JOIN

d.     INTERSECT

 

 

15.     In a(n) ___________, the unmatched pairs would be retained and the values for the unmatched other table would be left blank or null.

a.    natural JOIN

b.     equi JOIN

c.     theta JOIN

d.     outer JOIN

 

 

16.     Problems inherent in the many-to-many relationship in the relational environment can best be avoided by

a.    using the hierarchical model.

b.     placing all entities in one table.

c.     breaking the M:N situation up, to produce a set of 1:M relationships.

d.     enforcing referential integrity rules.

 

 

17.     In the database schema,  Figure 2-5, why does a product’s price occur in two tables: LINE and PRODUCT?

a.    Copying the product price to the LINE table makes it possible to maintain the historical accuracy of the transactions.

b.     LINE_PRICE in LINE is a synonym.

c.     This is an example of a data redundancy which should be eliminated.

d.     Obviously, the diagram is incorrect.

 

 

18.     In creating the PRODUCT table, Figure 3-1, __________________ ensures that a vendor will not automatically be deleted because the last product that references this vendor is deleted.

a.    CREATE TABLE

b.     ON DELETE RESTRICT

c.     ON UPDATE CASCADE

d.     NO NULL

 

 

19.     When placed in the CREATE TABLE sequence, ___________  means that if a change is made in the existing VENDOR table V_CODE, this change must be reflected automatically in any PRODUCT table V_CODE reference (Figure 3-1).

a.    NOT NULL

b.     ON DELETE RESTRICT

c.     ON UPDATE CASCADE

d.     UNIQUE

 

 

20.     If you want to select all the attributes in the PRODUCT table, Figure 3-6, you would use the command ___________.

a.    SELECT ALL FROM PRODUCT;

b.     SELECT * FROM PRODUCT;

c.     SELECT *.* FROM PRODUCT;

d.     SELECT ALL ATTRIBUTES FROM PRODUCT;

 

 

21.     Using Figure 3-7, what would be the outcome to the PRODUCT table of using the DELETE command: DELETE FROM PRODUCT WHERE P_MIN=5;?

a.    All values in column P_MIN would be deleted.

b.     All rows where P_MIN contains 5 will be deleted.

c.     The values in column P_MIN which equal 5 will be deleted.

d.     All rows where P_MIN equal 5 will be deleted.

 

 

22.     Which of the following is NOT a logical Boolean operator?

a.    AND

b.     BUT

c.     OR

d.     NOT

 

 

23.     Using standard SQL, IS NULL is the opposite of ____________.

a.    BETWEEN

b.     IN

c.     LIKE

d.     EXISTS

 

 

24.     To issue SQL commands, programmers need to know the data storage format.

a.    true

b.     false

 

 

25.     A M:N relationship can be decomposed into 

a.    One 1:M relationship

b.    Two 1:M relationships

c.    Two 1:1 relationships

d.    One 1:1 relationship

 

BONUS QUESTION (4 points)

Give the first name of the person, who wrote the paper,

“A Relational Model of Data for Large Shared Data Banks”,

(http://www.acm.org/classics/nov95/s1p3.html)

Which was first published in Communications of the ACM, Vol. 13, No. 6, June 1970, pp. 377-387. He is popularly considered as “The father of Relational Databases”.

 

Bonus Answer

Edgar F. Codd (NOTE: Only the first name is asked)

 

Home Page