EXAM PRE-ASSESSMENT AND OBJECTIVE ASSESMENT |
ACTUAL EXAM QUESTIONS AND CORRECT ANSWERS
2025/2026
1. Which column should be designated as the primary key for the Patient table?
- first_name
- last_name
- birthdate - patient_id patient_id
2. The Exam table has the following columns:
exam_id int exam_date date exam_reason
varchar(100) patient_number int
2. Which column should be designated as the foreign key for the Exam table?
- exam_id
- exam_date
- exam_reason - patient_id patient_id
4. Which data type represents numbers with fractional values:
- varchar
- integer
- binary - decimal decimal
Which column should be designated the primary key for the Package table?
- Weight
- Description
- LastChangedDate
- TrackingNumber
Tracking Number
5. Which of the following is a DDL (Data Definition Language) command?
- INSERT
- SELECT
- CREATE INDEX - UPDATE
,CREATE INDEX
CREATE, ALTER, DROP
6. Which of the following is a DML (Data Manipulation Language) command?
- CREATE VIEW
- CREATE TABLE
- INSERT
- ALTER INDEX
INSERT
Which data type will store "2022-01-10 14:22:12" as a temporal value without loss of
information? - DATE
- DATETIME
- DECIMAL
- BIGINT
DATETIME
7. Patient Table
PK patient id
first name last
name birthdate
Exam Table PK
exam id exam
date exam
reason
FK patient id
CREATE TABLE Exam (
exam_id INT NOT NULL AUTO_INCREMENT,
exam_date DATE NOT NULL, exam_reason
VARCHAR(100), patient_id INT NOT NULL,
PRIMARY KEY (exam_id),
FOREIGN KEY (patient_id) REFERENCES Patient (patient_id) ON DELETE CASCADE
);
What would happen to exams in the Exam table that are linked to a patient if that patient is
deleted?
,- Those exams would remain in the database
- Those exams would be deleted also
- The Patient ID for those exams would be changed to NULL - Nothing would happen
Those exams would be deleted also
8. Patient Table
PK patient id
first name last
name birthdate
Exam Table PK
exam id exam
date exam
reason
FK patient id
CREATE TABLE Exam (
exam_id INT NOT NULL AUTO_INCREMENT,
exam_date DATE NOT NULL,
exam_reason VARCHAR(100),
patient_id INT NOT NULL,
PRIMARY KEY (exam_id),
FOREIGN KEY (patient_id) REFERENCES Patient (patient_id) ON DELETE RESTRICT
);
How many attributes are present in the address fragment?
-1
-2-3
-4
3 2. The Patient table has the following
columns:
first_name varchar(20)
last_name varchar (30)
birthdate date
patient_id int
What would happen to exams in the Exam table that are linked to a patient if that patient is
deleted.
, - Those invoices would remain in the database
- Those invoices would be deleted also
- The Customer ID for those invoices would be changed to NULL
- The delete of the Customer would not be allowed
The delete of the Customer would not be allowed
9.
Patient Table
PK patient id
first name last
name
birthdate
Exam Table PK
exam id exam
date exam
reason
FK patient id
CREATE TABLE Exam (
exam_id INT NOT NULL AUTO_INCREMENT,
exam_date DATE NOT NULL, exam_reason
VARCHAR (100), patient_id INT NOT NULL,
PRIMARY KEY (exam_id),
FOREIGN KEY (patient_id) REFERENCES Patient (patient _id) ON DELETE SET TO
NULL );
what would happen to exams in the Exam table that are linked to a patient if that patient is
deleted.
Those invoices would remain in the database.
Those invoices would be deleted also.
The Customer ID for those invoices would be changed to NULL.
The delete of the Customer would not be allowed.
The Customer ID for those invoices would be changed to NULL