AND PRE ASSESSMENT ACTUAL TEST QUESTIONS
AND CORRECT DETAILED ANSWERS VERSION
|GUARANTEED PASS A+ WITH REVISDED
RATIONALES
DATABASE & SQL — QUESTIONS, ANSWERS, AND RATIONALES
ADDRESS ATTRIBUTES
Q1: San Francisco, CA 94110, USA — How many attributes are present?
Answer: 4
Rationale:
Attributes = City, State, ZIP code, Country.
Q2: Portland, OR 97212 — How many attributes are present?
Answer: 3
Rationale:
City, State, ZIP code.
KEYS (PRIMARY & FOREIGN)
Q3: Which column should be the primary key for the Package table?
Answer: TrackingNumber
Rationale:
A primary key must be unique and stable. Weight, description, and date can repeat.
Q4: Which column is the primary key for the Patient table?
Answer: patient_id
Rationale:
Names and birthdates are not unique; patient_id uniquely identifies each patient.
, Q5: Which column should be the foreign key in the Exam table?
Answer: patient_id
Rationale:
It links each exam to a patient in the Patient table.
DATA TYPES
Q6: Which data type stores "2022-01-10 14:22:12" without loss?
Answer: DATETIME
Rationale:
DATE loses time; DATETIME stores both date and time.
Q7: Which data type represents numbers with fractional values?
Answer: DECIMAL
Rationale:
Supports precise numeric values with decimals.
Q8: Which data type allows storage of dates?
Answer: DATE / TIMESTAMP
Rationale:
Designed specifically for temporal values.
DDL vs DML
Q9: Which command is DDL?
Answer: CREATE INDEX
Rationale:
DDL defines or changes database structure (CREATE, ALTER, DROP).
Q10: Which command is DML?