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

Give Concurrent sub states diagram for the classroom and exam held. In Figure, simultaneous substrates have been taken. After passing Minor 1 test you could give Minor 2 test. T

List the drawbacks of relational database system A) Repetition of data B) Inability to s certain information.

What is the use of a slotted-page structure and what is the information are there in the header? The slotted-page structure is used for organizing records within a one block.

We require an advanced system for a Sports Centre, you are concerned only with representing the data discussed below about bookings and members. (The complete system may contain ot

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

In which relational modes, cardinality is termed? Answer : Cardinality is termed in a number of tuples relational modes.

Consider the relations described below: PHYSICIAN (regno, name, telno, city) PATIENT (pname, street, city) VISIT (pname, regno, date_of_visit, fee) Where the regno and pname ide

What is the initial step for object-oriented designing The initial step for object-oriented designing is object modeling. Before we go into deep about object modeling first of

difference between internal schema and external schema in DBMS