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
Define seek time. The time for repositioning the arm is known as the seek time and it enhances with the distance that the arm is known as the seek time.

You group has been hired by  TrainingrUs.com to keeps track of training revenues. TrainingrUS.com wants you to keep scheduling. COURSE table contains following information:

The indices are accumulated in the index files. The data is accumulated in the data files. Indices give fast access to data items. For example, a book database may be managed in th

Design Documentation  The Design Document shall be an extension of Requirements Analysis Design. "The Design Document will comprise a revised and much more detailed descrip

Explain group By clause in SQL? Group By clause in SQL: The GROUP BY clause can be used in a SELECT statement to collect data across multiple records and group the results thro

What is a checkpoint? List the operations to be performed by the system when a checkpoint is to be taken. What does the recovery system do if there is a crash? There is large n

each publisher has uniqe name a mial addrs are also kept on each pubisher.a publisher publish one book.a book publish y one publisher.book identified by isbn.each book writn by one

Use Access 2007 to create a database called UniLib.mdb. - this file should be created on your personal drive at the university (or C: if you're using Access 2007 at home) and t

Ways for Selecting Data Structure Algorithms operate on data structure. Therefore, selection of the best algorithm means selecting the best data structure from whole bunch. Th

Differance between procedural and non procedural DML? Procedural and non procedural DML Procedural DML exactly what data is require and how to obtain those data. Non procedural