in Databases
219 views
0 votes
0 votes

Can a tuple in unary-relationship set be in relation with itself. 

For example, take a tuple T1 in an entity E1 and this entity E1 is related to itself. Now can the Tuple T1 be in relation to tuple T1

in Databases
by
219 views

3 Comments

I think you are talking about self referencing relationship.

Say we have a relation Employee. Say a manager manages few employees. But, for company, a manager is also an employee. So the relation will have both managers and employees. And the self referencing relationship will be manages.
0
0
Sorry my bad.

Let me frame my question in a better manner

Consider you have a person Ram. Say we have a table called PQR which contains Ram, now my doubt was can we have a relation between person Ram in PQR table to Ram himself (not another person named Ram but the Ram mentioned before )itself considering the relation is unitary relationship set
0
0
if you want referencing, then name should be unique/primary key.

Let it is Primary Key, then also directly can't you insert the data.

One way is:- First insert the data and then Apply the foreign Key concept

Alternative :- First keep it with Some Dummy value, later update it !

( i didn't study it anywhere, it's my opinion )
0
0

Please log in or register to answer this question.