Top Banner
A4 This is a preview of the published version of the quiz Started: Oct 25 at 2:34pm Quiz Instrucons This test has a time limit of 75 mins. This test will save and submit automatically when the time expires. Once started, this test must be completed in one sitting. Do not leave the test before clicking Save and Submit. 4 pts Question 1 is used to minimize the likelihood of redundant relationships is a generic entity type that is related to one or more entity subtypes minimize the number of nulls contains the common characteristics An entity supertype 3 pts Question 2 inherited by all subtypes not unique to the subtype unique to the subtype The entity subtype will store the data that is
12

A4 Quiz Instruc ons

Feb 26, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A4 Quiz Instruc ons

A4

This is a preview of the published version of the quiz

Started: Oct 25 at 2:34pm

Quiz InstruconsThis test has a time limit of 75 mins.

This test will save and submit automatically when the time expires.

Once started, this test must be completed in one sitting. Do not leave the test before clicking Save andSubmit.

4 ptsQuestion 1

is used to minimize the likelihood of redundant relationships

is a generic entity type that is related to one or more entity subtypes

minimize the number of nulls

contains the common characteristics

An entity supertype

3 ptsQuestion 2

inherited by all subtypes

not unique to the subtype

unique to the subtype

The entity subtype will store the data that is

Page 2: A4 Quiz Instruc ons

calculated from related attributes

3 ptsQuestion 3

the process of identifying a higher­level, more generic entity supertype from lower­level entitysubtypes

presentation of multiple entities and relationships in the ERD

description of the extent to which attribute are independent of one another Selected

arrangement of higher­level entity supertypes and lower­level entity subtypes

A specialization hierarchy depicts the

3 ptsQuestion 4

is the attribute in the supertype entity that is used to determine to which entity subtype thesupertype occurrence is related

describes the relationship between members of the subtype

determines whether every occurrence in the supertype must participate as a member of asubtype

provides a detailed accounting of all tables found within the database

A subtype discriminator

3 ptsQuestion 5

are subtypes that contain unique subsets of the supertype entity set

Overlapping subtypes

Page 3: A4 Quiz Instruc ons

are subgrouping of the entities

each entity instance of the supertype may appear in more than one subtype

are entities whose existence depends on some other entity type

3 ptsQuestion 6

every subtype occurrence must be a member of at least one supertype

not every supertype occurrence is a member of a subtype

every supertype occurrence must be a member of at least one subtype

not every subtype occurrence is a member of a supertype

Partial completeness means

4 ptsQuestion 7

According to the data model (Fig. Q5.7), is it required that every entity instance in thePRODUCT table be associated with an entity instance in the CD table? Why or why not?Please select the correct statement.

Hint: review disjoint vs. overlapping constraints, and completeness constraint (partial vs.total).

Page 4: A4 Quiz Instruc ons

No. The partial completeness constraint indicates that every instance in the supertype must beassociated with one row in some subtype, not all subtypes.

No. The total completeness constraint indicates that every instance in the supertype(PRODUCT) must be associated with one row in some subtype, not all subtypes. Since thesubtypes are designated as disjoint, or exclusive, then every row in the supertype is associatedwith a row in only one subtype.

No. With overlapping subtypes, every row in the supertype is associated with a row in only onesubtype.

No. The subtype discriminator is not required in this model.

4 ptsQuestion 8

Prod_Num

Prod_Title

Prod_ReleaseDate

Prod_Price

Prod_Type

List all of the attributes of a movie.

Page 5: A4 Quiz Instruc ons

Movie_Rating

Movie_Director

3 ptsQuestion 9

Yes. There is no special relationship between the BOOK table and the PRODUCT table.

Yes. This is not a specialization hierarchy.

No. Subtypes can only exist within the context of a supertype.

No. In a specialization hierarchy supertypes and subtypes are independent of each other.

Is it possible for a book to appear in the BOOK table without appearing in the PRODUCTtable? Why or why not, explain?

3 ptsQuestion 10

is a “virtual” entity type used to represent multiple entities and relationships in the ERD.

is the property of a relationship table that guarantees that each entity has a unique value in aprimary key.

is formed by combining multiple interrelated entities into a single abstract entity object.

is used to represent multiple entities and relationships with the purpose of simplifying the ERDand thus enhancing its readability.

An entity cluster

3 ptsQuestion 11

Match the following PK characteristics and their explanation

Page 6: A4 Quiz Instruc ons

Unique values [ Choose ]

Nonintelligent [ Choose ]

No change over time [ Choose ]

Preferably single­attribute [ Choose ]

Preferably numeric [ Choose ]

Security complaint [ Choose ]

3 ptsQuestion 12

composite entities, where the primary key from each parent entity resolves a M:N relationship

weak entities, where the weak entity has a weak identifying relationship with the parent entity

composite entities, where each primary key combination is not allowed in the M:N relationship

weak entities, where the weak entity has a strong identifying relationship with the parent entity

Generally, it is best *not* to use composite primary keys. However, if they are used, theycan be useful as identifiers of

3 ptsQuestion 13

used to ensure entity integrity, and by making queries simpler

A surrogate primary key is

Page 7: A4 Quiz Instruc ons

a key generated to prevent the database from becoming inconsistent

an “artificial” PK that is used to uniquely identify each entity occurrence when there is no goodnatural key available or when the “natural” PK would include multiple attributes.

used to ensure that relationships between entities can be created more easily

4 ptsQuestion 14

Place the PK of the entity on the mandatory side in the entity on the optional side as a FK

Place the FK of the entity on the mandatory side in the entity on the optional side as a PK

make the FK mandatory

make the FK optional

When implementing a 1:1 relationship, where should you place the foreign key if one sideis mandatory and one side is optional? Should the foreign key be mandatory or optional?(See Table 5.5)

4 ptsQuestion 15

Data whose values change over time and for which you must keep a history of the data changes.

Time­variant data are similar to multivalued attributes. Solution: new table.

The solution for storing time­variant data is to create a new entity in a 1:M relationship with theoriginal entity.

Time­variant data must be resolved into a M:N relationship.

Select the incorrect description about time­variant data?

20 ptsQuestion 16

Page 8: A4 Quiz Instruc ons

Upload

Given the following business scenario, create a Crow’s Foot ERD using a specializationhierarchy if appropriate (Hint: it *is* appropriate. Review Fig. 5.2).

Two­Bit Drilling Company keeps information on employees and their insurancedependents:

Each employee has an employee number, name, date of hire, and title.

If an employee is an inspector, then the date of certification and the renewal date for that

certification should also be recorded in the system.

For all employees, the Social Security number and dependent names should be kept.

All dependents must be associated with one and only one employee.

Some employees will not have dependents, while others will have many dependents.

Note:

You may indicate the disjoint/overlapping designation, and partial/total completenessconstraint, by using a textbox with text stating the designations.

Choose a File

Page 9: A4 Quiz Instruc ons

5 ptsQuestion 17

select balance as `largest balance` from customer;

select max(balance) as largest balance from customer;

select max(balance) as `largest balance` from customer;

select max(balance) as `largest balance` from customer

Use the Premiere script to run your SQL statements, then select the correct SQLstatement.

List the largest customer balance, use alias, “largest balance.”

5 ptsQuestion 18

select format(avg(unit_price),2) as 'average price'

from part;

select avg(unit_price),2 as 'average price'

from part;

select (format(unit_price),2) as 'average price'

from part;

select format(avg(unit_price)) as 'average price'

from part;

List the average part price, rounded to two decimal places, use alias, "average price."

5 ptsQuestion 19

Page 10: A4 Quiz Instruc ons

select part_number, part_description, unit_price

from part

where unit_price >= 30 and unit_price <= 300;

select part_number, part_description, format(unit_price, 2)

from part

where unit_price >= 30 and <= 300;

select part_number, part_description, format(unit_price, 2),

part

where unit_price >= 30 and unit_price <= 300;

select part_number, part_description, format(unit_price, 2)

from part

where unit_price >= 30 and unit_price <= 300;

List all part numbers, descriptions, and part prices (rounded to two decimal places) forparts priced between $30 and $300, inclusive.

5 ptsQuestion 20

delete from orders

order_number>=12491 and order_number<=12498;

delete from orders

where order_number>=12491 and order_number<=12498;

delete from order

where order_number>=12491 and order_number<=12498;

delete from orders

where order_number>=12491 and order_number<=12498

Remove order numbers between 12491 and 12498, inclusive, in one statement;

Page 11: A4 Quiz Instruc ons

5 ptsQuestion 21

update customer

set credit_limit=2000

balance<=800;

update customer

credit_limit=2000

where balance<=800;

update customer

set credit_limit=2000

where balance<=800;

update customers

set credit_limit=2000

where balance<=800;

Update all customers’ credit limits to $2000, for those customers whose balance is lessthan or equal to $800.

5 ptsQuestion 22

Be sure to match *all* correct answers:

Add three records to the order_line table, in one statement, with the following values:

(12489, 'AZ52',10,24.99) (12491, 'AZ52',5,19.99) (12494, 'BA74',3,14.99)

Page 12: A4 Quiz Instruc ons

Quiz saved at 2:35pm

insert into order_line

(order_number, part_number,number_ordered, quoted_price)

(12489, 'AZ52',10,24.99),

(12491, 'AZ52',5,19.99),

(12494, 'BA74',3,14.99);

insert into order_line

(order_number, part_number,number_ordered, quoted_price)

values

(12489, 'AZ52',10,24.99),

(12491, 'AZ52',5,19.99);

(12494, 'BA74',3,14.99);

insert into order_line

(order_number, part_number,number_ordered, quoted_price)

values

(12489, 'AZ52',10,24.99),

(12491, 'AZ52',5,19.99),

(12494, 'BA74',3,14.99);

insert into order_line

values

(12489, 'AZ52',10,24.99),

(12491, 'AZ52',5,19.99),

(12494, 'BA74',3,14.99);

Submit Quiz