CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A property that describes an entity is called an:
A. Attribute
B. Transaction
C. Procedure
D. Backup
Correct Answer: A
An attribute is a characteristic of an entity, such as StudentName or DateOfBirth.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
In ER modeling, an object or concept about which data is stored is called an:
A. Entity
B. Attribute
C. Query
D. Index
Correct Answer: A
An entity is a person, place, object, event, or concept represented in a database.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
The number of possible records participating in a relationship is called:
A. Cardinality
B. Redundancy
C. Validation
D. Aggregation
Correct Answer: A
Cardinality describes whether a relationship is one-to-one, one-to-many, or many-to-many.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A many-to-many relationship is normally implemented using a:
A. Junction table
B. Single text field
C. Printed report
D. Backup file
Correct Answer: A
A junction or bridge table stores the keys of both related tables and resolves the many-to-many relationship.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A relationship in which many students take many courses is:
A. One-to-one
B. One-to-many
C. Many-to-many
D. Unary only
Correct Answer: C
Many students can take many courses, creating a many-to-many relationship.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A relationship in which one department has many employees is:
A. One-to-one
B. One-to-many
C. Many-to-many
D. Zero-to-zero
Correct Answer: B
One department can be associated with many employees, while each employee belongs to one department.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A relationship in which one record in Table A relates to one record in Table B is:
A. One-to-one
B. One-to-many
C. Many-to-many
D. No relationship
Correct Answer: A
A one-to-one relationship connects each record on one side with at most one record on the other side.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A child record that refers to a missing parent record is called an:
A. Orphan record
B. Master record
C. Primary record
D. Index record
Correct Answer: A
An orphan record contains a foreign-key reference for which no matching parent record exists.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
What does ON DELETE CASCADE do?
A. Deletes related child rows when the parent row is deleted
B. Deletes the entire database server
C. Prevents all queries
D. Creates a backup automatically
Correct Answer: A
ON DELETE CASCADE automatically removes dependent child records when the referenced parent record is deleted.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A restriction that limits the valid values of an attribute is known as a:
A. Domain constraint
B. Join condition
C. Report filter
D. Backup rule
Correct Answer: A
A domain constraint limits values according to data type, range, format, or an allowed set.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which constraint automatically supplies a value when none is provided?
A. DEFAULT
B. PRIMARY KEY
C. FOREIGN KEY
D. HAVING
Correct Answer: A
The DEFAULT constraint inserts a predefined value when an explicit value is not supplied.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which constraint checks whether a value satisfies a specified condition?
A. CHECK
B. DROP
C. SELECT
D. UNION
Correct Answer: A
A CHECK constraint allows only values that satisfy a defined logical condition.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which constraint prevents a field from being left empty with NULL?
A. NOT NULL
B. DEFAULT
C. GROUP BY
D. ORDER BY
Correct Answer: A
NOT NULL requires a value to be provided for the field.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which constraint prevents duplicate values in a column or group of columns?
A. UNIQUE
B. DEFAULT
C. CHECK
D. ORDER BY
Correct Answer: A
The UNIQUE constraint ensures that duplicate values are not stored in the constrained column or columns.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
The rule that every table row must have a unique, non-NULL primary key is called:
A. Entity integrity
B. Network integrity
C. Report integrity
D. File integrity
Correct Answer: A
Entity integrity ensures that each row is uniquely identifiable by a valid primary key.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
The rule that foreign-key values must match valid referenced values is called:
A. Referential integrity
B. Visual integrity
C. File integrity
D. Display integrity
Correct Answer: A
Referential integrity prevents invalid references between related tables.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Can the same foreign-key value appear in multiple rows?
A. Yes
B. No, never
C. Only in a primary-key column
D. Only when the table is empty
Correct Answer: A
Foreign-key values may repeat because many child records can reference the same parent record.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Can a primary key contain NULL values?
A. Yes, in every row
B. No
C. Only in text fields
D. Only after sorting
Correct Answer: B
A primary key cannot contain NULL because every row must have a valid unique identifier.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which property is required for a primary key?
A. Its values must be unique
B. Its values must always be repeated
C. It must contain images
D. It must be a date
Correct Answer: A
Primary-key values must be unique so that each row can be identified separately.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A key based on meaningful real-world data is called a:
A. Natural key
B. Surrogate key
C. Temporary key
D. Index key
Correct Answer: A
A natural key uses existing business data, such as a national identity number, to identify a record.