I am designing a database for the ticketing department of our company. Along with dozens of other tables, I have 2 tables namely, Contracted Airlines and Contracted Agencies. I would like to store the scanned copies of the contracts that we do with both the airlines and the agencies. The other attributes I would like to include along with the Scanned contract copy are: Contract Starting Date, Contract Ending Date and Contract Status (Expired, Renewed).
The question I am posed with at this stage is whether I make two separate Contracts tables (one for each), or do I make one Contracts table and link them to the Contracted Agencies and Contracted Airlines tables? I am very much inclined to go with the latter, since there are common attributes between the two tables and repeating them doesn't seem to be wise, not at least to me (not to mention I might be wrong), and include another field to the common Contracts table called "Contract For", where the values can be "Agency", and "Airline", storing all the contracts in one place.
I have one more table where names of all the airlines have been stored called "Airlines". This is my validation table from where I pick up the airlines to store into the Contracted Airlines table.
Now while storing the contract copies, I would have to select the agency name or the airline name corresponding to the record storing the contract copy. This is where I am confused as to how will I be able to store the name of the agency or the airlines within the same field using lookup lists from two different tables? (as I can only hook it up with one of the tables at one time).
I know I can acheive this by using VBA on the form, and changing the rowsource of the combo box at run time to the corresponding table, but is it going to be a wise decision considering the design of the overall database, or it can in future bite me under any circumstances?
What if I design something like the one shown in the attached image? I have used two more linking tables but I don't know if it makes sense at all by making Contracts a parent table rather than a child of two parents namely, Contracted Agencies and Contracted Airlines.
Need your honest opinion on this one. Thanks
The question I am posed with at this stage is whether I make two separate Contracts tables (one for each), or do I make one Contracts table and link them to the Contracted Agencies and Contracted Airlines tables? I am very much inclined to go with the latter, since there are common attributes between the two tables and repeating them doesn't seem to be wise, not at least to me (not to mention I might be wrong), and include another field to the common Contracts table called "Contract For", where the values can be "Agency", and "Airline", storing all the contracts in one place.
I have one more table where names of all the airlines have been stored called "Airlines". This is my validation table from where I pick up the airlines to store into the Contracted Airlines table.
Now while storing the contract copies, I would have to select the agency name or the airline name corresponding to the record storing the contract copy. This is where I am confused as to how will I be able to store the name of the agency or the airlines within the same field using lookup lists from two different tables? (as I can only hook it up with one of the tables at one time).
I know I can acheive this by using VBA on the form, and changing the rowsource of the combo box at run time to the corresponding table, but is it going to be a wise decision considering the design of the overall database, or it can in future bite me under any circumstances?
What if I design something like the one shown in the attached image? I have used two more linking tables but I don't know if it makes sense at all by making Contracts a parent table rather than a child of two parents namely, Contracted Agencies and Contracted Airlines.
Need your honest opinion on this one. Thanks