0

Firstly I apologise for the question it was the only way I could think to ask it in short form.

I have a brief that, under the items table, states: "The store keeps track of the primary supplier of each item (i.e. where they normally buy it from), as well as a secondary supplier. Every item must have a primary supplier, but it is optional to have a secondary supplier." I have interpreted this as the item table has two foreign keys to the supplier table. Given that each item is limited to a maximum of two suppliers and that both foreign keys are in the same record I have stated that the tables have a one (supplier) to many (item) relationship. My logic is based mainly on the programming side of databases and that a many-to-many relationship (to my understanding) would need to be resolved with another table. However, if this is a many-to-many relationship, it is already solved and would not create duplications.

Is it correct to say this or is the relation many to many?

1 Answer 1

0

If the task will stay the same, it is one (supplier) to many (item). If they will change it to something like "each item has a rated list of suppliers", only than it will become many-to-many with junction table (itemId, supplierId, rating).

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.