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
Update or Modify operation alters the existing values. If these operations alter the value that is the foreign key also, the only check need is the similar as that of the Insert op

Define multivalued dependency and 4NF.  Ans:  Multivalued Dependency - Assume R be a relation schema and let α ⊆ R and β ⊆ R. The multivalued dependency  α →→β   holds o

Question 1 Explain ER model Question 2 What are the characteristics of a computer provided information? Question 3 What are facts and guidelines to be considered when se

A database named yourusernameFMA has been set up for you to use for this assignment.  For the FMA you must create the required tables and run the queries using this database.  If y

Consider the following frequency counts of some itemsets in a transaction database r : freq({A}, r) = 0.405 freq({B}, r) = 0.510 freq({C}, r) = 0.303 freq({A

Why, generally does an object-oriented system use the relational DBMS? The reasons for using relational DBMS for OO systems could be any combination of following: a. Many or

Define- relational algebra. The relational algebra is a procedural query language. It having of a set of operations that take one or two relation as input and make a new relati


Explain trivial dependency? Functional dependency of the form α ->β. is trivial if α C β. Trivial functional dependencies are satisfied by all the relations.

Consider a research paper submission process. The process starts when an author submits a draft research paper (the paper may have up to 3 authors) to the chair of the organizing c