280 views

1 Answer

1 votes
1 votes

Suppose an instance of this relationship in database where,

UID - $102$ has $2$ Friends $\{103 \ 104 \}$


Now if you try to map this instance to single table maintaining the integrity which looks like this :
 

User.UID User.Name Friend.Uid(Foreign key)
102 a ??

You can`t map anything because there will be redundancy and database will not allow that rather :
 

user.UID user.Name
102 a
103 b
104 c
friend.UID1 friend.UID2
102 103
102 104

Allowed and accepted and can be identified by combining both of these column. 

Related questions

0 votes
0 votes
0 answers
1
pream sagar asked Jan 9, 2019
352 views
are serial schedules counted or not in the concurrent schedules.The number of concurrent schedules can be formed with 3 transactions having 3, 2 and 1 operations respecti...
0 votes
0 votes
0 answers
2
pream sagar asked Jan 9, 2019
138 views
IN THIS SCHEDULE THERE IS NO INTIAL READ?i think there are two initial read R(A) in T1 transaction and R(B) in T2 transaction so in this case if we change the order of T...
0 votes
0 votes
0 answers
3
pream sagar asked Nov 19, 2018
128 views
Is there any difference between strong entity set and owner entity set.
0 votes
0 votes
0 answers
4
pream sagar asked May 13, 2018
155 views
Foreign key does not depend on cardinality only but primary key only depend on cardinality .what does it mean please explain with example..