NCERT Solutions

12. For the given database STUDENT-PROJECT, answer the following:
(a) Name primary key of each table.
(b) Find foreign key(s) in table PROJECT-ASSIGNED.

a) Name primary key of each table.b) Find foreign key(s) in table PROJECT-ASSIGNED.c) Is there any alternate key in table STUDENT? Give justification for your answer.d) Can a user assign duplicate value to the field RollNo of STUDENT table? Justify. Ans:(a) Table Primary key Student Registration_ID Project ProjectNo Project_assigned – (b) Registration_ID and ProjectNo(c) Yes, […]

12. For the given database STUDENT-PROJECT, answer the following:
(a) Name primary key of each table.
(b) Find foreign key(s) in table PROJECT-ASSIGNED.
Read More »

School uniform is available at M/s Sheetal Private Limited. They have maintained SCHOOL_UNIFORM Database with two relations viz. UNIFORM and COST. The following figure shows database schema and its state.

(a) Can they insert the following tuples to the UNIFORM Relation? Give reasons in support of your answer.(i) 7, Handkerchief, NULLAns: Yes, it can be inserted as UColor does not have Not Null constraint.(ii) 4, Ribbon, RedAns: No, it cannot be inserted as UCode is Primary key and 4 is already existing and so we

School uniform is available at M/s Sheetal Private Limited. They have maintained SCHOOL_UNIFORM Database with two relations viz. UNIFORM and COST. The following figure shows database schema and its state. Read More »

An organization wants to create a database EMPDEPENDENT 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? Ans: (a) AadharNumber, EmployeeID (b) To retrieve the

An organization wants to create a database EMPDEPENDENT to maintain following details about its employees and their dependent.
EMPLOYEE (AadharNumber, Name, Address, Department, EmployeeID)
DEPENDENT (EmployeeID, DependentName, Relationship)
Read More »

The school canteen wants to maintain records of items available in the school canteen and generate bills when students purchase any item from the canteen. The school wants to create a canteen database to keep track of items in the canteen and the items purchased by students. Design a database by answering the following questions:

a) To store each item name along with its price, what relation should be used?Decide appropriate attribute names along with their data type. Each item and its price should be stored only once. What restriction should be used while defining the relation?Ans: We will create new relation BILL to keep bill details as per the

The school canteen wants to maintain records of items available in the school canteen and generate bills when students purchase any item from the canteen. The school wants to create a canteen database to keep track of items in the canteen and the items purchased by students. Design a database by answering the following questions: Read More »

A school has a rule that each student must participate in a sports activity. So each one should give only one performance for sport activity. Suppose there are five students in a class, each having a unique roll number. The class representative has prepared a list of sports preferences as shown below. Answer the following:

a) Roll no 24 may not be interested in sports. Can a NULL value be assigned to that student’s preferences field? Ans: Yes, a NULL value can be assigned. b) Roll no 17 has given two preferences sports. Which property of relational DBMS is violated here? Can we use any constraint or key in the

A school has a rule that each student must participate in a sports activity. So each one should give only one performance for sport activity. Suppose there are five students in a class, each having a unique roll number. The class representative has prepared a list of sports preferences as shown below. Answer the following: Read More »

What are the limitations of file system that can be overcome by a relational DBMS?

The limitation if file systems that can be overcome by a relational DBMS are: Data Redundancy: redundancy means repetition of same data in different tables. Redundancy leads to excess data storage and may cause data inconsistency. Data Inconsistency: When same data is managed differently in different places leads to data inconsistency. Data inconsistency creates unreliable

What are the limitations of file system that can be overcome by a relational DBMS? Read More »

Differentiate between Primary key and Foreign key

Primary Key Foreign Key It identifies the each record in a table uniquely. It maintains the relation between two tables. A foreign key is primary key in another related table. A table can have only one Primary key. A table can have more than one Foreign key. Primary key cannot have NULL values. Foreign key

Differentiate between Primary key and Foreign key Read More »

Why foreign keys are allowed to have NULL values? Explain with an example.

Foreign Key is used to represent the relation between two tables. Because in the field with Foreign key attribute data comes from Primary key field in another related table and so Foreign key are allowed to have Null Values if it not the part of Primary key field of the related table. For example- Here

Why foreign keys are allowed to have NULL values? Explain with an example. Read More »

error: Content is protected !!