What are the requirements that two relations must satisfy to be considered union-compatible?

Ch03 The Relational Database Model

1

Chapter 3

The Relational Database Model

Answers to Review Questions

1. What is the difference between a database and a table?

A table, a logical structure that represents an entity set, is only one of the components of a database.

The database is a structure that houses one or more tables and metadata. The metadata are data about data.

Metadata include the data (attribute) characteristics and the relationships between the entity sets.

2. What does it mean to say that a database displays both entity integrity and referential integrity?

Entity integrity describes a condition in which all tuples within a table are uniquely identified by their primary

key. The unique value requirement prohibits a null primary key value, because nulls are not unique.

Referential integrity describes a condition in which a foreign key value has a match in the corresponding table

or in which the foreign key value is null. The null foreign key value makes it possible not to have a

corresponding value, but the matching requirement on values that are not null makes it impossible to have an

invalid value.

3. Why are entity integrity and referential integrity important in a database?

Entity integrity and referential integrity are important because they are the basis for expressing and

implementing relationships in the entity relationship model. Entity integrity ensures that each row is uniquely

identified by the primary key. Therefore, entity integrity means that a proper search for an existing tuple (row)

will always be successful. (And the failure to find a match on a row search will always mean that the row for

which the search is conducted does not exist in that table.) Referential integrity means that, if the foreign key

contains a value, that value refers to an existing valid tuple (row) in another relation. Therefore, referential

integrity ensures that it will be impossible to assign a non-existing foreign key value to a table.

4. What are the requirements that two relations must satisfy in order to be considered union-

compatible?

In order for two relations to be union-compatible, both must have the same number of attributes (columns) and

corresponding attributes (columns) must have the same domain. The first requirement is easily identified be

a cursory glance at the relations' structures. If the first relation has 3 attributes then the second relation must

also have 3 attributes. If the first table has 10 attributes, then the second relation must also have 10 attributes.

The second requirement is more difficult to assess and requires understanding the meanings of the attributes

in the business environment. Recall that an attribute's domain is the set of allowable values for that attribute.

To satisfy the second requirement for union-compatibility, the first attribute of the first relation must have the

same domain as the first attribute of the second relation. The second attribute of the first relation must have

the same domain as the second attribute of the second relation. The third attribute of the first relation must

have the same domain as the third attribute of the second relation, and so on.

5. Which relational algebra operators can be applied to a pair of tables that are not union-compatible?

The Product, Join, and Divide operators can be applied to a pair of tables that are not union-compatible. Divide

does place specific requirements on the tables to be operated on; however, those requirements do not include

union-compatibility. Select (or Restrict) and Project are performed on individual tables, not pairs of tables.

(Note that if two tables are joined, then the result is a single table and the Select or Project operator is

performed on that single table.)

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

What does it mean to say that a relational database displays both entity integrity and referential integrity?

What does it mean to say that a database displays both entity integrity and referential integrity? Answer: Entity integrity describes a condition in which all tuples within a table are uniquely identified by. their primary key. The unique value requirement prohibits a null primary key value, because nulls are not.

What does it mean to say that a database displays both entity integrity and referential integrity quizlet?

Entity integrity in databases is a condition where the rows in all of the tables can be uniquely identified using the primary key of its corresponding table. Referential integrity in databases is a condition in which every reference to an entity instance by another entity instance is valid.

Why the database designer's database is at times described as the data dictionary?

Explain why the data dictionary is sometimes called "the database designer's database." Because it contains metadata relating to the datatypes used and sizes as well has the relations in the database.

What does it mean to say that a database displays referential integrity?

Referential integrity refers to the relationship between tables. Because each table in a database must have a primary key, this primary key can appear in other tables because of its relationship to data within those tables. When a primary key from one table appears in another table, it is called a foreign key .

Toplist

Neuester Beitrag

Stichworte