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.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A system-generated identifier with no business meaning is called a:
A. Surrogate key
B. Natural key
C. Composite attribute
D. Report key
Correct Answer: A
A surrogate key is an artificial identifier such as an auto-incrementing number.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A field that refers to a key in another table is called a:
A. Foreign key
B. Candidate key
C. Primary file
D. Calculated field
Correct Answer: A
A foreign key creates a relationship by referencing a key, usually a primary key, in another table.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A key made of two or more fields is called a:
A. Composite key
B. Natural key
C. Foreign key
D. Temporary key
Correct Answer: A
A composite key uses multiple columns together to uniquely identify a record.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A candidate key that is not selected as the primary key is called an:
A. Alternate key
B. External key
C. Weak key
D. Sort key
Correct Answer: A
An alternate key is a candidate key that was not chosen to be the table's primary key.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Any field or combination of fields that uniquely identifies a record is called a:
A. Super key
B. Foreign key
C. Data type
D. Report
Correct Answer: A
A super key uniquely identifies a record but may contain unnecessary additional attributes.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A minimal field or combination of fields that can uniquely identify a record is called a:
A. Candidate key
B. Foreign key
C. Secondary file
D. Default value
Correct Answer: A
A candidate key is a minimal set of attributes capable of uniquely identifying a row.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which key uniquely identifies each record in a table?
A. Primary key
B. Foreign key
C. Sort key
D. Display key
Correct Answer: A
A primary key uniquely identifies every record in a table.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which statement best describes an RDBMS?
A. It manages related tables using keys and constraints
B. It is used only to edit images
C. It cannot store structured data
D. It has no support for queries
Correct Answer: A
An RDBMS manages data in related tables and enforces relationships through keys and constraints.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which of the following is an RDBMS?
A. MySQL
B. Microsoft Paint
C. Adobe Reader
D. Windows Calculator
Correct Answer: A
MySQL is a relational database management system. The other choices are not database systems.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A column-family database is designed to organize data by:
A. Groups of related columns
B. Paper files
C. Video frames
D. Operating system folders
Correct Answer: A
Column-family databases group related columns and are useful for large, distributed datasets.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A graph database represents data mainly using:
A. Nodes and edges
B. Pages and paragraphs
C. Rows and printers
D. Files and folders only
Correct Answer: A
Graph databases represent entities as nodes and relationships as edges.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A key-value database stores data as:
A. Pairs of keys and associated values
B. Rows without columns
C. Printed tables only
D. Images without names
Correct Answer: A
A key-value store associates each unique key with a corresponding value.