-1

I have the following 2 schemas:

The question: Is the property table redundant? If not what are the cases where it would be useful?

Assume the property only holds a unique relationship between the color and the shape. Arrow means "one to many", e.g. Toy has a foreign key called fk_property_id

Sorin Burghiu
  • 715
  • 1
  • 7
  • 26
  • 1
    it depends on the task. Can different properties have the same color and shape? if yes then property table isn't redundant. if only one property can have the same color and shape then it's redudant. – iroli Apr 29 '22 at 14:16
  • Please use text, not images/links, for text--including tables & ERDs. [Why should I not upload images of code/data/errors when asking a question?](https://meta.stackoverflow.com/q/285551/3404097) [Why are images of text, code and mathematical expressions discouraged?](https://meta.stackexchange.com/q/320052/266284) Paraphrase or quote from other text. Give just what you need & relate it to your problem. Use images only for what cannot be expressed as text or to augment text. Include a legend/key & explanation with an image. PS DDL is text for an ERD. – philipxy Apr 30 '22 at 02:31
  • Does this answer your question? [What are the options for storing hierarchical data in a relational database?](https://stackoverflow.com/questions/4048151/what-are-the-options-for-storing-hierarchical-data-in-a-relational-database) – philipxy Apr 30 '22 at 02:32

1 Answers1

0

if the toy can have different colours and different shpares, solution2 is not usable.

you need a bridge table, to have multiple properties of teh same kind.

i would go futtehr and have mor ethan oen property table, so taht a toy can be back and grau, round and square at the same time

nbk
  • 45,398
  • 8
  • 30
  • 47