|
-
Jan 11th, 2008, 02:47 PM
#1
Thread Starter
Hyperactive Member
Any ideas to improve this schema?
Basically I am designing a fixed asset DB (inventory).
I don't have visio, so anything in bold a entity/table… this is also the breakdown of what I have right now (don't want to give to much info incase I am not supposed to).
item
PK Autoincrement_surrogKey
Item
Item
Item
Bool IsItLeased //can either be leased or purchased
Bool Disposed
Bool Linked
----------------
Leased
PK FK Autoincrement_surrogKey
Item
Item
Item
Note: entries from leased will be there is IsItLeased (in Item table) is set to true.
----------------
Purchased
PK FK Autoincrement_surrogKey
Item
Item
Item
Note: entries from purchased will be there is IsItLeased (in Item table) is set to false
----------------
Disposed
PK FK Autoincrement_surrogKey
Item
Item
Item
Note: entries from Disposed will be there if Disposed (in Item table) is set to true
----------------
Linked
PK FK Autoincrement_surrogKey
PK FK Autoincrement_surrogKey
Note: entries from Linked will be there if Linked (in Item table) is set to true
----------------
That is basically it. Is that done right? Or is there a better way to do all this? Basicly a bunch of 1-to-1 optional relationships. I suppose I don't even need to bool variables in Item and could just do a check on all the 3-4 tables to see if there is a proper entry, but that seems inefficient.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|