Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 6 How many tables are created from the E-R diagram in Fig. 3? a. 6 b. 3 c. 4 d. 5 1 points QUESTION

QUESTION 6

image text in transcribed

How many tables are created from the E-R diagram in Fig. 3?

a.

6

b.

3

c.

4

d.

5

1 points

QUESTION 7

Consider the following statement:

Alter table employee

Add constraint employee_office_number_fk foreign key(office_number)

References sales_office(office_number);

Which of the following is true for the above statement?

a.

The statement guarantees a unique identifier for the office_number column of the office table.

b.

The statement provides a foreign key constraint for the office_number column of the office table.

c.

The statement provides a foreign key constraint for the office_number column of the employee table

d.

Both b and c are correct

1 points

QUESTION 8

Consider the following statement:

Alter table owns

Add constraint owns_property_owner_id_pk primary key(property,owner_id);

Which of the following is true for the above statement?

a.

The statement is unnecessary because the owns table is not implemented.

b.

Builds composite primary key based on the property and owner_id fields of the owns table.

c.

Is syntactically incorrect the primary key can only be built on one column

d.

The statement is unnecessary because of the one-to-many relationship between owns and property.

QUESTION 9

Consider that the employee table has the following schema (The desc command displays the columns in the same order as shown below):

Employee(Employee_ID,Employee_name,office_number)

Assume that all Primary key/Foreign key constraints have been created on all tables as illustrated on the E-R diagram.

What does the following command do? (Assume that no other rows have 1806 as the employee_id)

Insert into employee

Values(1806,Jim Davis, NULL);

a.

Correctly inserts a new row into the employee table (no error messages displayed)

b.

Displays an error message (Foreign key constraint violated) but inserts the data anyway

c.

Displays that a NOT NULL constraint (employee_office_number_nn) was violated and does not insert the row.

d.

Displays an error message because no columns of any table are ever allowed to be NULL

QUESTION 10

Consider the following statement:

Delete from owns;

Assume that all Primary key/Foreign key constraints have been created on all tables as illustrated on the E-R diagram.

Which of the following is true of the above statement:

a.

Correctly deletes all records of owns table (no error message displayed)

b.

Violates foreign key constraints implemented on owns table (error message is displayed) and does not delete any records

c.

Violates rule that you can never delete all records from a table (error message is displayed ) and does not delete any records

d.

None of the above

1 points

QUESTION 11

Consider the following statement:

delete from sales_office;

Assume that all Primary key/Foreign key constraints have been created on all tables as illustrated on the E-R diagram. Assume all tables are fully populated with data.

Which of the following is true?

a.

Correctly deletes all record of office table (no error message displayed)

b.

Violates foreign key constraint implemented on Employee table

c.

Violates foreign key constraint implemented on Property table

d.

Both b and c are correct

QUESTION 12

Consider the following statement:

Insert into owns

Values(1215,101,50);

Where 1215 represents the property id, 101 is the owner id, and 50 is the percent owned. Which of the following statements is true:

a.

The property id 1215 must be the primary key for a row in the property table

b.

The owner id 101 must be the primary key for a row in the owner table.

c.

The value of 50 must be Not Null

d.

a and b are true

1 points

QUESTION 13

Consider the following statement:

Update owns

Set owner_id = NULL;

Which of the following statements are true?

a.

The Primary key constraint is violated because Primary keys cannot be NULL

b.

Is illegal because no column in a database can ever by NULL

c.

Is illegal because update statements always require a where clause

d.

All of the above

Questions 6-13 Uses the following E-R diagram EMPLOYEE Is, 382 Office SALES OFFICE Location Address City PROPERTY State Locatioa Zip Code Percent OWNER

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 15th International Conference Dexa 2004 Zaragoza Spain August 30 September 3 2004 Proceedings Lncs 3180

Authors: Fernando Galindo ,Makoto Takizawa ,Roland Traunmuller

2004th Edition

3540229361, 978-3540229360

More Books

Students also viewed these Databases questions