Foreign keys , Database Management System

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.

Posted Date: 3/7/2013 1:39:57 AM | Location : United States







Related Discussions:- Foreign keys , Assignment Help, Ask Question on Foreign keys , Get Answer, Expert's Help, Foreign keys Discussions

Write discussion on Foreign keys
Your posts are moderated
Related Questions
The scenario You have been approached to design and implement a prototype of a distributed information system for a national car part retail outlet chain. The company comprises

What are temporary tables? Temporary tables exist solely for a particular session or whose data persists for the duration of the transaction.

Represent the following scenarios with E-R diagrams drawn using the ER Assistant software. The diagrams should indicate cardinality and optionality of relationships. Transform each


State the definition of association An association is a structural relationship which specifies that objects of one thing are connected with objects of another. In UML, asso

Question: In a multi-user database environment, locking mechanisms can be used to solve the three basic problems of concurrency. On the other hand, however, locking may also le

Desirable Properties Of Decomposition Decomposition is a process of dividing a relation into its projections that will not be disjoint. Please remind the Relational projection

Explain what is Aggregation? Aggregation: Aggregation is an significant concept in database design whereas composite objects could be modelled during the design of database a

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

What are the responsibility of File manager? File Manager : Manager allocation of space on disk storage and the data structures used to represent within stored on disk. It is a