Chap 2
Chap 2
Chapter#2
Q1: What is the difference between a Record and a Field?
Field: One or more characters treated as a single data item is called a field i.e., Roll No, Name,
Class, and Section, of student in a record.
Record: A collection of related fields treated as a single unit is called a record.
Q2: Define an attribute. Give an example.
One or more characters treated as a single data item is called a field i.e., Roll No, Name, Class,
and Section, of student in a record. Fields are termed as data items, attributes, or columns in
database structures.
Q3: What are the properties of a relation?
There are some properties of a relation:
No duplicate rows exist
The order of Rows is insignificant
The order of Columns is insignificant
Columns/Attributes are all Elemental or Atomic
Q4: Define the term table or relation.
A table is also called a two-dimensional array of data. It contains descriptive information about
an entity. Entity is anything about which you want to store data in the database.
Q5: How would you differentiate between tables and views?
A table is also called a two-dimensional array of data. It contains descriptive information about
an entity. Whereas, View is a virtual table created by using SQL (Structures Query Language).
The purpose of using views is to keep the data safe and secure from unauthorized and illegal
users.
Q6: What is the purpose of using views?
The purpose of using views is to keep the data safe and secure from unauthorized and illegal
users.
Q7: What is key? OR Define key/field.
In a database, keys are attributes or combinations of attributes that are used to retrieve data
records (rows) from the tables according to the requirement.
Q8: Define candidate key.
All the attributes with unique properties in a relation that can be used as the primary key are
called candidate keys. A table can have multiple candidate keys, but only one of them is chosen
to be the primary key.
Q9: Distinguish between the primary key and the foreign key.
Primary Key
• A relation can have only one primary key.
• Each value in the primary key attribute must be unique.
• Primary key cannot contain null values.
• Foreign key
• A relation can have more than one foreign key.
• Each value in the foreign key attribute may or may not be unique.
• Foreign key can contain null values.
Q10: Differentiate between the candidate key and alternate key.
Candidate Key
All the attributes with unique properties in a relation that can be used as the primary key are
called candidate keys. A table can have multiple candidate keys, but only one of them is chosen
to be the primary key.
Alternate Key
A table can have multiple candidate keys, but only one of them is chosen to be the primary key.
The remaining candidate keys that are not selected as primary keys are called alternate keys.
Q11: Differentiate between primary key and secondary key.
Primary Key
An attribute or a combination of attributes that uniquely identifies a row or a record in a relation
is called a primary key.
Secondary Key
A secondary key is a non-unique field that is used or that can be used to retrieve records. One
secondary key value may refer to many records.
Q12: What is the purpose of a foreign key?
A foreign key is used to establish a relationship between two tables/ relations.
Q13: Explain the concept of "fixed-length fields" with an example.
A fixed-length field contains a predefined number of characters (bytes). The data entered in a
fixed-length field cannot exceed the allocated length of the field, resulting in the wastage of
storage space. For example, if a field called "Country" is specified as fixed-length with 20
characters, it will always occupy 20 characters on the disk. If the user enters only 8 characters,
the remaining 12 spaces will be filled with blank spaces.
Q14: List the properties or characteristics of relations in a relational database.
The properties of relations in a relational database are:
No Duplicate Rows Exist
The Order of Rows is Insignificant
The Order of Columns is Insignificant
Columns/Attributes are all Elemental or Atomic
Q15: Define an "index" in the context of a database management system.
An index is a data structure used by a Database Management System (DBMS) to locate a
particular record in a file more quickly. It improves the efficiency of sorting and searching
operations by providing a way to access specific records without scanning the entire dataset.
Indexes can be created on primary keys, secondary keys, foreign keys, and other attributes.
Q16: List different types of keys.
• Primary Key
• Secondary Key
• Candidate Key
• Alternate Key
• Composite/Concatenate Key
• Sort/Control Key
• Foreign Key
Q17: Describe the role of a Data Administrator (DA) in an organization.
A Data Administrator (DA) is responsible for managing an organization's data. They develop
functional requirements for databases, set data standards, supervise data distribution, and act as a
liaison between users and IT staff.
Q18: What are the primary responsibilities of a Database Administrator (DBA)?
A Database Administrator (DBA) is responsible for designing, implementing, managing, and
maintaining databases. They must possess technical expertise in databases and handle complex
software and hardware issues. DBAs also ensure database security, access rights, and
performance optimization.