Which of the following types of relationship will you create between both tables to accomplish the task?

You work as a Database Designer for Tech Perfect Inc. The company has a Windows Vista-based
computer with Microsoft Office 2010 installed on it. The computer has a database named Database1
created in Microsoft Office Access 2010. The database includes two tables named Table-A and TableB. You want to divide Table-A with many columns and isolate a part of Table-A for security reasons.
Which of the following types of relationship will you create between both tables to accomplish the task?

You work as a Database Designer for Tech Perfect Inc. The company has a Windows Vista-based
computer with Microsoft Office 2010 installed on it. The computer has a database named Database1
created in Microsoft Office Access 2010. The database includes two tables named Table-A and TableB. You want to divide Table-A with many columns and isolate a part of Table-A for security reasons.
Which of the following types of relationship will you create between both tables to accomplish the task?

A.
Many-to-many relationship

B.
One-to-one relationship

C.
One-to-many relationship

D.
Container managed relationship

Explanation:
In order to accomplish the task, you should create a one-to-one relationship between Table-A and
Table-B. 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 C 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 A 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 D 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:
1.One-to-one
2.One-to-many
3.Many-to-many
The relationship fields in the bean class are represented using the abstract get and set methods.



Leave a Reply 0

Your email address will not be published. Required fields are marked *