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

advantages of database over file system, Q.   Why would you choose a datab...

Q.   Why would you choose a database system instead of simply storing data in operating system file? Define  at a base concept in details. Sol. Advantages of Database over Fil

Create a view that finds the student name, Section A:  Use the following ta...

Section A:  Use the following tables to create a database called College.  Use SQL commands. Student stuid(primary) lastName firstName

Determine the advantage of object-orientation, Determine the advantage of o...

Determine the advantage of object-orientation Finally, object-orientation has advantage of continuity throughout analysis, persistent representation and design implementation.

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

List the set operations of sql, List the set operations of SQL? 1) Unio...

List the set operations of SQL? 1) Union 2) Intersect operation 3) The except operation

#title using the invoice, using the invoice table shown below,write the rel...

using the invoice table shown below,write the relational schema,draw a dependencies,inclunding all partial and transitive dependencies.assume that the table does not contain repeat

Define the division operation of relational algebra, Define the Division Op...

Define the Division Operation of Relational Algebra Let R be a relation comprising attributes (A1,...Ap,Ap+1,...An) and S comprising attributes (Ap+1,...An)  DEF: Division

Describe the advantage of state chart diagram, Describe the advantage of St...

Describe the advantage of State chart Diagram A state chart represents a state machine, emphasizing flow of control from one state to other. A state machine is a behaviour whi

Define the terms entity, Define the terms entity, attribute, role and relat...

Define the terms entity, attribute, role and relationship between the entities, giving examples for each of them.         Ans: Entity:   An entity is a "thing" or "object" in th

Designing the hierarchy of a ldb?, What sorts of tables one can se in desig...

What sorts of tables one can se in designing the hierarchy of a LDB? Tables, which are having Foreign Key relations.

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