CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Why are data types important?
A. They control valid values, storage, and operations
B. They remove the need for tables
C. They automatically create every query
D. They prevent all hardware failures
Correct Answer: A
Data types define what kind of values a field may hold and which operations are valid.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which statement about NULL and zero is correct?
A. They are different
B. They are always identical
C. NULL is always larger
D. Zero cannot be stored
Correct Answer: A
Zero is an actual numeric value, while NULL means no known or applicable value is present.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
What does NULL represent in a database?
A. A missing, unknown, or not applicable value
B. The number zero
C. An empty table only
D. A guaranteed false value
Correct Answer: A
NULL represents the absence of a known value; it is not the same as zero or an empty string.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which data type is suitable for exact monetary values?
A. DECIMAL
B. IMAGE
C. BOOLEAN
D. DATE
Correct Answer: A
DECIMAL or NUMERIC stores exact fixed-precision values and is suitable for money.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which data type commonly stores true or false values?
A. BOOLEAN
B. VARCHAR
C. DATE
D. DECIMAL
Correct Answer: A
BOOLEAN represents logical values such as TRUE and FALSE.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which data type is intended to store calendar dates?
A. DATE
B. INTEGER
C. BOOLEAN
D. CHAR only
Correct Answer: A
DATE stores date values in a format the DBMS can validate, sort, and calculate.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which data type usually stores fixed-length text?
A. CHAR
B. VARCHAR
C. FLOAT
D. DATE
Correct Answer: A
CHAR stores text using a fixed defined length, often padding shorter values.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which data type is normally used for variable-length text?
A. VARCHAR
B. INTEGER
C. DATE
D. BINARY only
Correct Answer: A
VARCHAR stores text with varying length up to a defined maximum.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which data type is normally used for whole numbers?
A. INTEGER
B. VARCHAR
C. DATE
D. BOOLEAN
Correct Answer: A
INTEGER stores whole numbers without a fractional part.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A temporary name given to a table in a query is especially useful for:
A. Self joins and shorter references
B. Deleting the database server
C. Formatting a hard disk
D. Creating passwords automatically
Correct Answer: A
Table aliases make queries shorter and allow the same table to be referenced more than once.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which statement about a candidate key is correct?
A. It uniquely identifies a row and contains no unnecessary attribute
B. It must always contain every column
C. It may identify many rows with the same value
D. It cannot become a primary key
Correct Answer: A
A candidate key is both unique and minimal.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
The primary key is selected from the available:
A. Candidate keys
B. Foreign keys
C. Reports
D. Views
Correct Answer: A
A table may have several candidate keys, and one is selected as the primary key.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which table commonly resolves a many-to-many relationship?
A. Junction table
B. Report table only
C. Backup table
D. Temporary view only
Correct Answer: A
A junction table contains foreign keys referencing the two related tables.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
If Table A has 4 rows and Table B has 3 rows, a CROSS JOIN returns:
A. 12 rows
B. 7 rows
C. 4 rows
D. 3 rows
Correct Answer: A
A Cartesian product contains 4 × 3 = 12 row combinations.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
Which clause normally specifies the condition used to connect tables in a join?
A. ON
B. AS
C. ORDER
D. VALUES
Correct Answer: A
The ON clause defines how rows from the participating tables are matched.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
CRUD stands for:
A. Create, Read, Update, Delete
B. Copy, Run, Undo, Display
C. Create, Replace, Upload, Download
D. Connect, Read, Use, Disconnect
Correct Answer: A
CRUD represents the four basic data operations: Create, Read, Update, and Delete.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
What is a possible disadvantage of adding many indexes?
A. INSERT, UPDATE, and DELETE operations may become slower
B. SELECT becomes impossible
C. The database cannot use keys
D. All tables become views
Correct Answer: A
Indexes require storage and must be maintained whenever indexed data changes.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
What is a major purpose of a database index?
A. To speed up data retrieval
B. To delete all records
C. To replace the primary key in every case
D. To remove the DBMS
Correct Answer: A
An index provides a faster path for locating rows, especially in frequently searched columns.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
A virtual table based on a stored SELECT statement is called a:
A. View
B. Index
C. Trigger
D. Backup
Correct Answer: A
A view presents query results like a table without necessarily storing the data separately.
CSS - PMS - CCE - PCS - Basic Computing
Database Basics
The EXISTS operator is true when a subquery:
A. Returns at least one row
B. Returns no columns
C. Deletes a table
D. Creates a backup
Correct Answer: A
EXISTS evaluates to true when the subquery produces one or more rows.