Professional Documents
Culture Documents
• It takes data from BOM (table) as well as data from Price(table) to form
Costed BOM(a view) by multiplying part price with its quantity.
• When you update quantity in BOM (or/and buying price in Price), the
costed BOM is affected accordingly.
• With Costed BOM(view), you don’t have to update by keying in the
new data in the view, they are linked by the relations defined in the
View, where they get the updated/refreshed data from tables.
Database
Columns (or fields) in database is quite powerful, some useful data
types are:
• Timestamp: it automatically creates a time stamp when you create a new
row/record
• Auto increment: increase the number by 1 automatically.
• Date/ characters / numbers: it ensures correct data type entered by user.
• {other enforcement rule} to ensure right data is entered or give a default value.
Database
Other than data, it also manages users which is not limited to username and
password. It manages what users can do to particular database (next slide).
Database
Example of table structure:
Database
Here , it says the user can
do all these, including
delete
Database
Trigger
• You are concerned with traceability, who changes what, and when it happened,
Or perhaps why?
• Trigger is a feature in many database systems to give you an audit trail of your
data.
• For MySQL as an example, it can trigger an action associated with update, delete
and insert of your tables. You can setup another table, which records any event of
update, delete or insert for table of interest (the table you want to track changes).
• See next 3 slides for how.
Database
1. Give you
trigger a
name
2. If you want
to monitor
BOM for any
“insert”
When ETA (estimating arrival date) was updated, it records both old and new ETA before
“Update” action
Auto time stamp Who
Database
Please feedback
Thank You!