Notes Questions and Answers Definition
Notes Questions and Answers Definition
Ans: Data is raw facts and figures that are stored in the database. Example: 1,2,3, A, B,
C, Ram, Rita, etc.
2) What is information?
Ans: Information is the processed and meaningful data. Example: There are 45
students in a class room, Ram is a student, etc.
3) What is database?
Ans: A database is a collection of related data which helps to get, add, delete and
update data efficiently. Examples: Student Database, Bank database, Teacher
database, etc.
1 Ram 14
2 Sita 15
The DBA ensures that the database is available, performs well, is secure, and is backed
up properly.
Example: In a college database, only teachers can access the student records, students
can access their own record.
9) Define key, primary key, candidate key, alternate key, composite key,
super key.
Ans:
Key
a. Primary Key
Example:
101 Ram 14
102 Sita 15
b. Candidate Key
• A Candidate Key is any attribute (or group of attributes) that can uniquely
identify a record.
Example:
Both Roll_No and Email are candidate keys because both can uniquely identify a
student.
c. Super Key
• A Super Key is a set of one or more attributes that can uniquely identify a
record.
• It includes all candidate keys and any combination that includes them.
Example:
• {Roll_No}
• {Email}
• {Roll_No, Email}
• An Alternate Key is a candidate key that is not chosen as the primary key.
• It can still uniquely identify a record but is used as an alternative to the primary
key.
Example:
Student_ID (Primary Key) Email (Alternate Key) Name
Here, Student_ID is the primary key, and Email is an alternate key because it also
uniquely identifies students but is not chosen as the primary key.
e. Composite key:
• Individually, the attributes in a composite key may not be unique, but their
combination must be unique.
Example:
Enrollment Table:
101 CSE101 A
101 MTH102 B
102 CSE101 A
Here:
Example:
In a Student table:
Student_ID Name Age
101 Ram 14
102 Sita 15
Example:
In a Student table:
101 Ram 14
102 Sita 15
a) Entity
b) Relationship:
a) Centralized Database System: All the data is stored and managed in a single
location.
b) Distributed Database System: Data is stored across multiple locations.