Search code examples
databaseentity-relationshipeer-model

Can a relationship type attribute be a derived attribute?


enter image description here

Is it possible to have this? Assuming there are many attributes in the relations A and B


Solution

  • First we must remember that a derived attribute is a changing attribute that can be achieved by another, such as your age (current date - date of birth)

    Yes, imagine this situation, you have the relationship of many to many students - course

    We can say that a student will take a course that will start on January 3rd and last 8 weeks of effective classes, we can't put directly the attribute "end date" because this date could change (for example because of a strike, a pandemic) but we can put the start date and make the calculation.