Question: Write your own implementation using Java and JDBC for demonstrating the Consistency property. While doing the product purchase, keep track of the numerical value under
Write your own implementation using Java and JDBC for
demonstrating the Consistency property. While doing the product
purchase, keep track of the numerical value under the quantity
column. If that numerical value becomes less than zero, then
the product cannot be purchased when the productid is
referenced. Similarly, if the numerical value under the quantity column
is less than that which was requested, the product cannot be purchased.
Further, address changes are not updated in the database, it results in
an inconsistent state.
There will be six different outputs in this consistency implementation
procedure.
a Address changes are updated in the database resulting in
consistency.
b Address changes are not updated in the database resulting in
inconsistency.
c Product can be purchased when the numerical value in the
quantity column is just enough to make the product purchase.
d Product cannot be purchased when the numerical value in the
quantity column is zero.
e Product cannot be purchased when the numerical value in the
quantity column is less than what was requested during the
purchase of a product.
f Id or Product id or customer id is incorrectly referenced, resulting
in referential integrity violation
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
