Chapter 6

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What result set will the following query return? Select Item_No, description from item where weight > 100 and weight < 200; A) The Item_No and description for all items weighing less than 100 B) The Item_No for all items weighing between 101 and 199 C) The Item_No and description for all items weighing between 101 and 199 D) The Item_No for all items weighing more than 200

C) The Item_No and description for all items weighing between 101 and 199

Which of the following is true of the order in which SQL statements are evaluated? A) The SELECT clause is always processed first. B) The SELECT clause is always processed last. C) The SELECT clause is processed before the ORDER BY clause. D) The GROUP BY clause is processed before the WHERE clause.

C) The SELECT clause is processed before the ORDER BY clause.

In an SQL statement, which of the following parts states the conditions for row selection? A) Select B) From C) Where D) Group By

C) Where

A referential integrity constraint policy that guarantees that a row in a parent table always has a required entry in a child table ________. A) is known as a minimum cardinality enforcement action B) needs to be documented by the database development team C) is enforced in most DBMS products D) Both A and B are correct

D

In a supertype-subtype structure, discriminator attributes ________. A) are easily represented in a relational design B) cannot be represented in a relational design C) require application logic to determine which subtypes correspond to a specific supertype instance D) Both B and C are correct

D

The binary constraint MUST NOT indicates that ________. A) a specific binary relationship must not be included in a ternary relationship B) a table includes values that must not occur in a binary relationship C) a table includes values that must not occur in a ternary relationship D) a binary relationship includes value combinations that must not occur in a ternary relationship

D

When transforming an ID-dependent E-R data model relationship into a relational database design and the parent entity has a surrogate primary key and the child entity has a data identifier, then the primary key of the child table should be ________. A) the parent's surrogate key + the child's data key B) the parent's surrogate key + a surrogate key in the child C) either A or B will work, but method A is preferable D) either A or B will work, but method B is preferable

D

Which of the following is not a step in the database design process? A) Create tables and columns from entities and attributes B) Select primary keys C) Represent relationships D) Create constraints and triggers

D

Which of the following is not true about N:M recursive relationships? A) Both foreign keys in the intersection table refer to the same table. B) Since it is a recursive relationship, an intersection table is not needed. C) The foreign keys in the intersection table can't refer to the same attribute in the parent table. D) Both B and C are correct.

D

) The comparison operators = and != are used to establish a range of values.

FALSE

A catalog is the structure that contains object descriptions created by a user. T or F

FALSE

A database is maintained and queried using the data mapping language (DML). T or F

FALSE

A referential integrity constraint specifies that the existence of an attribute in one table depends upon the existence of a foreign key in the same or another table. T or F

FALSE

A single value returned from an SQL query that includes an aggregate function is called a vector aggregate.

FALSE

Count(*) tallies only those rows that contain a value, while Count counts all rows.

FALSE

DCL is used to update the database with new records. T or F

FALSE

Implementation of a standard can never stifle creativity and innovation. T or F

FALSE

Indexes generally slow down access speed in most RDMS

FALSE

Materialized views are stored on disk and are never refreshed.

FALSE

SQL has been implemented only in the mainframe and midrange environments. T or F

FALSE

SQL originated from a project called System-S. T or F

FALSE

The CREATE SCHEMA DDL command is used to create a table. T or F

FALSE

The DELETE TABLE DDL command is used to remove a table from the database T or F

FALSE

The DROP command deletes rows from a table individually or in groups. T or F

FALSE

The HAVING clause and the WHERE clause perform the same operation.

FALSE

The ORDER BY clause is the first statement processed in an SQL command

FALSE

The following command would work fine: insert into budget values 121,222,111; T or F

FALSE

The following query totals sales in state= 'MA' for each salesperson. Select salesperson_id, sum(sales) from salesperson group by salesperson_id having state = 'MA';

FALSE

When creating a table, it is not important to consider foreign key—primary key mates. T or F

FALSE

When the SELECT clause in the create view statement contains the keyword DISTINCT, the view can be used to update data.

FALSE

A default value is the value the user enters into the row the first time the user enters data.

False

A foreign key is a key that does not belong in any table.

False

A null value is an attribute value that has been set to zero.

False

A referential integrity constraint policy that insures that foreign key values in a table are correctly maintained when there is a change to the primary key value in the parent table called cascading insertions.

False

An entity needs to be examined according to normalization criteria before creating a table from it in the relational database design.

False

In a 1:N relationship, the term parent refers to the table on the 'many' side of the relationship.

False

In representing a 1:N relationship in a relational database design, the key of the table representing the entity of the 'many' side is placed as foreign key in the table representing the entity on the 'one' side of the relationship.

False

It is easy to enforce the referential integrity actions for M-M relationships.

False

The design transformation for all IS-A relationships can be summarized by the phrase "place the key of the parent table in the child table."

False

To represent a 1:N relationship in a relational database design, an intersection table is created.

False

To represent a one-to-many relationship in a relational database design, the key of the child table is placed as a foreign key into the other table

False

To represent an IS-A relationship in a relational database design, the IS-A relationship must be converted into a HAS-S relationship.

False

When transforming supertype/subtype entities into a relational database design, entity is created for the supertype only.

False

Whether or not an attribute is required is determined during the database modeling phase.

False

Explain the representation of a many-to-many strong entity relationship in a relational database design.

Many-to-many relationships cannot be directly represented in a relational database design. Therefore, many-to-many relationships are essentially broken into two one-to-many relationships by creating an intersection table that represents the relationship itself. The intersection table takes its key as a combination of the keys of the two original, or parent, entities. Each of the parent entities has a one-to-many relationship with the intersection table that is represented by placing the keys of the parents into the intersection table.

Explain the pragmatic reason for using surrogate keys.

Primary keys are commonly included in indexes, and are used to identify records to be retrieved by users. The ideal primary key is short, numeric and fixed. When the primary key contains a lengthy text field, this creates a large amount of duplicated data that must be frequently manipulated. For these reasons, it is often practical to use a surrogate key that is generated by the system and is relatively small and easy to manipulate.

A database table is defined using the data definition language (DDL). T or F

TRUE

A major benefit of SQL as a standard is reduced training costs. T or F

TRUE

Adding the DISTINCT keyword to a query eliminates duplicates.

TRUE

An insert command does not need to have the fields listed. T or F

TRUE

Applications can be moved from one machine to another when each machine uses SQL T or F

TRUE

Expressions are mathematical manipulations of data in a table that may be included as part of the SELECT statement.

TRUE

If multiple Boolean operators are used in an SQL statement, NOT is evaluated first, then AND, then OR.

TRUE

One of the original purposes of the SQL standard was to provide a vehicle for portability of database definition and application modules between conforming DBMSs. T or F

TRUE

Some DBMS can handle graphic data types as well as text and numbers. T or F

TRUE

The FROM clause is the first statement processed in an SQL command.

TRUE

The ORDER BY clause sorts the final results rows in ascending or descending order.

TRUE

The SQL command used to populate tables is the INSERT command. T or F

TRUE

The WHERE clause includes the conditions for row selection within a single table or view and the conditions between tables or views for joining.

TRUE

The WHERE clause is always processed before the GROUP BY clause when both occur in a SELECT statement.

TRUE

The content of dynamic views is generated when they are referenced.

TRUE

The following two SQL statements will produce different results. Select last_name, first_name from customer where state = 'MA' or state = 'NY' or state = 'NJ' or state = 'NH' or state = 'CT'; Select last_name, first_name from customer where state in ('MA','NY','NJ','NH','CT');

TRUE

The following two SQL statements will produce the same results. Select last_name, first_name from customer where credit_limit > 99 and credit_limit < 10001; Select last_name, first_name from customer where credit_limit between 100 and 10000;

TRUE

The views are created by executing a CREATE VIEW SQL command.

TRUE

When a GROUP BY clause is included in an SQL statement, only those columns with a single value for each group can be included.

TRUE

When creating tables, it's important to decide which columns will allow null values before the table is created. T or F

TRUE

A data constraint is a limitation on data values.

True

A key of an intersection table is always the keys of both parents.

True

A referential integrity constraint policy that insures that all rows containing a particular foreign key value in a table are eliminated from the table when the row containing the corresponding primary key value in a parent table is eliminated from the database is called cascading deletes.

True

A surrogate key is a unique, system-supplied identifier used as the primary key of a table.

True

A surrogate key is appropriate when the primary key of a table contains a lengthy text field.

True

A surrogate key should be considered when the key contains a lengthy text field.

True

All identifying relationships are 1:N

True

Cascading deletions are generally not used with relationships between strong entities.

True

Each entity in the extended E-R model is represented as a table in the relational database design.

True

In many-to-many relationship in a relational database design, the primary keys of both tables are joined into a composite primary key in the intersection table.

True

Like all ID-dependent relationships, the parents of an association table are required.

True

One of the important properties of a column is whether or not it can have a NULL value.

True

One of the important properties of an attribute is whether or not it is required.

True

Recursive M:N relationships are represented with an intersection table that shows pairs of related rows from a single table.

True

Referential integrity constraints should disallow adding a new row to a child table when the foreign key does not match a primary key value in the parent table.

True

SQL is both an American and international standard for database access. T or F

True

The ALTER TABLE command is used to change a table definition. T or F

True

The first step in the database design process is to create tables and columns from entities and attributes.

True

The ideal primary key is short, numeric, and fixed.

True

The last step in creating a table is to verify table normalization.

True

To represent a 1:1 binary relationship in a relational database design, the key of one table is placed into the second table.

True

To represent an N:M relationship in a relational database design, a table is created to represent the relationship itself.

True

To represent an N:M relationship in a relational database design, in essence it is reduced to two 1:N relationship.s

True

When creating a table for an ID-dependent entity, both the key of the parent and the key of the entity itself must appear in the table.

True

When transforming an ID-dependent E-R data model relationship into a relational database design where the child entity is designed to use a surrogate key, the relationship changes to a week but not ID-dependent relationship.

True

When transforming an extended E-R model into a relational database design, recursive relationships are treated fundamentally the same as other HAS-A relationships.

True

Each attribute of an entity becomes a(n) ________ of a table. A) column B) primary key C) foreign key D) alternate key

A

When representing a one-to-many relationship in a relational database design, ________. A) the parent is always on the one side of the "one-to-many" relationship B) the child is always on the one side of the "one-to-many" relationship C) either parent or child can be on the one side of the "one-to-many" relationship, and the choice is arbitrary D) either parent or child can be on the one side of the "one-to-many" relationship, and special criteria indicate which table should be on the one side

A

When transforming an E-R data model into a relational database design, the key of the parent entity should be placed as part of the primary key into the child entity ________. A) when the child entity is ID-dependent B) when the child entity is non-ID-dependent C) when the child entity has a 1:1 relationship with the parent entity D) when the child entity has a 1:N relationship with the parent entity

A

When transforming an ID-dependent E-R data model relationship into a relational database design, the referential integrity constraints should allow ________. A) parent updates to cascade B) child updates to cascade C) child deletes to cascade D) Both A and B are correct

A

Which of the following is not true for an ideal primary key? A) a composite of several long attributes B) numeric C) fixed D) short

A

) Multiple values returned from an SQL query that includes an aggregate function are called: A) vector aggregates. B) scalar aggregates. C) agates. D) summations.

A) vector aggregates.

In a relational database design, all relationships are expressed by ________. A) creating a primary key B) creating a foreign key C) creating a supertype D) creating a subtype

B

The binary constraint MUST COVER indicates that ________. A) a specific binary relationship must be included in a ternary relationship B) a binary relationship includes a set of value combinations that must all occur in a ternary relationship C) a table includes values that must occur in a binary relationship D) a table includes values that must occur in a ternary relationship

B

When representing a 1:1 relationship in a relational database design, ________. A) the key of each table must be placed as foreign keys into the other B) the key of either table may be placed as a foreign key into the other C) the key of both tables must be the same D) the intersection table gets the key from both relations

B

Which of the following is not true about representing subtypes in a relational database design? A) One table is created for the supertype and one for each subtype. B) All of the attributes of the supertype are added to the subtype relations. C) The key of the supertype is made the key of the subtypes. D) An instance of the supertype may be related to one instance each of several subtypes.

B

Which of the following is not true of MUST constraint? A) It may be needed in ternary relationships to enforce special business rules. B) It can be expressed directly in a relational model. C) It must be enforced by program code. D) It requires that one entity be combined with another entity.

B

What will be returned when the following SQL statement is executed? Select driver_no, count(*) as num_deliveries from deliveries where state = 'MA' group by driver_no; A) A listing of all drivers who made deliveries to state = 'MA', sorted by driver number B) A listing of each driver who made deliveries to state = 'MA' as well as the number of deliveries that each driver has made to that state C) A count of all of the deliveries made to state = 'MA' by all drivers D) None of the above

B) A listing of each driver who made deliveries to state = 'MA' as well as the number of deliveries that each driver has made to that state

What are MUST NOT and MUST COVER constraints?

Both MUST NOT and MUST COVER constraints occur when working with three tables in a ternary relationship. When a MUST NOT constraint occurs, it indicates that one binary relationship of two of the tables contains combinations of values that are not allowed to occur in the ternary relationship. When a MUST COVER constraint occurs, it indicates that one binary relationship of two of the tables contains combinations of values that must all appear in the ternary relationship.

A referential integrity constraint policy that insures that foreign key values in a table are correctly maintained when there is a change to the primary key value in the parent table is called ________. A) incremental updates B) incremental deletes C) cascading updates D) cascading deletes

C

A surrogate key should be considered when ________. A) A relationship is N:M B) A composite key is required C) The key contains a lengthy text field D) The key contains a number

C

Which of the following is not true about a NULL attribute? A) On insertion, entering the data for that field is optional. B) It is an important property of an attribute. C) It must have a default value specified. D) A primary key can't be NULL.

C

What does the following SQL statement do? Alter Table Customer_T Add (Type Varchar (2)); A) Alters the Customer_T table to accept Type 2 Varchars B) Alters the Customer_T table to be a Type 2 Varchar C) Alters the Customer_T table, and adds a field called "Type" D) Alters the Customer_T table by adding a 2-byte field called "Varchar"

C) Alters the Customer_T table to be a Type 2 Varchar

What does the following SQL command do? insert into Customer_T values (001,'John Smith','231 West St','Boston','MA','02115'); A) Adds a new record to the Customer_T B) Creates the Customer_T table C) Deletes the Customer_T table D) Updates the Customer_T table

A) Adds a new record to the Customer_T

What result set will the following query return? Select Item_No from Order_V where quantity > 10; A) The Item_No of all orders that had more than 10 items B) The Order_Id of all orders that had more than one item C) The Order_Id of all orders that had more than 10 items D) The Item_No of all orders that had 10 or more items

A) The Item_No of all orders that had more than 10 items

The identifier of the entity becomes the ________ of the corresponding table. A) primary key B) foreign key C) supertype D) subtype

A

The command for creating a database is: A) create table. B) create view. C) create schema. D) create authorization.

C) create schema

In many-to-many relationships between strong entities in a relational database design, which of the following is not true? A) The intersection table is ID-dependent on one of the parents B) The intersection table is ID-dependent on both of the parents C) The relationships from the intersection table to the parent tables are identifying relationships D) The maximum cardinality to the intersection table is always N

A

What will be returned when the following SQL query is executed? Select driver_no, count(*) as num_deliveries from deliveries group by driver_no having count(*) > 2; A) A listing of all drivers who made more than 2 deliveries as well as a count of the number of deliveries B) A listing of all drivers C) A listing of the number of deliveries greater than 2 D) A listing of all drivers who made more than 2 deliveries

A) A listing of all drivers who made more than 2 deliveries as well as a count of the number of deliveries

Which of the following counts ONLY rows that contain a value? A) Count B) Count(*) C) Tally(*) D) Checknum

A) Count

__________is a set of commands used to update and query a database. A) DML B) DDL C) DCL D) DPL

A) DML

What does the following SQL statement do? Delete from Customer_T where state = 'HI'; A) Deletes all records from customer_t where the state is equal to HI B) Removes the Customer_T table from the database C) Deletes all records from the Customer_T table D) None of the above

A) Deletes all records from customer_t where the state is equal to HI

To get all the customers from Hawaii sorted together, which of the following would be used? A) ORDER BY B) GROUP BY C) HAVING D) SORT

A) ORDER BY

What results will be produced by the following SQL query? Select sum(standard_price) as Total_Price from Product_V where Product_Type = 'WOOD'; A) The total price of all products that are of type wood B) The total price of all products C) The Standard_Price of the first wood product in the table D) The Standard_Price of any wood product in the table

A) The total price of all products that are of type wood

What is an association relationship and how does it differ from an N:M relationship?

An association relationship is very similar to an N:M relationship except that the intersection table has attributes of its own. This means that in addition to the foreign key fields linking to the two strong entities, there is at least one additional field in what would otherwise be called the intersection table but is now an association table. For example, intersection table ENROLLMENT for STUDENT and CLASS showing student enrollment in each class would normally have two columns: StudentID and ClassID. However, we can turn this intersection table into an association table by adding the column Grade, which records each student's grade in each class.

What will be returned when the following SQL statement is executed? Select driver_no,count(*) as num_deliveries from deliveries group by driver_no; A) A listing of all drivers, sorted by driver number B) A listing of each driver as well as the number of deliveries that he or she has made C) A count of all of the deliveries made by all drivers D) None of the above

B) A listing of each driver as well as the number of deliveries that he or she has made

Which of the following is a technique for optimizing the internal performance of the relational data model? A) Avoiding indexes on secondary keys B) Clustering data C) Not reporting statistics to save machine resources D) Using random index organizations

B) Clustering data

11) The SQL command ________ adds one or more new columns to a table. A) create table B) alter table C) create view D) create relationship

B) alter table

The first step in transforming an extended E-R model into a relational database design is to ________. A) create a table for each relationship B) evaluate the entities against the normalization criteria C) create a table for each entity D) remove any recursive relationships

C

Which of the following is not true about surrogate keys? A) They are identifiers that are supplied by the system, not the users. B) They have no meaning to the users. C) They are non-unique within a table. D) They can be problematic when combining databases.

C

Which of the following finds all groups meeting stated conditions? A) Select B) Where C) Having D) Find

C) Having

What will result from the following SQL Select statement? Select min(Product_Description) from Product_V; A) The minimum value of Product_Description will be displayed. B) An error message will be generated. C) The first product description alphabetically in Product_V will be shown. D) None of the above.

C) The first product description alphabetically in Product_V will be shown.

___________is a set of commands used to control a database, which includes security. A) DML B) DDL C) DCL D) DPL

C)DCL

Which of the following is not true of recursive relationships? A) When the recursive relationship is M:N, an intersection table is created. B) The rows of a single table can play two different roles. C) Recursive relationships can be 1:1, 1:N, or M:N relationships. D) When the relationship is 1:N, a new table must be defined to represent the relationship.

D

Which of the following is a purpose of the SQL standard? A) To specify syntax and semantics of SQL data definition and manipulation B) To specify minimal and complete standards, which permit different degrees of adoption in products C) To define the data structures and basic operations for SQL databases D) All of the above

D) All of the above

A view may not be updated directly if it contains: A) the DISTINCT keyword. B) derived columns and expressions in the SELECT clause. C) uses the GROUP BY or HAVING clause. D) all of the above.

D) all of the above.

When the parent entity has a surrogate key, the enforcement actions are the same for both parent and child.

False

When transforming supertype/subtype entities into a relational database design, all of the attributes for the supertype table are placed into the subtype relations.

False

What are the four sets of minimum cardinalities that can be present in a 1:N binary relationship?

If we use the labels "Parent" and "Child" to represent, respectively, the one and many side of a 1:N relationship, we can then consider whether the parent and child must participate in the relationship. If one must participate, it is mandatory (M). If one does not have to participate it is optional (O). The four possible sets of minimum cardinalities are therefore: Parent optional and Child optional (O-O) Parent mandatory and Child optional (M-O) Parent optional and Child mandatory (O-M) Parent mandatory and Child mandatory (M-M)

Explain the representation of a one-to-many strong entity relationship in a relational database design.

One-to-many relationships are represented by placing the primary key of the table on the one side of the relationship into the table on the many side of the relationship as a foreign key. The term parent refers to the table on the one side of a 1:N relationship, and the term child refers to the table on the many side of the 1:N relationship. Therefore, the rule for representing a one-to-many relationship can be summarized as "Place the key of the parent table in the child table as a foreign key."

How are one-to-one recursive relationships addressed using the relational model?

One-to-one recursive relationships are addressed just the same as one-to-one nonrecursive relationships. The only difference is that both of the related entity instances are in the same entity class. The key of either instance is placed in the other instance as a foreign key. In the case of a recursive relationship, this means that a new attribute is added to the entity class with a recursive relationship. For each instance, this new attribute will contain the value of the key attribute of the instance that is related.

The asterisk (*) wildcard designator can be used to select all fields from a table as well as in WHERE clauses when an exact match is not possible.

TRUE

The following query totals sales for each salesperson. Select salesperson_id, sum(sales) from salesperson group by salesperson_id;

TRUE

Briefly describe the process of converting an extended E-R model into a relational database design.

To convert an extended E-R model into a relational database design, first tables and columns must be defined for each entity attribute. The attributes of the entity are represented as the columns of the table. Primary keys are then selected for each table, after which the relationships between the entities are represented through the creation of foreign keys. Next, constraints are specified. Finally the normalization is verified.

An ID-dependent table can be used to represent multivalued attributes.

True

An association tables sometimes connect more than two entities.

True

An intersection table is always ID-dependent on both of its parent tables.

True

If the parent is required, then a new child row must be created with a valid foreign key value.

True

In a 1:1 relationship, the foreign key is defined as an alternate key to make the DBMS enforce uniqueness.

True

In a 1:N relationship, the table on the 'one' side is called the parent.

True

In a relational database design, all relationships are expressed by creating a foreign key.

True

In representing a 1:N relationship in a relational database design, the key of the table representing the parent entity is placed as a foreign key in the table representing the child entity.

True

The values of a surrogate key have no meaning to the users.

True

To represent an N:M relationship in a relational database design, an intersection table is created.

True

When the child entity is required (M) in a relationship, there needs to be at least one child row for each parent row at all times.

True

When the parent entity is required (M) in a relationship, ever row of the child table must have a valid, non-null value of the foreign key.

True

What does the following SQL statement do? Select * From Customer Where Cust_Type = "Best" A) Selects all the fields from the Customer table for each row with a customer labeled "Best" B) Selects the "*" field from the Customer table for each row with a customer labeled "Best" C) Selects fields with a "*" in them from the Customer table D) Selects all the fields from the Customer table for each row with a customer labeled "*"

A) Selects all the fields from the Customer table for each row with a customer labeled "Best"

To represent a one-to-many relationship in a relational database design, ________. A) the key of the child is placed as a foreign key into the parent B) the key of the parent is placed as a foreign key into the child C) an intersection table must be created D) the key of the table on the "many" side is placed in the table on the "one" side

B

Which of the following is the wildcard operator in SQL statements? A) < > B) * C) = D) &

B) *

Which of the following can produce scalar and vector aggregates? A) ORDER BY B) GROUP BY C) HAVING D) SORT

B) GROUP BY

Which of the following questions is answered by the SQL statement? Select Count (Product_Description) from Product_T; A) How many products are in the table Product_T? B) How many products have product descriptions in the Product Table? C) How many characters are in the field name "Product_Description"? D) How many different columns named "Product_Description" are there in table Product_T?

B) How many products have product descriptions in the Product Table?

DDL is typically used during which phases of the development process? A) Implementation B) Physical design C) Analysis D) All of the above

B) Physical Deisgn

Which of the following will produce the minimum of all standard prices? A) Select standard_price from Product_V where Standard_Price = min; B) Select min(standard_price) from Product_V; C) Select Standard_Price from min(Product_V); D) Select min(Standard_Price) from Product_V where Standard_Price = min(Standard_Price);

B) Select min(standard_price) from Product_V;

What result set is returned from the following query? Select Customer_Name, telephone from customers where city in ('Boston','New York','Denver'); A) The Customer_Name and telephone of all customers B) The Customer_Name and telephone of all customers living in either Boston, New York or Denver C) The Customer_Name and telephone of all customers living in Boston and New York and Denver D) The Customer_Name of all customers living in Boston, New York or Denver

B) The Customer_Name and telephone of all customers living in either Boston, New York or Denver

What result will the following SQL statement produce? Select Avg(standard_price) as average from Product_V; A) The average of all products in Product_V B) The average Standard_Price of all products in Product_V C) The average price of all products D) None of the above

B) The average Standard_Price of all products in Product_V

Given a table named store with 5 fields: store_id, address, city, state, zipcode, why would the following insert command not work? insert into store values ('234 Park Street') A) It would work just fine. B) You must specify the fields to insert if you are only inserting some of the fields. C) There is no table keyword. D) None of the above.

B) You must specify the fliers to insert if you only inserting some of the fields.

To eliminate duplicate rows in a query, the ________ qualifier is used in the SQL Select command. A) alter B) distinct C) check D) specific

B) distinct

Any create command may be reversed by using a ___________command. A) truncate B) drop C) delete D) unpack

B) drop

A ________ view is materialized when referenced. A) virtual B) dynamic C) materialized D) base

B) dynamic

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.

B) identify each attribute and its characteristics.

A single value returned from an SQL query that includes an aggregate function is called a(n): A) agate. B) scalar aggregate. C) vector aggregate. D) summation.

B) scalar aggregate.

The_____________is the structure that contains descriptions of objects such as tables and views created by users. A) SQL B) schema C) catalog D) master view

B) schema

What does the following SQL statement do? Update Product_T Set Unit_Price = 775 Where Product_ID =7 A) Changes the price of a unit called Product_T to 7 B)Changes the unit price of Product 7 to 775 C) Changes the length of the Unit_Price field to 775 D) Updates the Product_T table to have a unit price of 775

B)Changes the unit price of Product 7 to 775

In many-to-many relationships in a relational database design, ________. A) the key of the child is placed as a foreign key into the parent B) the key of the parent is placed as a foreign key into the child C) the keys of both tables are placed in a third table D) the keys of both entity tables are placed in each other

C

In relational database design, ID-dependent entities are not used to ________. A) represent N:M relationships B) handle associative relationships C) represent relationships where the child identifier does not include the key of the parent D) handle archetype/instance relationships

C

The SQL command __________defines a logical table from one or more tables or views. A) create table B) alter table C) create view D) create relationship

C) create view

Indexes are created in the most RDBMs to A) provide a quicker way to store data B) decrease the amount of disk space utilized C) provide rapid random and sequential access to base-table data D) increase the cost of implementation

C) provide rapid random and sequential access to base-table data

A referential integrity constraint policy that insures that all rows containing a particular foreign key value in a table are eliminated from the table when the row containing the corresponding primary key value in a parent table is eliminated from the database is called ________. A) incremental updates B) incremental deletes C) cascading updates D) cascading deletes

D

For the M-O (parent mandatory, child optional) case, what action(s) should be taken to ensure minimum cardinality is maintained? A) Define referential integrity constraint from child to parent B) Make foreign key NOT NULL C) Will require trigger or other application code D) Both A and B are correct

D

Many-to-many relationships are represented by ________. A) two tables with an M:N relationship B) two tables with a 1:N relationship C) an intersection table which has M:N relationships with the two tables D) an intersection table which has 1:N relationships with the two tables

D

The benefits of a standardized relational language include: A) application longevity. B) reduced training costs. C) cross-system communication. D) all of the above.

D) all the above

An intersection table can have additional attributes besides the keys of its parent tables.

False

By default, the identifier of the entity becomes the foreign key of the corresponding table.

False

Cascading deletions are generally not used with relationships for weak child entities.

False

Data types are consistent across all DBMS products.

False

Discriminator attributes can be represented in relational designs.

False

When creating a relational database design from E-R diagrams, first create a relation for each relationship.

False

When creating a table in the relational database design from an entity in the extended E-R model, the attributes of the entity become the rows of the table.

False

When the key of one table is placed into a second table to represent a relationship, the key is called a relational key in the second table.

False

Using the VRG database as an example, briefly describe what a final database design consists of.

The obvious part of the database design is the ER drawing itself, for example as shown for VRG in Figure 6-39. However, this needs to be accompanied by a summary of the database design relationships as shown in Figure 6-40. This document summarizes the cardinalities of relationships. For each relationship, we need a set of actions to enforce the minimum cardinalities. These can be based on Figures 6-28(a) and 6-28(b), the examples for VRG are shown in Figures 6-41 and 6-42. Finally, we need a set of column characteristics for each table, as shown in Figure 6-43 for VRG.

In 1:N relationships, the table on the 'many' side is called the child.

True

In order to update data in SQL, one must inform the DBMS which relation, columns, and rows are involved.

True

When placing a foreign key for a 1:1 relationship, the key of either table can be used as the foreign key in the other table.

True

When transforming supertype/subtype entities into a relational database design, the key of the supertype table is placed into the subtype table typically as the key.

True


Set pelajaran terkait

Rosetta Stone French Unit 18, L2

View Set

Chapter 28 Male Reproductive System

View Set

NCLEX Cram HESI Comprehensive Review 1

View Set

Powers of 10 & Scientific Notation

View Set

Final Chapter test 1-18, 23, 25, 31, misc.

View Set