A distributor stores warehouse assignments in a database table. AssignmentID uniquely identifies each row. Every column requires a value, and the combination of WarehouseID and ProductID must be unique: the same product may appear in different warehouses, but a warehouse cannot have two rows for that product.
Each batch below starts independently from this original table:
AssignmentID
WarehouseID
ProductID
R10
W1
P7
R20
W2
R30
P8
Each batch runs as one transaction. The DBMS checks constraints immediately after each statement. If a statement violates a constraint, the application stops the batch and rolls back all its changes. Otherwise, the application commits after the final statement. No other transactions run.
Complete the table with each batch's outcome and the values stored after it finishes. Use exactly commit or rollback for the outcome, and copy identifiers exactly.
Unlock full course notes by signing up
Keeping a report compatible
A distributor's reporting application reads a customer email field named ContactEmail. Database developers rename the underlying field to EmailAddress. They provide a database view that exposes EmailAddress under the old name ContactEmail and preserves the other columns the report expects. The report is changed only to read that view and continues working.
Which explanation best describes the benefit illustrated?
Changing values or changing structure
A wholesaler makes two database changes. Complete each classification using the full category name: data definition language or data manipulation language.
Changing the stored reorder level from 15 to 20 in an existing product row uses ________.
Adding a new reorder-level column to the product table uses ________.
Preventing concurrent overbooking
A shuttle has 12 seats and 11 committed reservations. Capacity is fixed, and there are no cancellations during the following events. Each reservation transaction counts existing reservations and inserts a new reservation only if that count is below capacity. The check and insertion are already inside one atomic transaction.
Under the current isolation setting, two overlapping transactions both find one available seat and commit separate reservations. Reservation identifiers are unique. Which change directly addresses this concurrency problem?
Reviewing a database setup
An equipment rental company is reviewing its database setup. Each physical asset has a manufacturer-issued serial number that the company requires to be present and unique across its asset records. Inventory clerks may update asset descriptions but may not manage database permissions or delete audit records.
The proposed setup has these features:
One data-entry form checks for missing or duplicate serial numbers. An import tool can also add asset records, and the database has no serial-number constraints.