I appreciate the addition of optional relationships, but i have been running into a problem - i want to setup a relationship between 2 tables:
table content{ //represents the content of a tournament website
id int [pk, increment]
}
table rewards{ //represents the rewards that a certain tournament might have
id_content [pk]
}
The content’s pk is the same as the reward’s pk, since they both reference the same page, and will only reference the same page, thus it would be redundant to create another pk on the rewards table.
However, not all tournaments will have rewards. So i want to display that with an optional relationship between the content table and the rewards table.
The problem is that because of the way that optional relationships are implemented, if both keys are not nullable, there cannot be an optional relationship between them.
From what i undestand, relationships are meant to describe the behaviour between 2 entities/tables. So it doesn’t make sense to me why a relationship between 2 tables is dependent on the attributes of a table.
A suggestion to fixing this would be the addition of syntax that specificly signifies 0 relationships, like:
//zero-to-one
Ref: "content"."id" 0- "rewards"."id_content"
//one-to-zero
Ref: "rewards"."id_content" -0 "content"."id"
//zero-to-many
Ref: "content"."id" 0< "rewards"."id_content"
//many-to-zero
Ref: "rewards"."id_content" >0 "content"."id"