
May 31st, 2007, 05:13 AM
|
|
Registered User
|
|
Join Date: May 2007
Posts: 1
Time spent in forums: 19 m 19 sec
Reputation Power: 0
|
|
|
3 tables or 1 table?
There's a discussion regarding the best way to implement a table in SQL at work. Unfortunately no one here is really qualified in SQL (but we do have lots of Oracle and DB2 experience here).
The question is whether it's best to create one large table and update it 3 times or create 3 tables and update them individually. I'll try and explain.
We want a single unique ID. However we collect about 5 sets of data at different points of time. I'll use a parcel as an example.
Parcel collected by post office, creates Parcel ID, collection time, customer, delivery address.
Parcel delivered to sorting office, adding sort office number, time, any other info needed.
Parcel sent to recipient, adding vehicle id, eta, driver id etc.
Throughout the common factor is the parcel id, but for much of its life it means having lots of empty cells in the database.
So is it better practise to have 3 seperate tables linked on parcel id which only get filled in when the parcel arrives at that control point or have one large table and update the empty cells as and when needed?
Cheers.
|