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

File organization, what is file organization? what are file organization te...

what is file organization? what are file organization techniques.explain in detail? explain random file organization technique, multikey file organization technique?what is indexin

multiple-mode locks, Multiple-mode locks : It offers two locks: exclusive ...

Multiple-mode locks : It offers two locks: exclusive locks and shared locks. But why do we require these two locks? There are a lot of transactions in the database system that neve

Data replication, Data Replication "If a relation R has its copies kept...

Data Replication "If a relation R has its copies kept at two or more sites, then it is considered replicated". But why do we replicate a relation? There are several advan

ERD, online eductional management system ke diagram

online eductional management system ke diagram

Whenever the limit clause will be used, Whenever the LIMIT clause will be u...

Whenever the LIMIT clause will be used? LIMIT is used for the following kinds of problems: 1) Answering questions about first or last and largest or smallest 2) Splitting

Difference between operating system and database security, Difference betwe...

Difference between Operating System and Database Security Security within the operating system can be executed at various levels ranging from passwords for access to system, t

Ideal data dictionary, An ideal data dictionary should have everything a DB...

An ideal data dictionary should have everything a DBA wants to know about the database. 1 Conceptual, External, and internal database descriptions. 2.    Descriptions of attr

What are the situations while dbms should not be used, What are the situati...

What are the situations while DBMS should not be used? DBMS should not be used in situations like: (i) No need of security. (ii) Not difficulty to access the data (iii) N

What is multiplicity in the associations, What is multiplicity in the assoc...

What is multiplicity in the associations? Give an example to explain multiplicity? Multiplicity in association indicate number of objects participate in any relationship. For

In a hierarchical model of data records are organized, In a Hierarchical mo...

In a Hierarchical model of data records are organized ? In the hierarchical model of data records are organized as Tree structure.

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