Computer Science
An organization wants to create two tables EMP & DEPENDENT to maintain the following details about its employees and their dependents.
EMPLOYEE(AadhaarNumber, 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 dependents of a particular employee. Name the tables and the key which are required to retrieve these detail.
(c) What is the degree of EMPLOYEE and DEPENDENT relation?
SQL Queries
1 Like
Answer
(a) In the EMPLOYEE table, the attributes AadharNumber and EmployeeID can be used as candidate keys. This means that either AadharNumber or EmployeeID can uniquely identify each record in the EMPLOYEE table.
(b) The EMPLOYEE and DEPENDENT tables are linked using the EmployeeID key, which is utilized to retrieve details of dependents associated with a specific employee.
(c) In the EMPLOYEE relation, there are five attributes, resulting in a degree of 5. Similarly, the DEPENDENT relation has three attributes, making its degree 3.
Answered By
2 Likes
Related Questions
Differentiate between DDL and DML commands.
Give the terms for each of the following:
(a) Collection of logically related records.
(b) The fundamental data storage unit in a relational database.
(c) Attribute that can uniquely identify the tuples in a relation.
(d) Special value that is stored when actual data value is unknown for an attribute.
(e) An attribute which can uniquely identify tuples of the table but is not defined as primary key of the table.
(f) Software that is used to create, manipulate and maintain a relational database.
What is a datatype ? Name some data types available in MySQL.
Compare Char and Varchar datatypes.