T
TNH
Guest
Hello,
I was hoping someone here could help me with a little (maybe conceptual) difficulty:
I am creating a database to help with the running of a club I am a member of. The particular issue I have surrounds a table called "Expenses", where I intend to store information about any purchases and expenses the club makes - Date of expenditure, cost, who signed the cheque etc. These expenses come in different catagories, such as insurance policies, consumables or equipment services. I naturally wish to store information about insurance policies in a separate table (to store policy number, insurer, value insured, items insured, expiry date etc), and the information on equipment services in a further table (Service date, serviced by, comments on repairs, certificate validation etc), and so on through all of the different types of expenditure I need.
I have tried to create a field 'Expense ID' in each of 'Insurance Policies', 'Services' etc, and a relationship between each of these and the primary key in the 'Expenses' table. I don't want to make this 'Expense ID' field in the catagory tables a primary key (Not all items in these tables are expenses), however there will be no multiple references in these relationships, suggesting I should use a 1-1 relationship.
I also want to be able to bring up the details of each record in 'Expenses' using a sub-datasheet, but naturally the source for this sub-datasheet will depend on the expense catagory. Is there a way of overcoming this?
It may also be obvious that I am not an expert at relational databases, so any constructive critism of the way I have gone about this design is gratefully recieved.
Thanks for any replies
Tim
I was hoping someone here could help me with a little (maybe conceptual) difficulty:
I am creating a database to help with the running of a club I am a member of. The particular issue I have surrounds a table called "Expenses", where I intend to store information about any purchases and expenses the club makes - Date of expenditure, cost, who signed the cheque etc. These expenses come in different catagories, such as insurance policies, consumables or equipment services. I naturally wish to store information about insurance policies in a separate table (to store policy number, insurer, value insured, items insured, expiry date etc), and the information on equipment services in a further table (Service date, serviced by, comments on repairs, certificate validation etc), and so on through all of the different types of expenditure I need.
I have tried to create a field 'Expense ID' in each of 'Insurance Policies', 'Services' etc, and a relationship between each of these and the primary key in the 'Expenses' table. I don't want to make this 'Expense ID' field in the catagory tables a primary key (Not all items in these tables are expenses), however there will be no multiple references in these relationships, suggesting I should use a 1-1 relationship.
I also want to be able to bring up the details of each record in 'Expenses' using a sub-datasheet, but naturally the source for this sub-datasheet will depend on the expense catagory. Is there a way of overcoming this?
It may also be obvious that I am not an expert at relational databases, so any constructive critism of the way I have gone about this design is gratefully recieved.
Thanks for any replies
Tim