maxmangion
AWF VIP
- Local time
- Today, 17:02
- Joined
- Feb 26, 2003
- Messages
- 2,805
I have a small database which takes care of my stamps collection. The main entities of the database are stamps, collectors and themes. Although the structure of my data works good and with reliable performance, I have a question regarding the stamps entity with regards to normalization.
Apart from the various attributes such as "face value", "country", "stamp description" etc, i also trace the amount of duplicates which I have. Right now my unnormalized structure with regards to duplicates is that for each record(stamp) I have the following attributes: "used", "mint", "cto", "damaged".
Eventually on the duplicates form I have a tabular form displaying the following:
In the above scenario although everything works as expected, there might be the case where i will have too many records having a "0" value if no duplicates are available.
I was thinking that i should remove the above mentioned fields and create a new table as follows:
Should this be a better approach, is there a way in which i can still have the duplicates form similar to my above example i.e. since the 0 records will not be created, would it be possible to have them available for viewing purposes to keep the same duplicates form structure.
Thank you for any advice.
Apart from the various attributes such as "face value", "country", "stamp description" etc, i also trace the amount of duplicates which I have. Right now my unnormalized structure with regards to duplicates is that for each record(stamp) I have the following attributes: "used", "mint", "cto", "damaged".
Eventually on the duplicates form I have a tabular form displaying the following:
Code:
stampid stampdescription Year Value Used Mint CTO Damaged Total
1 stamp1 1980 8c 5 3 2 4 14
2 stamp2 2002 7c 1 2 0 2 5
etc
In the above scenario although everything works as expected, there might be the case where i will have too many records having a "0" value if no duplicates are available.
I was thinking that i should remove the above mentioned fields and create a new table as follows:
Code:
stampid, duplicatetype, amount
1 used 5
1 mint 4
1 damaged 0 (this record will not be created)
etc
Should this be a better approach, is there a way in which i can still have the duplicates form similar to my above example i.e. since the 0 records will not be created, would it be possible to have them available for viewing purposes to keep the same duplicates form structure.
Thank you for any advice.