Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
means that a given value of uniquely determines the corresponding value of .
Question 2 of 60 · Fully functional dependency · Easy
When is an attribute fully functionally dependent on a composite key?
Not quite. Try another option.
Answer: It depends on the entire composite key
A fully functional dependency requires every attribute in the composite key to determine the dependent attribute.
Question 3 of 60 · Transitive dependency · Easy
Which set of dependencies demonstrates a transitive dependency?
Not quite. Try another option.
Answer: and
If determines and determines , then indirectly determines through .
Question 4 of 60 · Concept of normalization · Easy
What is the main purpose of database normalization?
Not quite. Try another option.
Answer: To reduce data redundancy
Normalization organizes data to reduce unnecessary duplication and prevent modification anomalies.
Question 5 of 60 · First normal form · Easy
Which requirement must a table satisfy to be in First Normal Form (1NF)?
Not quite. Try another option.
Answer: Each field contains an atomic value
In 1NF, every field contains a single, indivisible value, and repeating groups are removed.
Question 6 of 60 · Second normal form · Easy
A table is in Second Normal Form (2NF) when it is in 1NF and has no:
Not quite. Try another option.
Answer: Partial dependencies
A 2NF table has no non-key attribute that depends on only part of a composite key.
Question 7 of 60 · Third normal form · Easy
A table is in Third Normal Form (3NF) when it is in 2NF and has no:
Not quite. Try another option.
Answer: Transitive dependencies
In 3NF, non-key attributes must not depend on other non-key attributes.
Question 8 of 60 · Introduction to transactions · Easy
What is a database transaction?
Not quite. Try another option.
Answer: A logical unit of database work
A transaction groups one or more database operations into a single logical unit of work.
Question 9 of 60 · Read and write operations on transactions · Easy
What does a read operation do in a transaction?
Not quite. Try another option.
Answer: Retrieves a data value
A read operation obtains a value from the database without changing that value.
Question 10 of 60 · Read and write operations on transactions · Easy
What does a write operation do in a transaction?
Not quite. Try another option.
Answer: Stores or changes a data value
A write operation updates a value in the database or stores a new value.
Question 11 of 60 · States and stages of a transaction · Easy
Which state indicates that a transaction is currently executing its operations?
Not quite. Try another option.
Answer: Active
A transaction remains in the active state while its instructions are being executed.
Question 12 of 60 · States and stages of a transaction · Easy
Which transaction state indicates that all changes have been saved successfully?
Not quite. Try another option.
Answer: Committed
A committed transaction has completed successfully, and its changes are permanently saved.
Question 13 of 60 · ACID properties of a transaction · Easy
Which ACID property ensures that all transaction operations occur or none occur?
Not quite. Try another option.
Answer: Atomicity
Atomicity treats a transaction as an indivisible unit: it either completes fully or is rolled back.
Question 14 of 60 · ACID properties of a transaction · Easy
Which ACID property ensures that committed changes survive a system failure?
Not quite. Try another option.
Answer: Durability
Durability guarantees that committed changes remain stored even after a crash or power failure.
Question 15 of 60 · Introduction to PL/SQL block structure · Easy
Which section of a PL/SQL block contains executable statements?
Not quite. Try another option.
Answer: BEGIN section
Executable PL/SQL statements are placed between the BEGIN and END keywords.
Question 16 of 60 · Introduction to PL/SQL block structure · Easy
Which section of a PL/SQL block is used to handle runtime errors?
Not quite. Try another option.
Answer: EXCEPTION section
The EXCEPTION section contains handlers for errors raised while the block executes.
Question 17 of 60 · Implementation of operators in PL/SQL · Easy
Which PL/SQL operator is used to assign a value to a variable?
Not quite. Try another option.
Answer: :=
PL/SQL uses the := operator to assign a value to a variable.
Question 18 of 60 · Implementation of control statements in PL/SQL · Easy
Which PL/SQL statement selects between actions based on a condition?
Not quite. Try another option.
Answer: IF
The IF statement executes different code depending on whether a condition is true or false.
Question 19 of 60 · Implementation of procedures in PL/SQL · Easy
Which keywords begin the definition of a stored PL/SQL procedure?
Not quite. Try another option.
Answer: CREATE PROCEDURE
A stored procedure is defined using CREATE PROCEDURE, usually followed by its name and parameters.
Question 20 of 60 · Implementation of functions in PL/SQL · Easy
What must a PL/SQL function provide to its caller?
Not quite. Try another option.
Answer: A return value
A PL/SQL function uses a RETURN statement to provide a value of its declared return type.
Question 21 of 60 · Functional dependency · Medium
For relation , the functional dependencies are , , and . What is the closure ?
Not quite. Try another option.
Answer:
and give . Once and are known, gives .
Question 22 of 60 · Functional dependency · Medium
Given , which functional dependency is implied by ?
Not quite. Try another option.
Answer:
Because and , transitivity implies .
Question 23 of 60 · Fully functional dependency · Medium
In Enrollment(StudentID, CourseID, Grade), the key is (StudentID, CourseID). If neither StudentID nor CourseID alone determines Grade, which statement is correct?
Not quite. Try another option.
Answer: Grade is fully dependent on the composite key
Grade requires the entire composite key and cannot be determined by either proper subset.
Question 24 of 60 · Fully functional dependency · Medium
Relation has composite key and dependencies and . What does this show about ?
Not quite. Try another option.
Answer: It is not fully functional because determines
Since the proper subset already determines , the dependency on is partial rather than full.
Question 25 of 60 · Transitive dependency · Medium
In Employee(EmpID, DeptID, DeptName), suppose EmpID determines DeptID and DeptID determines DeptName. Which dependency is transitive?
Not quite. Try another option.
Answer: EmpID determines DeptName
EmpID determines DeptName through the intermediate non-key attribute DeptID.
Question 26 of 60 · Concept of normalization · Medium
A department name is repeated in every employee row. Changing the department name requires modifying many rows. Which database design problem is illustrated?
Not quite. Try another option.
Answer: An update anomaly
Repeated data must be updated in multiple places, creating a risk of inconsistent values.
Question 27 of 60 · First normal form · Medium
A Student table stores the value Java, Python, SQL in one Skills column. Which change best brings the design into First Normal Form?
Not quite. Try another option.
Answer: Store each student-skill pair as a separate row
First Normal Form requires atomic values. A separate student-skill relation stores one skill per row.
Question 28 of 60 · Second normal form · Medium
OrderLine(OrderID, ProductID, OrderDate, ProductName, Quantity) has key (OrderID, ProductID). Also, OrderID determines OrderDate, and ProductID determines ProductName. Which decomposition reaches Second Normal Form?
The decomposition removes both partial dependencies while retaining Quantity with the full composite key.
Question 29 of 60 · Third normal form · Medium
Employee(EmpID, DeptID, DeptName) has key EmpID, with EmpID determining DeptID and DeptID determining DeptName. Which decomposition removes the Third Normal Form violation?
Not quite. Try another option.
Answer: Employee(EmpID, DeptID) and Department(DeptID, DeptName)
Separating department details removes the transitive dependency from EmpID to DeptName.
Question 30 of 60 · Introduction to transactions · Medium
A bank transfer debits one account and credits another. How should these operations be organized?
Not quite. Try another option.
Answer: Place both updates in one transaction and commit afterward
Treating both updates as one transaction ensures that the complete transfer succeeds or fails as a unit.
Question 31 of 60 · Read and write operations on transactions · Medium
Two transactions execute this schedule on X, initially 100: T1: read(X), T2: read(X), T1: write(X=110), T2: write(X=120). What is the result?
Not quite. Try another option.
Answer: X becomes 120, and the update by T1 is lost
T2 writes using the old value it read and overwrites the value previously written by T1.
Question 32 of 60 · States and stages of a transaction · Medium
A transaction has executed its final statement, but the database has not yet guaranteed that its changes are permanently stored. What is its state?
Not quite. Try another option.
Answer: Partially committed
After the last statement but before successful durable completion, a transaction is partially committed.
Question 33 of 60 · ACID properties of a transaction · Medium
A system crashes after debiting an account but before crediting the destination account. Which ACID property requires the debit to be rolled back?
Not quite. Try another option.
Answer: Atomicity
Atomicity requires every operation in the transaction to complete or none of them to take effect.
Question 34 of 60 · ACID properties of a transaction · Medium
Transaction T1 updates a salary but has not committed. Transaction T2 must not see that temporary value. Which ACID property enforces this behavior?
Not quite. Try another option.
Answer: Isolation
Isolation prevents concurrent transactions from observing uncommitted intermediate changes.
Question 35 of 60 · Introduction to PL/SQL block structure · Medium
Consider a PL/SQL block whose SELECT INTO statement returns no rows and whose exception section contains WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.PUT_LINE('Missing');. What occurs?
Not quite. Try another option.
Answer: The exception handler prints Missing
SELECT INTO raises NO_DATA_FOUND when no row is returned, so the matching exception handler executes.
Question 36 of 60 · Implementation of operators in PL/SQL · Medium
What value is assigned by the PL/SQL statement v_result := 10 + NULL;?
Not quite. Try another option.
Answer: NULL
Arithmetic operations involving NULL normally produce NULL because the missing value is unknown.
Question 37 of 60 · Implementation of control statements in PL/SQL · Medium
Given v_score := 75, what is assigned to v_grade by IF v_score >= 80 THEN v_grade := 'A'; ELSIF v_score >= 60 THEN v_grade := 'B'; ELSE v_grade := 'C'; END IF;?
Not quite. Try another option.
Answer: 'B'
The first condition is false, but 75 >= 60 is true, so the ELSIF branch assigns 'B'.
Question 38 of 60 · Implementation of control statements in PL/SQL · Medium
A PL/SQL loop sets v_sum := 0 and runs FOR i IN 1..4 LOOP CONTINUE WHEN MOD(i, 2) = 0; v_sum := v_sum + i; END LOOP;. What is the final value of v_sum?
Not quite. Try another option.
Answer: 4
Even values are skipped, so only 1 and 3 are added, producing 4.
Question 39 of 60 · Implementation of procedures in PL/SQL · Medium
A procedure is declared as adjust_salary(p_id IN NUMBER, p_raise IN NUMBER, p_new_salary OUT NUMBER). Which call correctly supplies the OUT argument?
Not quite. Try another option.
Answer: adjust_salary(101, 500, v_salary); where v_salary is a variable
An OUT parameter must receive a writable variable so the procedure can return a value through it.
Question 40 of 60 · Implementation of functions in PL/SQL · Medium
A function is defined as FUNCTION annual_salary(p_monthly NUMBER) RETURN NUMBER IS BEGIN RETURN p_monthly * 12; END;. What does annual_salary(5000) return?
Not quite. Try another option.
Answer: 60000
The function multiplies the monthly salary by 12, so 5000 * 12 returns 60000.
Question 41 of 60 · Functional dependency · Hard
For relation , let . Which set contains all and only the candidate keys of ?
Not quite. Try another option.
Answer:
Each listed set determines all attributes and is minimal. For example, , while neither nor alone is a superkey.
Question 42 of 60 · Fully functional dependency · Hard
A relation has candidate key and exactly these relevant dependencies: , , and . Which dependency is fully functional on the composite key?
Not quite. Try another option.
Answer:
Neither component of the key determines alone. The other nontrivial dependencies depend on a proper subset, while the last dependency is trivial.
Question 43 of 60 · Transitive dependency · Hard
In , suppose and , with . How should the implied dependency be classified for normalization purposes?
Not quite. Try another option.
Answer: A transitive dependency through
determines through the non-key attribute . This is the transitive dependency that causes a 3NF violation when is non-prime.
Question 44 of 60 · Concept of normalization · Hard
Let have . Consider the decomposition , , and . Which assessment is correct?
Not quite. Try another option.
Answer: It is lossless but not dependency-preserving
The shared determinants prevent spurious combinations, so the join is lossless. However, cannot be enforced using only dependencies projected onto the three separate relations.
Question 45 of 60 · First normal form · Hard
An ORDER_DATA table stores ProductIDs as a comma-separated list in each order row. Which redesign establishes 1NF without imposing an arbitrary maximum number of products?
Not quite. Try another option.
Answer: Create an order-line row for each product occurrence
A separate order-line relation gives each product occurrence its own row and atomic attribute values. Text lists, arrays, and repeating numbered columns do not provide this relational 1NF design.
Question 46 of 60 · Second normal form · Hard
For , let . The candidate keys are and . Assuming atomic attributes, what is the highest normal form satisfied?
Not quite. Try another option.
Answer: 3NF but not BCNF
has no dependency on a proper subset of either candidate key, so 2NF holds. The dependencies and satisfy 3NF because their right sides are prime, but their determinants are not superkeys.
Question 47 of 60 · Third normal form · Hard
In with , the candidate keys are and . Why does satisfy the formal 3NF condition even though is not a superkey?
Not quite. Try another option.
Answer: is a prime attribute
For every nontrivial dependency , 3NF requires either to be a superkey or to be prime. Attribute is part of candidate key .
Question 48 of 60 · Introduction to transactions · Hard
Consider the schedule r1(X), w1(X), r2(Y), w2(Y), r1(Y), w1(Y), r2(X), w2(X). What does its precedence graph show?
Not quite. Try another option.
Answer: A cycle between and
Conflicts on produce , while conflicts on produce . The cycle means the schedule is not conflict-serializable.
Question 49 of 60 · Read and write operations on transactions · Hard
Initially, . Both transactions read before either writes. Then writes its computed value , and writes its computed value . What anomaly and final value result?
Not quite. Try another option.
Answer: Lost update, with final
writes a value calculated from the old value and overwrites 's update. The serial outcomes would be or , not .
Question 50 of 60 · States and stages of a transaction · Hard
A transaction executes its final statement, but a failure occurs before its commit record becomes durable. Recovery then completes its rollback. Which state sequence best describes this path?
After its final statement, the transaction is partially committed. The pre-commit failure moves it to failed, and successful rollback moves it to aborted.
Question 51 of 60 · ACID properties of a transaction · Hard
A write-ahead logging system forces all required log records, including the commit record, to stable storage before acknowledging a commit, but writes modified data pages later. Which conclusion is correct?
Not quite. Try another option.
Answer: Durability follows because committed changes can be redone
Once the commit and redo information are stable, recovery can reconstruct committed updates even if their data pages were not written before a crash.
Question 52 of 60 · Introduction to PL/SQL block structure · Hard
Assuming SERVEROUTPUT is enabled, what does this PL/SQL block print?
SQL
DECLARE
v NUMBER := 10;
BEGIN
DECLARE
v NUMBER := 0;
BEGIN
DBMS_OUTPUT.PUT_LINE(10 / v);
EXCEPTION
WHEN ZERO_DIVIDE THEN
DBMS_OUTPUT.PUT_LINE(v);
END;
DBMS_OUTPUT.PUT_LINE(v);
END;
Not quite. Try another option.
Answer: 0 followed by 10
The inner handler catches the division error and accesses the inner v, which is 0. After the nested block ends, the outer v, which is 10, becomes visible again.
Question 53 of 60 · Implementation of operators in PL/SQL · Hard
What is printed by this PL/SQL fragment?
SQL
DECLARE
a NUMBER := 5;
b NUMBER := NULL;
BEGIN
IF a <> 5 OR b = 3 THEN
DBMS_OUTPUT.PUT_LINE('A');
ELSIF b IS NULL AND a BETWEEN 1 AND 5 THEN
DBMS_OUTPUT.PUT_LINE('B');
ELSE
DBMS_OUTPUT.PUT_LINE('C');
END IF;
END;
Not quite. Try another option.
Answer: B, because the second condition is true
The first condition evaluates to NULL, which is not true. In the ELSIF, both b IS NULL and the inclusive BETWEEN condition are true.
Question 54 of 60 · Implementation of control statements in PL/SQL · Hard
What value is printed by this PL/SQL block?
SQL
DECLARE
i NUMBER := 1;
s NUMBER := 0;
BEGIN
LOOP
i := i + 1;
CONTINUE WHEN MOD(i, 2) = 0;
s := s + i;
EXIT WHEN i >= 5;
END LOOP;
DBMS_OUTPUT.PUT_LINE(s);
END;
Not quite. Try another option.
Answer: 8
Even values 2 and 4 skip both the addition and exit test. Values 3 and 5 are added, giving , and the loop then exits.
Question 55 of 60 · Implementation of procedures in PL/SQL · Hard
Without NOCOPY, what does this block print?
SQL
DECLARE
v NUMBER := 10;
PROCEDURE bump(p IN OUT NUMBER) IS
BEGIN
p := p + 1;
RAISE_APPLICATION_ERROR(-20001, 'stop');
END;
BEGIN
BEGIN
bump(v);
EXCEPTION
WHEN OTHERS THEN NULL;
END;
DBMS_OUTPUT.PUT_LINE(v);
END;
Not quite. Try another option.
Answer: 10, because copy-out does not occur
A normal IN OUT parameter uses copy-in/copy-out semantics. Because the procedure exits with an unhandled exception, the modified formal value is not copied back to v.
Question 56 of 60 · Implementation of functions in PL/SQL · Hard
A stored function invoked as SELECT adjust_salary(10) FROM dual executes an UPDATE statement and is neither autonomous nor otherwise exempted. What is the expected result?
Not quite. Try another option.
Answer: The query fails because a query-invoked function performs DML
Oracle ordinarily raises ORA-14551 when a function invoked from a SQL query attempts DML. A plain query-invoked function cannot perform that update.
Question 57 of 60 · Functional dependency · Hard
Given , which is a minimal equivalent cover?
Not quite. Try another option.
Answer:
is implied by and . In , attribute is extraneous because , so the dependency reduces to .
Question 58 of 60 · Concept of normalization · Hard
Using the minimal cover for , which relation set is produced by the standard dependency-preserving 3NF synthesis algorithm before optional removal of subsumed relations?
Not quite. Try another option.
Answer:
The synthesis algorithm creates one relation for each determinant and its dependent attribute. The result preserves all three dependencies and contains candidate key .
Question 59 of 60 · Introduction to transactions · Hard
Classify the schedule w1(X), r2(X), c1, c2, where r2(X) reads the value written by .
Not quite. Try another option.
Answer: Recoverable, but neither cascadeless nor strict
commits after the transaction whose value it read, so the schedule is recoverable. It reads before commits, making the schedule neither cascadeless nor strict.
Question 60 of 60 · Implementation of functions in PL/SQL · Hard
What occurs when f(0) is called for the following PL/SQL function?
SQL
CREATE OR REPLACE FUNCTION f(p NUMBER)
RETURN NUMBER IS
BEGIN
IF p > 0 THEN
RETURN p;
END IF;
END;
Not quite. Try another option.
Answer: It raises ORA-06503 at runtime
For p=0, control reaches the end of the function without executing RETURN. PL/SQL raises ORA-06503: function returned without value.
That's unit 6
Answer a few questions and your score shows up here.
Nearly through. Did unit 6 of INT322 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 6 of INT322 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.