in Databases
567 views
0 votes
0 votes

Notice that we can always map 1:1 or l:N relationships in a manner similar
M:N to relationships by using the cross-reference (relationship relation) approach, as we
discussed earlier. This alternative is particularly useful when few relationship instances
exist, in order to avoid null values in foreign keys. In this case, the primary key of the
relationship relation will be only one of the foreign keys that reference the participating
entity relations.
For a 1:N relationship, the primary key of the relationship relation will
be the foreign key that references the entity relation on the N-side. For a 1:1 relationship,
either foreign key can be used as the primary key of the relationship relation as long as no
null entries are present in that relation

In new table created for 1:1 or 1:N , does it include entries for all the entities or only those who are participating in relationship TO AVOID NULLS

ex: Table 1 or table how will it be ?

in Databases
567 views

4 Comments

ok, now i understood...

just think if it includes null..... what is the key of that relationship table ? then key leads to NULL right?

∴ it just includes which are mapped only
0
0
Ok thats y we maintain separte table for 1:1 and 1:M if participating entites are very less...so that less record to maintain in relationship table..
0
0
it's depend upon your requirement

someone requirement is " Minimum no.of tables. "

where someone requirement is " Minimum space wasted. "
0
0

Please log in or register to answer this question.

Related questions

3 votes
3 votes
4 answers
3