I am looking at a way of modeling optional but mandatory relationships in tables. For example, you are modeling a college database where you have a degree program which has a set of courses. Differing categories of classes are required such as a science class where you must take one science class but you only have a limited set of choices. How do I model mandatory but optional values in a ER diagram and translate this into tables. I am rather new to databases, thank you!
Asked
Active
Viewed 800 times
1
-
I'm not sure what you mean by "optional but mandatory" - those terms are opposites. Perhaps my answer to [is optionality (mandatory, optional) and participation (total, partial) are same?](https://stackoverflow.com/questions/38034049/is-optionality-mandatory-optional-and-participation-total-partial-are-same/38035173#38035173) will be of value. – reaanb Mar 30 '18 at 17:48
-
Yes the answer Is helpful! So, comparing my example to yours, science classes would be purchases and prescription would be the options? – cjstittles Mar 30 '18 at 19:05
-
Sorry, your example isn't clear enough for me to agree or disagree. Please try to explain your scenario in more detail, and perhaps give examples of both valid and invalid options. – reaanb Mar 30 '18 at 21:51