You are on page 1of 13

RDMS

Relational Database Management System


[Learn and Share with Friends]
Database
Here we speak in the context of Excel in which we spent countless
hours on our manufacturing operation.

• Database consists of tables, where each table consists of rows and


columns.
• Tables are the lists that you normally used to keep BOM, AVL, etc.
• Row is a single record, whereas columns are fields (i.e. part number,
description, qper, etc.)
Database
Relational Database Management System aka RDMS gives rise to
modern and advanced features.

• “Relational” here means how each table related to each other.


• In the context of Excel, we always use “vlookup” to look up for item
from another list(s).
• In RDMS, we have “View” which is a virtual table that get all its data
from other tables. It is formed due to a functional need.
Database
Example of View: Costed BOM.

• 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”

(3. You define what to


do in SQL)
Database

The blue fonts are


fields affected by
“Update” event.
Old and new are
keywords for
previous and
current values.
Database
Actual table automatically updated by trigger
Note: you have to define a table for keeping changes first

 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!

You might also like