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

Explain concept of inheritance with support of example, Explain concept of ...

Explain concept of inheritance with support of suitable example. Inheritance Inheritance is one of milestone of object-oriented programming language as it allows a creati

On laod, how to write a in a text and load it on mysql

how to write a in a text and load it on mysql

Briefly describe concurrency execution, Briefly describe concurrency execut...

Briefly describe concurrency execution? Lock - based protocols Locks There are several modes in which a data item may be locked in this section we restrict our attention

Memory components of sga, Problem 1. Describe the Oracle Architecture w...

Problem 1. Describe the Oracle Architecture with a neat labeled diagram, Also explain the individual components of the Architecture. 2. Write about the following Oracle 9i o

Er schema, Consider entity type Employee with attributes empNumber (this is...

Consider entity type Employee with attributes empNumber (this is unique), empName, and the year when he/she was hired. An employee can either be a technical employee, a marketing e

Client dbms, i need to submit in this topic.

i need to submit in this topic.

Set difference, Set Difference If R1 and R2 are two union compatible re...

Set Difference If R1 and R2 are two union compatible relations or relations then result of R3 =R1- R2 is the relation that have only those tuples that are in R1 but not in R2.

State the step- implement software control designer, Implementing software ...

Implementing software control To implement software control designer must redesign strategy of state event model which is present in dynamic model. There are three basic ap

Normalization, Introduction In large projects, we can have many different ...

Introduction In large projects, we can have many different companies working together. Generally, the project or contract is awarded to one company (Principal Contractor), which

find a non-redundant cover and canonical cove, Given the following set of ...

Given the following set of functional dependencies {cf→ bg, g → d, cdg → f, b → de, d → c} defined on R(b,c,d,e,f,g) a. Is cf→ e implied by the FDs? b. Is dg a superkey?

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