Foreign keys , Database Management System

Assignment Help:

Foreign Keys and NULL

Let us take the relation:                

DEPT

DEPT ID

DNAME

BUDGET

D1

Marketing

10M

D2

Development

12M

D3

Research

5M

 

EMP

EMP

ID

ENAME

DEPT

ID

SALARY

E1

Rahul

D1

40K

E2

Aparna

D1

42K

E3

Ankit

D2

30K

E4

Sangeeta

 

35K

Assume that Sangeeta is not assigned any section. In the EMP tuple corresponding to Sangeeta, thus, there is no genuine section number that can serve as the appropriate value for the DEPTID foreign key. Thus, one cannot verify BUDGET and DNAME for Sangeeta's department as those values are NULL. This may be actual circumstances where the person has newly joined and is undergoing training and will be allocated to a department only on finishing of the training. Thus, NULL in foreign key values might not be a logical error.

Thus, the foreign key definition may be redefined to conatin NULL as an acceptable value in the foreign key for which there is no require to find a matching tuple.

Is there any other constraint that may be applicable on the attribute values of the entities?

Yes, these constraints are mostly linked to the domain and termed as the domain constraints.


Related Discussions:- Foreign keys

Define the wait for graph, Define the Wait for graph Ans: The wait-for-...

Define the Wait for graph Ans: The wait-for-graph is a directed graph and consist of nodes and directed arcs; the nodes of the graph are active transactions. An arc of the grap

Entity relationship diagram, The Enhanced Entity Relationship Diagram (ERD)...

The Enhanced Entity Relationship Diagram (ERD) produced with a drawing or case tool. Your EERD must use a ''standard'' notation style such as Crows Foot or Chen. Please note that t

Unrepeatable reads-problems of concurrent transactions, Unrepeatable reads ...

Unrepeatable reads : Assume T7 reads X twice during its implementation. If it did not update X itself it could be very disturbing to see a dissimilar value of X in its next read. B

Determine Which is not a consequence of concurrent operation, Determine Whi...

Determine Which is not a consequence of concurrent operations? Ans: Update anomaly.

Explain strict two-phase locking, Explain Strict Two-Phase locking A tr...

Explain Strict Two-Phase locking A transaction T does not release any type of its exclusive (X) locks until that transaction commits or aborts. In this method no other transact

Explain the concept of deadlock, Explain the concept of deadlock Yes. I...

Explain the concept of deadlock Yes. It can direct to deadlock. Suppose that a batch of frames arrived correctly and were accepted. Then receiver will advance its window. Now s

What are the various forms of data transparency, What are the various forms...

What are the various forms of data transparency? a) fragmentation transparency b) replication transparency c) location transparency

Explain natural join, Explain natural join? Natural Join - Similar as...

Explain natural join? Natural Join - Similar as equi-join except in which the join attributes (having similar names) are not involved in the resulting relation. Only one sets

Explain relational model and their use in dbms, Explain Relational model an...

Explain Relational model and their use in DBMS? Relational Model - The relational model was first introduced through E.F. Codd of the IBM Research in the year of 1970. The mode

What are the disadvantages of relational approach, What are the disadvantag...

What are the disadvantages of relational approach? Disadvantages of relational approach: • Substantial hardware and system software overhead • May not fit all business models •

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd