hey.. I’m a complete newbie at designing tables and relationships, so pls bear with me..
Im trying to construct a db that records all the details for an importing company.
Background: the company imports goods (shipments conducted by Freight Company), from a Supplier, in Containers, and then arranges Delivery of the goods (delivery completed by Haulier Company). Customs requirements must also be met.
so far these are the tables I have:
tblShipping
tblContainer
tblDelivery
tblCustoms
tblSupplier
tblFreightComp
tblHaulierComp
Here are the relationships:
1) Each shipment (tblShipping) can have many Containers, but each container can only have one shipment (tblShipping) : 1:M
2) Each shipment (tblShipping) can only have one Supplier (tblSupplier), but each Supplier can have many shipments (tblShipping): 1:M
3) Each shipment (tblShipping) can only have one Freight Company (tblFreightComp), but each Freight Company can have many shipments (tblShipping): 1:M
4) Each shipment (tblShipping) can only have one Haulier (tblHaulier), but each Haulier can have many shipments (tblShipping): 1:M
5) Each Container can only have one Delivery (tblDelivery), but each delivery can have many containers: 1:M
6) Each Container can only have one Customs Check (tblCustoms), but each Customs Check can have many containers: 1:M
7) Each Delivery can only have one Haulier, but each Haulier can have many deliveries: 1: M
These are the most important relationships (not all of them).
Where I’m getting confused is whether or not I should (or need to) create additional junction tables? If someone could have a look at the attached screenshot (of my tables with fields and pk's - but no relationships defined yet) and advise, I’d really appreciate it!
Also, im having some major probs with my variables and forms… the P/C No in the Shipping Table is the most important value here. This number is used repeatedly throughout the process. Problem I’m having is that this number needs to be alphanumeric, and also get passed to each other table (hence P/C No as a fk in each other table). How can I do this? Ive been playing around with loads of diff relationships but with no luck. I ideally need this alphanumeric number, when entered in the first form, to be ‘sent’ to other forms, as I chose. How can I do this?
Any help is really appreciated!
Thanks
snowman
ps - sorry for such a long post!
Im trying to construct a db that records all the details for an importing company.
Background: the company imports goods (shipments conducted by Freight Company), from a Supplier, in Containers, and then arranges Delivery of the goods (delivery completed by Haulier Company). Customs requirements must also be met.
so far these are the tables I have:
tblShipping
tblContainer
tblDelivery
tblCustoms
tblSupplier
tblFreightComp
tblHaulierComp
Here are the relationships:
1) Each shipment (tblShipping) can have many Containers, but each container can only have one shipment (tblShipping) : 1:M
2) Each shipment (tblShipping) can only have one Supplier (tblSupplier), but each Supplier can have many shipments (tblShipping): 1:M
3) Each shipment (tblShipping) can only have one Freight Company (tblFreightComp), but each Freight Company can have many shipments (tblShipping): 1:M
4) Each shipment (tblShipping) can only have one Haulier (tblHaulier), but each Haulier can have many shipments (tblShipping): 1:M
5) Each Container can only have one Delivery (tblDelivery), but each delivery can have many containers: 1:M
6) Each Container can only have one Customs Check (tblCustoms), but each Customs Check can have many containers: 1:M
7) Each Delivery can only have one Haulier, but each Haulier can have many deliveries: 1: M
These are the most important relationships (not all of them).
Where I’m getting confused is whether or not I should (or need to) create additional junction tables? If someone could have a look at the attached screenshot (of my tables with fields and pk's - but no relationships defined yet) and advise, I’d really appreciate it!
Also, im having some major probs with my variables and forms… the P/C No in the Shipping Table is the most important value here. This number is used repeatedly throughout the process. Problem I’m having is that this number needs to be alphanumeric, and also get passed to each other table (hence P/C No as a fk in each other table). How can I do this? Ive been playing around with loads of diff relationships but with no luck. I ideally need this alphanumeric number, when entered in the first form, to be ‘sent’ to other forms, as I chose. How can I do this?
Any help is really appreciated!
Thanks
snowman
ps - sorry for such a long post!
Attachments
Last edited: