- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
Classify the following statements according to static or dynamic integrity constraints, based on the database that is to be created in the thread https://mathhelpboards.com/threads/creating-tables-integrity-constraints.29157/.
1. A customer's discount may not exceed 50 percent.
2. The discount of a foreign customer may not be more than 30 percent.
3. A customer's discount may be increased by a maximum of 10 percent within a year.
4. The status of a paid order must never change again.
5. The average discount for all customers must not exceed 30 percent.
6. The status of an order may only change to "delivered". The status of a delivered order only in "paid".
7. The total value of all products in the same warehouse cannot exceed 1 million euros.
8. There has to be at least one product
9. The invoice amount for an order is the product of the price and the ordered quantity of the ordered product minus the customer discount.
10. A customer's balance is the (negative) sum of the invoice sums for all orders placed by the customer that have not yet been paid for.
11. A customer's discount must never be reduced.
12. Orders will no longer be accepted from customers whose balance is below -100,000 euros.I haven't really understood how we know if one constraint is static or dynamic. Is a static constraint something that holds because of the description of an attribute of a table and a dynamic constraint is something that holds because we decided these constraints ? :unsure: Would it be then as follows ?
1 : dynamic integrity constraint
2 : dynamic integrity constraint
3 : dynamic integrity constraint
4 : static integrity constraint
5 : dynamic integrity constraint
6 : static integrity constraint
7 : dynamic integrity constraint
8 : static integrity constraint
9 : static integrity constraint
10 : static integrity constraint
11 : dynamic integrity constraint
12 : dynamic integrity constraint
:unsure:
Classify the following statements according to static or dynamic integrity constraints, based on the database that is to be created in the thread https://mathhelpboards.com/threads/creating-tables-integrity-constraints.29157/.
1. A customer's discount may not exceed 50 percent.
2. The discount of a foreign customer may not be more than 30 percent.
3. A customer's discount may be increased by a maximum of 10 percent within a year.
4. The status of a paid order must never change again.
5. The average discount for all customers must not exceed 30 percent.
6. The status of an order may only change to "delivered". The status of a delivered order only in "paid".
7. The total value of all products in the same warehouse cannot exceed 1 million euros.
8. There has to be at least one product
9. The invoice amount for an order is the product of the price and the ordered quantity of the ordered product minus the customer discount.
10. A customer's balance is the (negative) sum of the invoice sums for all orders placed by the customer that have not yet been paid for.
11. A customer's discount must never be reduced.
12. Orders will no longer be accepted from customers whose balance is below -100,000 euros.I haven't really understood how we know if one constraint is static or dynamic. Is a static constraint something that holds because of the description of an attribute of a table and a dynamic constraint is something that holds because we decided these constraints ? :unsure: Would it be then as follows ?
1 : dynamic integrity constraint
2 : dynamic integrity constraint
3 : dynamic integrity constraint
4 : static integrity constraint
5 : dynamic integrity constraint
6 : static integrity constraint
7 : dynamic integrity constraint
8 : static integrity constraint
9 : static integrity constraint
10 : static integrity constraint
11 : dynamic integrity constraint
12 : dynamic integrity constraint
:unsure:
Last edited by a moderator: