MANAGEMENT CERTIFICATION SCRIPT
2026 QUESTIONS WITH SOLUTIONS
GRADED A+
◍ Referential Integrity.
Answer: A relational rule that requires foreign key values are either fully
NULL or match some primary key value.
◍ 54. Using the Model_Types table in the E-R diagram above, write a query to
find the highest model fee..
Answer: SELECT MAX(fee)FROM Models;
◍ Query.
Answer: A request to retrieve or change data in a database. Typically inserts
new data, retrieves data, updates, data, or deletes data from a database.
◍ Sparse Index.
Answer: What type of index am I?Contains an entry for every table block.
◍ Data Control Language (DCL).
Answer: What language am I?Commands that CONTROL a database.
Includes administering privileges and committing data.
◍ Horizontal Partition.
Answer: What type of partition am I?A subset of table rows.
◍ Foreign Key.
Answer: What a primary key from one table is called when it is referenced
in another table. Important when starting to build relationships between
tables. Refers to a primary key.
,◍ How would a database engine process an update that violates a RESTRICT
referential integrity constraint?- The offending value would be set to the
database default.- The update would be rejected by the database.- The
offending value would be changed to NULL. - The updated value would
flow to the primary key..
Answer: The update would be rejected by the database.
◍ 7. Patient TablePK patient idfirst namelast namebirthdate Exam TablePK
exam idexam dateexam reason FK patient idCREATE 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.
Answer: Those exams would be deleted also
◍ 44. PATIENT TABLEPK patient_idfirst namelast namebirthdateEXAM
TABLE PK exam_idexam dateexam reasonFK patient_idWrite the
CREATE TABLE statement to create the Exam table below. Make sure to
designate the primary key and foreign key of the table..
Answer: CREATE TABLE Exam (exam_id INT, exam_date DATE,
exam_reason VARCHAR(255),, patient_id INT,PRIMARY KEY
(exam_id),FOREIGN KEY (patient_id) REFERENCES Patient (patient_id)
);
◍ 48. Write a query to list customers from Chicago or Seattle..
Answer: SELECT *FROM CustomerWHERE City = 'Chicago' OR City =
'Seattle';
◍ Relation.
Answer: A NAMED set of tuples, all drawn from the same sequence of
domains.
,◍ LIKE operator.
Answer: When used in a WHERE clause, this operator matches text against
a pattern using the two wildcard characters "%" and "_".
◍ CASCADE.
Answer: Propagates primary key changes to foreign keys.
◍ INNER JOIN.
Answer: Selects ONLY matching left and right table rows.
◍ Query Processor.
Answer: Interprets queries, creates a plan to modify the database or retrieve
the data, and returns query results to the application. Performs query
optimization.
◍ Transaction.
Answer: A group of queries that MUST be completed or rejected as a whole.
◍ SELECT.
Answer: Retrieves data from a table.
◍ Table scan.
Answer: A database operation that reads table blocks directly, without
accessing an index.
◍ 34. Which kind of relationship is displayed in the entity-relationship
diagram below?- Binary one-to-one- Unary many-to-many- Ternary
one-to-one- Binary one-to-many- Unary one-to-one.
Answer: Binary one-to-many
◍ Data Type.
Answer: Indicates the TYPE of data that can be stored in a field of a
column.
◍ CROSS-JOIN.
Answer: Combines two tables WITHOUT comparing columns.
◍ 46. Write a query to count the number of customers in each city
, CUSTOMER TABLE Customer ID First NameLast Name Address
CityStateZip.
Answer: SELECT City, COUNT (*)FROM CustomerORDER BY City;
◍ Weak Entity.
Answer: This entity doesn't have an identifying attribute. Usually has a
relationship called an identifying relationship, to another entity, called an
identifying entity.
◍ 39. MODELS TABLE
model_idlnamebirtdatemodel_type_idMODEL_TYPEmodel_type_idhourly_feeWhi
query would produce a result set that listed all of the Model Types,
regardless of whether a model was assigned to that type.- SELECT
model_id, lname, Models.model_type_id, hourly_fee FROM ModelsRIGHT
JOIN Model_TypeON Models.model_type_id =
Model_Type.model_type_id;- SELECT model_id, lname,
Models.model_type_id, hourly_fee FROM ModelsLEFT JOIN
Model_TypeON Models.model_type_id = Model_Type.model_type_id;-
SELECT model_id, lname, Models.model_type_id, hourly_fee FROM
ModelsINNER JOIN Model_TypeON Models.model_type_id =
Model_Type.model_type_id;- SELECT model_id, lname,
Models.model_type_id, hourly_fee FROM ModelsNATURAL JOIN
Model_TypeON Models.model_type_id = Model_Type.model_type_id;.
Answer: SELECT model_id, lname, Models.model_type_id, hourly_fee
FROM ModelsRIGHT JOIN Model_TypeON Models.model_type_id =
Model_Type.model_type_id;
◍ 30. A(n) _____ is a query that is embedded (or nested) inside another
query.- alias - operator - subquery - view.
Answer: subquery
◍ ER Diagram.
Answer: A schematic picture of entities, relationships, and attributes.
◍ Non-key.
Answer: This is a column that is NOT contained in a candidate key.