Chapter 4 CIS 330

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

The ________ states that no primary key attribute may be null. A) referential integrity constraint B) entity integrity rule C) partial specialization rule D) range domain rule

entity integrity rule

A relation is in first normal form if it has no more than one multivalued attribute.

false

A synonym is an attribute that may have more than one meaning.

false

A transversal dependency is a functional dependency between two or more nonkey attributes.

false

An anomaly is a type of flaw in the database server.

false

An enterprise key is a foreign key whose value is unique across all relations.

false

An identifier assigned to an associative entity is also called a cross-relation key.

false

Anomalies do not generally arise out of transitive dependencies.

false

CASE tools can model more complex data relationships, such as ternary relationships.

false

Data integrity consists of powerful operations to manipulate data stored in relations.

false

In the relational data model, associations between tables are defined through the use of primary keys.

false

The primary key of the many side migrates to the one side when transforming a one-to-many relationship.

false

The truncate table statement in SQL creates a new table.

false

There can be multivalued attributes in a relation.

false

Unlike columns, the rows of a relation may not be interchanged and must be stored in one sequence.

false

When transforming a unary many-to-many relationship to relations, a recursive foreign key is used.

false

When all multivalued attributes have been removed from a relation, it is said to be in: A) first normal form. B) second normal form. C) Boyce-Codd normal form. D) third normal form.

first normal form

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.

foreign key

The normal form which deals with multivalued dependencies is called: A) fifth normal form. B) fourth normal form. C) Boyce-Codd normal form. D) sixth normal form.

fourth normal form

A constraint between two attributes is called a(n): A) functional relation. B) attribute dependency. C) functional dependency. D) functional relation constraint.

functional dependency

An attribute that may have more than one meaning is called a(n): A) homonym. B) alias. C) double defined attribute. D) synonym.

homonym

A domain definition consists of all of the following components EXCEPT: A) domain name. B) data type. C) integrity constraints. D) size.

integrity constraints

A form of database specification which maps conceptual requirements is called: A) logical specifications. B) response specifications. C) security specifications. D) physical specifications.

logical specifications

All of the following are the main goals of normalization EXCEPT: A) minimize data redundancy. B) simplify the enforcement of referential integrity. C) maximize storage space. D) make it easier to maintain data.

maximize storage space

The need to ________ relations commonly occurs when different views need to be integrated. A) metadata B) system C) drop D) merge

merge

The entity integrity rule states that: A) no primary key attribute can be null. B) referential integrity must be maintained across all entities. C) each entity must have a primary key. D) a primary key must have only one attribute.

no primary key attribute can be null

Which of the following are properties of relations? A) Each attribute has the same name. B) No two rows in a relation are identical. C) There are multivalued attributes in a relation. D) All columns are numeric.

no two rows in a relation are identical

Understanding the steps involved in transforming EER diagrams into relations is important because: A) one must be able to check the output of a CASE tool. B) there are rarely legitimate alternatives from which to choose. C) CASE tools can model any situation. D) CASE tools model hypothetical business problems.

one must be able to check the output of a CASE tool

A functional dependency in which one or more nonkey attributes are functionally dependent on part, but not all, of the primary key is called a ________ dependency. A) partial key-based B) partial functional C) cross key D) merged relation

partial function

________ database specification indicates all the parameters for data storage that are then input to database implementation. A) Logical B) Physical C) Schematic D) Conceptual

physical

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.

primary key

A rule that states that each foreign key value must match a primary key value in the other relation is called the: A) referential integrity constraint. B) key match rule. C) entity key group rule. D) foreign/primary match rule.

referential integrity constraint

Which of the following violates the atomic property of relations? A) Sam B) Hinz C) Sam Hinz D) Atomic

sam hinz

A two-dimensional table of data sometimes is called a: A) group. B) set. C) declaration. D) relation.

relation

The columns of a relation can be interchanged without changing the meaning or use of the relation.

true

A relation in fifth normal form may not contain any anomalies.

true

When two or more attributes describe the same characteristic of an entity, they are synonyms.

true

The relational data model does, at this time, directly support subtype/supertype relationships.

false

________ are anomalies that can be caused by editing data in tables. A) Insertion B) Deletion C) Modification D) Creation

modification

A composite key consists of only one attribute.

false

Explain what a candidate key is and how it might be used.

A candidate key is an attribute or a combination of attributes that uniquely identifies a row in a relation. A candidate key must be nonredundant and must also uniquely identify each row. When we look at functional dependencies and candidate keys, we can always say that a determinant is always a candidate key.

Discuss when it is best to create a surrogate key for an associative entity.

A surrogate key should be created when any of the following conditions hold: there is a composite primary key, the natural primary key is inefficient (such as a long name) or the natural primary key is recycled. When you have an associative entity, it is often best to use a surrogate key when you have more than two relations that the associative entity is related to, since the primary key would be a composite of the primary keys of all entities related to the associative entity.

Discuss the two major occasions when you benefit from using normalization.

During logical database design, normalization is used as a check and balance to make sure that your E-R diagram is correct as well as your relational schema before doing physical design. Another occasion when you benefit is reverse-engineering an older system, since many of the tables and user views are redundant.

A co-dependency is a constraint between two attributes or two sets of attributes.

false

The entity integrity rule states that a primary key attribute can be null.

false

62) When transforming a weak entity, one should create one relation with both the attributes of the strong entity and the attributes of the weak entity.

false

A foreign key is a primary key of a relation that also is a primary key in another relation.

false

When transforming a one-to-one relationship, a new relation is always created.

galse

Two or more attributes having different names but the same meaning are called: A) homonyms. B) aliases. C) synonyms. D) alternate attributes.

synonyms

Data is represented in the form of: A) data trees. B) tables. C) data notes. D) chairs.

tables

A candidate key must satisfy all of the following conditions EXCEPT: A) the key must uniquely identify the row. B) the key must indicate the row's position in the table. C) the key must be nonredundant. D) each nonkey attribute is functionally dependent upon it.

the key must indicate the row's position in the table

A functional dependency between two or more nonkey attributes is called a: A) partial functional dependency. B) partial nonkey dependency. C) transitive dependency. D) partial transitive dependency.

transitive dependency

A candidate key is an attribute, or combination of attributes, that uniquely identifies a row in a relation.

true

A cascading delete removes all records in other tables associated with the record to be deleted.

true

A partial functional dependency is a functional dependency in which one or more nonkey attributes are functionally dependent on part (but not all) of the primary key.

true

A referential integrity constraint is a rule that maintains consistency among the rows of two relations.

true

A well-structured relation contains minimal redundancy and allows users to manipulate the relation without errors or inconsistencies.

true

All values that appear in a column of a relation must be taken from the same domain.

true

If an identifier is not assigned, the default primary key for an associative relation consists of the two primary key attributes from the other two relations.

true

One property of a relation is that each attribute within a relation has a unique name.

true

In the SQL language, the ________ statement is used to make table definitions. A) create session B) create table C) create index D) select

create table

________ is a component of the relational data model included to specify business rules to maintain the integrity of data when they are manipulated. A) Business rule constraint B) Data integrity C) Business integrity D) Data structure

data integrity

Discuss how to map a unary one-to-many relationship.

The entity type in the unary relationship is mapped to a relation in the same way as we did for a relation. We next add a foreign key attribute, which maps back to the primary key. This is called a recursive foreign key. So, if we had a relation such as a person supervises one or more persons, the person_id would be a primary key and then there would be a supervisor id which points back to the person_id.

Discuss why it is important to remove multivalued attributes from a relation.

A multivalued attribute is one that can take on more than one value. According to the definition of a relation, there can be no multivalued attributes. The reason for this will be seen later when the schema is normalized. A multivalued attribute can be resolved by creating a separate instance for each value and repeating the data from the non-multivalued attributes.

Discuss the various relational keys.

A primary key uniquely identifies each row of a relation (or table). It can be either a single column or a composite of two or more columns, which is called a composite key. A foreign key allows us to represent the relationship between two tables. A foreign key in one table is generally a reference to a primary key in another table.

How do you convert weak entities to relations?

A weak entity becomes a relation. However, since a weak entity instance does not exist by itself, we must create a relation with the primary key from the strong relation as the primary key, as well as the identifying attribute.

What is an anomaly, and what are the three types of anomalies?

An anomaly is an error or inconsistency that may result when a user attempts to update a table that contains redundant data. There are three types of anomalies. An insert anomaly occurs when a user attempts to enter new information for part of a table. For example, if we stored customer address with an order. A deletion anomaly occurs when the user wants to delete part of a record but also has to delete related data. A modification anomaly occurs when we have to change the same data in multiple places.

Discuss how you would map a regular entity to a relation.

Each regular entity is transformed into a relation. There are a couple of things that need to be done with some special types of attributes. Composite attributes are broken down into their individual components. Multivalued attributes are broken down into separate relations. For example, if there was a multivalued skill attribute, this would become a skill relation. Also, we ignore derived attributes.

Discuss the properties of relations.

Each relation (or table) has a unique name. An entry at the intersection of each row and column is atomic and each row is unique. Each attribute (or column) within a table has a unique name. The sequence of rows and columns is insignificant.

Discuss the types of integrity constraints.

The three major types of integrity constraints are domain constraints, entity integrity and referential integrity. A domain is a set of attributes assigned to an attribute and consists of the domain name, data type, size and allowable values. The entity integrity rule is designed to ensure that every relation has a primary key and that the data values for the primary key are valid (in particular, not null). The referential integrity constraint is a rule that maintains consistency among the rows of two relations. If there is a foreign key in one relation, there must be a matching primary key in the other relation or the foreign key must be null.

List and explain 1st, 2nd, 3rd, BCNF, 4th, and 5th normal forms.

There are six different normal forms, all of which build upon each other. When a relation is in first normal form, all repeating groups have been removed. Second normal form means that any partial functional dependencies have been removed. A partial functional dependency occurs when a primary key is a composite key and a nonkey attribute is dependent upon part of the key. A relation is in third normal form when all transitive dependencies have been resolved. A transitive dependency occurs when one nonkey attribute is dependent upon another nonkey attribute. Boyce-Codd normal form removes any further dependencies that may result from anomalies. A relation is in fourth normal form when any dependencies from multivalued attributes have been removed. Fifth normal form removes any further anomalies.

Discuss the two possible scenarios when mapping an associative entity.

There are two possible cases for associative entities. In one case, you can have an identifier assigned. You would then use this as the primary key. The other case is where the identifier is not assigned. In this case, you would use the primary keys from the other two (or more) relations that are related to the associative entity.

Discuss how to map a unary many-to-many relationship.

Two relations are created. One represents the entity type in the relationship, and the other is an associative relation to represent the M:N relationship. The primary key of the associative relation consists of two attributes which take their value from the primary key of the other relation.

Discuss why it is a good idea to create an instance of your relational schema with sample data.

Using sample data allows you to test any assumptions that you may have regarding the design. In addition, it provides a convenient way to check the accuracy of your design and helps to improve communication with users. A final benefit is that you will be able to develop prototype applications and sample queries with the data.

Explain how subtype/supertype relationships are converted to relations.

When we have a supertype/subtype relationship, we need to assign one entity for the supertype and one for each subtype. The supertype has all attributes common to all subtypes as well as a primary key. Each subtype relation has the primary key of the supertype as well as any attributes that are specific to that subtype. Finally, we assign one or more attributes to the supertype to function as subtype discriminators.

An alternative name for an attribute is called a(n): A) synonym. B) alias. C) alternate attribute. D) related characteristic.

alias

A primary key whose value is unique across all relations is called a(n): A) global primary key. B) inter-table primary key. C) enterprise key. D) foreign global key.

enterprise key

The normal form which removes any remaining functional dependencies because there was more than one primary key for the same nonkeys is called: A) fifth normal form. B) fourth normal form. C) Boyce-Codd normal form. D) sixth normal form.

boyce-codd normal form

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.

composite key

When a regular entity type contains a multivalued attribute, one must: A) create a single relation with multiple lines for each instance of the multivalued attribute. B) create two new relations, one containing the multivalued attribute. C) create two new relations, both containing the multivalued attribute. D) delete the relation and start over.

create two new relations, one containing the multivalued attribute

________ problems are encountered when removing data with transitive dependencies. A) Insertion B) Modification C) Deletion D) Merging

deletion

A nonkey attribute is also called a(n): A) column. B) unimportant datum. C) descriptor. D) address.

descriptor

The attribute on the left-hand side of the arrow in a functional dependency is the: A) candidate key. B) determinant. C) foreign key. D) primary key.

determinant

Which of the following is NOT a reason to create an instance of a relational schema with sample data? A) Sample data can be used to improve user communications. B) Sample data can be used for prototype generation. C) Sample data can reverse database implementation errors. D) Sample data provide a convenient way to check the accuracy of your design.

sample data can reverse database implementation errors

A relation that contains no multivalued attributes and has nonkey attributes solely dependent on the primary key but contains transitive dependencies is in which normal form? A) First B) Second C) Third D) Fourth

second

A primary key is an attribute that uniquely identifies each row in a relation.

true

Data structures include data organized in the form of tables with rows and columns.

true

Sample data are useful for developing prototype applications and for testing queries.

true

The allowable range of values for a given attribute is part of the domain constraint.

true

View integration is the process of merging relations together.

true

When a regular entity type contains a multivalued attribute, two new relations are created.

true

When normalizing, the goal is to decompose relations with anomalies to produce smaller, well-structured relations.

true

A relation that contains minimal redundancy and allows easy use is considered to be: A) clean. B) simple. C) complex. D) well-structured.

well-structured


Set pelajaran terkait

Chapter 3: Cost-Volume-Profit Relationships

View Set

THEMATISCHE WOORDENSCHAT FRANS : 2.HET MENSELIJK LICHAAM

View Set

Assignment #7: Texas Governor and the Executive Department

View Set

ECO 473 Test Bank 1, ECO473 - EXAM #2, ECO 473 Test Bank 3

View Set

Impacting Oranizational Capability - Change Management

View Set

Udemy Practice Test answers PenTest+

View Set

ALEC 606 Foundations in Leadership Theory

View Set

Political Science 103 Final Spring 16

View Set