77-885 · Question #13
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…
The correct answer is B. One-to-one relationship. 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…
Question
Options
- AMany-to-many relationship
- BOne-to-one relationship
- COne-to-many relationship
- DContainer managed relationship
How the community answered
(37 responses)- A8% (3)
- B76% (28)
- C14% (5)
- D3% (1)
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: The relationship fields in the bean class are represented using the abstract get and set methods.
Topics
Community Discussion
No community discussion yet for this question.