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

Illustrate the fifth normal form, Fifth Normal Form (5NF) These relatio...

Fifth Normal Form (5NF) These relations still have a difficulty. While defining the 4NF we mentioned that all the attributes depend upon each other. Whereas creating the two ta

Trigger , Flights(FlightNo, DeptDateTime, Origin, ArrivalDateTime, Destinat...

Flights(FlightNo, DeptDateTime, Origin, ArrivalDateTime, Destination, Capacity, SoldSeats) Tickets(FlightNo, Seat, CustID) Where - flightNo is the PK of the flights table - DeptDa

Define tables students and teachers as sub tables of people, Write a query ...

Write a query to define tables students and teachers as sub tables of people? Create table students of student under people Create table teachers of teacher under people

What is E-R model, E-R Model This data model is based on real world th...

E-R Model This data model is based on real world that consists of basic objects named entities and of relationship among these objects. Entities are illustrated in a database

List the string operations supported by sql, List the string operations sup...

List the string operations supported by SQL? 1) Pattern matching Operation 2) Concatenation 3) Extracting character strings 4) Converting among uppercase and lower cas

Client server databases, Client Server Databases- The concept behind the C...

Client Server Databases- The concept behind the Client/Server systems is simultaneous, cooperative processing. It is an approach that presents a one systems view from a user's vie

Hello, Java program for horrizontal fragmentation in distributed database

Java program for horrizontal fragmentation in distributed database

Find out the names and company names from database, Find out the names and ...

Find out the names and company names of all employees sorted in ascending order of company name and descending order of employee names of by which company. SELECT EMPLOYEE_NAME,

For known, What are the function of DBA?

What are the function of DBA?

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