Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
741 Which candidate key should normally become the primary key?
A
The one that is simplest, most stable and most often used in joins
B
The longest one
C
The one with the most columns
D
The one entered last
Explanation
The primary key should be the candidate that is shortest, stable, non-null and convenient for referencing from other tables.
Last verified on 27-11-2026
742 A designer is choosing between a 13-digit national ID and an auto-number as the primary key for a large table with many child tables. What is the strongest argument for the auto-number?
A
It is more meaningful to users
B
It is shorter, stable and faster to use as a foreign key in many child tables
C
It can be remembered easily
D
It is always unique in every country
Explanation
A short numeric surrogate key is copied into every child table, so it keeps foreign keys small and joins fast compared with a long text or numeric natural key.
Last verified on 27-11-2026
743 What is a superkey?
A
A key that is always a primary key
B
A key that links three tables
C
Any set of columns that uniquely identifies a row, even if it has extra columns
D
A key that can contain nulls
Explanation
A superkey uniquely identifies rows, but unlike a candidate key it may contain unnecessary extra columns.
Last verified on 27-11-2026
744 What is the difference between a superkey and a candidate key?
A
A superkey must be a single column
B
A superkey is always a primary key
C
A candidate key can contain nulls
D
A candidate key is a minimal superkey with no unnecessary columns
Explanation
A candidate key is a superkey from which no column can be removed without losing uniqueness, while a superkey may have redundant columns.
Last verified on 27-11-2026
745 Which of the following is a candidate key in a table with columns (CNIC, Email, Phone, Name) where CNIC and Email are each unique?
A
CNIC and Email are each candidate keys
B
Phone only
C
Name only
D
CNIC plus Name
Explanation
Each attribute that is unique on its own can serve as a primary key, so CNIC and Email are both candidate keys.
Last verified on 27-11-2026
746 A table has candidate keys A and B. A is chosen as the primary key. What is B called?
A
A foreign key
B
An alternate key
C
A composite key
D
A weak key
Explanation
A candidate key not chosen as the primary key is called an alternate key.
Last verified on 27-11-2026
747 What is a one-to-one relationship in a database?
A
One row in table A relates to many rows in table B
B
Many rows in table A relate to many rows in table B
C
One row in table A relates to exactly one row in table B, and vice versa
D
One row relates to itself
Explanation
In a one-to-one relationship each row on one side matches at most one row on the other side.
Last verified on 27-11-2026
748 Which real-world example best shows a one-to-one relationship?
A
A customer and their many orders
B
A student and their many courses
C
A teacher and their many students
D
A country and its capital city
Explanation
Each country has one capital city and each capital city belongs to one country, which is a one-to-one pairing.
Last verified on 27-11-2026
749 Which real-world example best shows a one-to-many relationship?
A
A department and its employees
B
A person and their passport
C
A husband and wife
D
A car and its engine
Explanation
One department can have many employees, while each employee belongs to one department, which is one-to-many.
Last verified on 27-11-2026
750 Which real-world example best shows a many-to-many relationship?
A
A person and their birth certificate
B
Students and the courses they enrol in
C
A country and its capital
D
An employee and their manager
Explanation
One student takes many courses and one course has many students, so the relationship is many-to-many.
Last verified on 27-11-2026