Exam4Training

Which of the following relationships will you build between both tables?

You have two tables named table1 and table2 in your database, which is stored in Microsoft Office Access 2007.

You have to perform the following tasks:

Divide table1 with many columns.

Isolate part of table1 for security reasons.

Store information that applies only to a subset of table2.

Which of the following relationships will you build between both tables?
A . One-to-many
B . Many-to-many
C . Container managed
D . One-to-one

Answer: D

Explanation:

You have two tables named table1 and table2 in Microsoft Office Access 2007. In order to perform the given tasks, you will build a one-to-one relationship between both tables.

This relationship provides functions to perform all these tasks.

What is a one-to-one relationship between common fields in a table?

A one-to-one relationship is an association between two tables in which each record in one table can have only one related record in another table. This type of relationship is not generally used because it is easier to shift all the fields in one table. A one-to-one relationship is created if both of the related fields are primary keys or have unique limitations.

A one-to-one relationship performs the following tasks:

• It divides a table with many columns.

• It isolates part of a table for security reasons.

• It stores short-lived data and deletes this data by deleting the table.

• It stores information that applies only to a subset of the main table.

Answer option A is incorrect. A one-to-many relationship is the most common type of relationship. In this type of relationship, a row in the first table can have one or more matching rows in the second table, but a row in second table can have only one matching row in the first table. For example, the States and Cities tables have a one-to-many relationship. Each state has many cities, but each city comes under only one state. A one-to-many relationship is created if the foreign key column does not have a unique constraint.

Answer option B is incorrect. A many-to-many relationship is an association in which two one-to-many relationships are connected together through a third table. This third table is called the junction table. A many-to-many relationship can be viewed in a database that contains Products, Orders, and Order Details tables. The Orders table and the Products table have a many-to-many relationship that is defined by creating two one-to-many relationships to the Order Details table. Each record in the Orders table has many records in the Products table and each record in the Products table has many records in the Orders table.

Answer option C is incorrect. Container-managed relationships (cmr) are relationships that exist between two entity beans within a local interface. The bean provider declares these relationships in the bean class, and the container implements the relationships using the information defined in the deployment descriptor.

There are three kinds of container-managed relationships as follows:

Exit mobile version