DevastatioN
Registered User.
- Local time
- Today, 19:57
- Joined
- Nov 21, 2007
- Messages
- 242
Hello,
I am creating a database that is used to track lots of different types of documents. Such as letters, reports, books, etc.
However the actual tracking of the transactions of the documents is identical. Which scheme is best.
Scheme 1: Each type has it's own table with it's own unique fields, and all tables are linked the same way to the transaction table. The problem this causes is that referential integrity cannot be used.
Scheme 2: There is a main table that has only the item number, and type, which is linked to the transaction table one-to-many. However each type has it's own table, but is connected to the main table as a one-to-one relationship. This allows the main table to keep the transaction information, however breaks out into one-to-one tables based on the fields being different.
The main problem is, usually you would have an items table, and a transactions table, but because the fields are so different between reports, books, etc. If I put all the fields into the same table, and only display the correct ones on the form, all the reports will have null fields for everything it doesn't use, and it would be hard to manage overall.
If scheme two is used (which I think is the better one). How do you work with one-to-one tables in access, simple make a query for the form which takes the key from the main table, and the data from the other one-to-one table. When it's updated, the key is automatically filled into the one-to-one table?
Attached are two pictures of scheme 1 and scheme 2.
Thanks,
I am creating a database that is used to track lots of different types of documents. Such as letters, reports, books, etc.
However the actual tracking of the transactions of the documents is identical. Which scheme is best.
Scheme 1: Each type has it's own table with it's own unique fields, and all tables are linked the same way to the transaction table. The problem this causes is that referential integrity cannot be used.
Scheme 2: There is a main table that has only the item number, and type, which is linked to the transaction table one-to-many. However each type has it's own table, but is connected to the main table as a one-to-one relationship. This allows the main table to keep the transaction information, however breaks out into one-to-one tables based on the fields being different.
The main problem is, usually you would have an items table, and a transactions table, but because the fields are so different between reports, books, etc. If I put all the fields into the same table, and only display the correct ones on the form, all the reports will have null fields for everything it doesn't use, and it would be hard to manage overall.
If scheme two is used (which I think is the better one). How do you work with one-to-one tables in access, simple make a query for the form which takes the key from the main table, and the data from the other one-to-one table. When it's updated, the key is automatically filled into the one-to-one table?
Attached are two pictures of scheme 1 and scheme 2.
Thanks,