Skip to content
Exercises · Q9

Q.An organisation wants to create a database EMP-DEPENDENT to maintain following details about its employees and their dependent.
EMPLOYEE(AadharNumber, Name, Address, Department, EmployeeID)
DEPENDENT(EmployeeID, DependentName, Relationship)

(a) Name the attributes of EMPLOYEE, which can be used as candidate keys.
(b) The company wants to retrieve details of dependent of a particular employee. Name the tables and the key which are required to retrieve this detail.
(c) What is the degree of EMPLOYEE and DEPENDENT relation?
Tamil Nadu DgeTextbookSubjective· 4mImportance★★★★★
34% · 10/29 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

This solution identifies candidate keys for the EMPLOYEE table, specifies the tables and keys needed to retrieve dependent details, and states the degree (number of attributes) for both the EMPLOYEE and DEPENDENT relations.

When designing a relational database, understanding concepts like keys and relation properties is fundamental. Keys are crucial for uniquely identifying records and establishing relationships between tables, while properties like degree help describe the structure of a table.

(a) Name the attributes of EMPLOYEE, which can be used as candidate keys.

A candidate key is an attribute or a set of attributes that can uniquely identify each tuple (row) in a relation (table) and is minimal, meaning no proper subset of it can also uniquely identify tuples.

Let's examine the attributes of the EMPLOYEE table: EMPLOYEE(AadharNumber, Name, Address, Department, EmployeeID).

  1. AadharNumber: In India, an Aadhar Number is designed to be a unique identifier for every individual. Therefore, AadharNumber can uniquely identify each employee. Since it's a single attribute, it is inherently minimal.
  2. EmployeeID: This attribute is explicitly named EmployeeID, which strongly suggests it is an identifier assigned by the organization to each employee. Such identifiers are typically unique within the organization. Assuming this uniqueness, EmployeeID can also uniquely identify each employee. As a single attribute, it is also minimal.
  3. Name, Address, Department: These attributes, individually or in combination (without AadharNumber or EmployeeID), cannot guarantee unique identification for every employee. For instance, multiple employees might have the same name, live at the same address, or work in the same department.

Therefore, the attributes that can serve as candidate keys for the EMPLOYEE table are AadharNumber and EmployeeID.

(b) The company wants to retrieve details of dependent of a particular employee. Name the tables and the key which are required to retrieve this detail.

To retrieve details of a dependent for a specific employee, we need to link information from two different tables: EMPLOYEE and DEPENDENT.

  • The EMPLOYEE table contains details about the employees, including their EmployeeID.
  • The DEPENDENT table contains details about dependents, and crucially, it includes EmployeeID to link each dependent back to their respective employee.

The common attribute between these two tables is EmployeeID. In the EMPLOYEE table, EmployeeID acts as a primary key (or at least a candidate key), uniquely identifying each employee. In the DEPENDENT table, EmployeeID acts as a foreign key, referencing the EmployeeID in the EMPLOYEE table. This foreign key relationship is precisely what allows us to connect a dependent to their employee. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.