Primary Key and Data Types MCQs
Primary Key and Data Types MCQs
Class: 8 | Subject: Computer Science
Section 10: Database Concepts
Board: CBSE (As per NCERT Syllabus)
Designed strictly as per NCERT guidelines for CBSE Class 8 Examination standard.
1. What is a Primary Key in a database?
Correct Answer: B
A Primary Key uniquely identifies each record in a table. No two records can have the same primary key value. It prevents duplication and ensures data integrity.
A Primary Key uniquely identifies each record in a table. No two records can have the same primary key value. It prevents duplication and ensures data integrity.
2. Which of the following can be a Primary Key?
Correct Answer: B
Roll Number is unique for every student. A primary key must have unique and non-null values. Names and marks can repeat, so they are not suitable.
Roll Number is unique for every student. A primary key must have unique and non-null values. Names and marks can repeat, so they are not suitable.
3. Can a Primary Key contain NULL values?
Correct Answer: B
Primary Key cannot contain NULL values because it must uniquely identify each record.
Primary Key cannot contain NULL values because it must uniquely identify each record.
4. Which data type is used to store whole numbers?
Correct Answer: B
Integer data type stores whole numbers without decimal points, such as 5, 10, or 100.
Integer data type stores whole numbers without decimal points, such as 5, 10, or 100.
5. Which data type is best for storing names?
Correct Answer: C
Names contain alphabets and sometimes spaces. Therefore, Text (or String) data type is used.
Names contain alphabets and sometimes spaces. Therefore, Text (or String) data type is used.
6. Boolean data type stores:
Correct Answer: B
Boolean stores logical values like True/False or Yes/No.
Boolean stores logical values like True/False or Yes/No.
7. Which data type is used to store calendar dates?
Correct Answer: A
Date data type stores information like 12/08/2025 and helps in sorting and calculations related to dates.
Date data type stores information like 12/08/2025 and helps in sorting and calculations related to dates.
8. A table can have how many Primary Keys?
Correct Answer: C
A table can have only one primary key. However, it can consist of multiple fields combined (composite key).
A table can have only one primary key. However, it can consist of multiple fields combined (composite key).
9. Which data type stores decimal numbers?
Correct Answer: A
Float or Decimal type stores numbers with decimal points like 45.67.
Float or Decimal type stores numbers with decimal points like 45.67.
10. Why is Primary Key important?
Correct Answer: B
Primary Key prevents duplication and ensures every record is unique.
Primary Key prevents duplication and ensures every record is unique.
