Need some advice on my database design which is probably not right as I am having trouble in being able to add records which could update other tables.
I have following three tables:
tblStores (fields include StoresID, Numerical - (PK), Store Name, Address, phone, State etc)
tblLease (Fields include LeaseID, AutoNumber - (PK), StoresID (FK), and a number of fields relevant to lease info. This has one to many relationship to tblStores as one store may have a number of leases, store lease, liquor store lease etc.
tblStats (Fields include StatsID (Auto number - PK), StoresID (FK), and a number of fields covering yearly sale information of stores. One store may have sales in many years 1996 through to 2002.
So in short, tblStores has 1-To-Many relation to both other tables.
On paper this designed seemed OK until I realised the need to add a new store. With existing design, a new store can be added in either of the 'many' tables but will not be reflected in the other many table. I must admit that this is highly inefficient design. I looked at the option of creating a junction table but just could not figure out how to use that in this situation.
Would like to have some guidance on this.
Regards
I have following three tables:
tblStores (fields include StoresID, Numerical - (PK), Store Name, Address, phone, State etc)
tblLease (Fields include LeaseID, AutoNumber - (PK), StoresID (FK), and a number of fields relevant to lease info. This has one to many relationship to tblStores as one store may have a number of leases, store lease, liquor store lease etc.
tblStats (Fields include StatsID (Auto number - PK), StoresID (FK), and a number of fields covering yearly sale information of stores. One store may have sales in many years 1996 through to 2002.
So in short, tblStores has 1-To-Many relation to both other tables.
On paper this designed seemed OK until I realised the need to add a new store. With existing design, a new store can be added in either of the 'many' tables but will not be reflected in the other many table. I must admit that this is highly inefficient design. I looked at the option of creating a junction table but just could not figure out how to use that in this situation.
Would like to have some guidance on this.
Regards