-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFunctional-Dependencies
More file actions
69 lines (55 loc) · 2.41 KB
/
Functional-Dependencies
File metadata and controls
69 lines (55 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Relational Schema:
Farmer(FID, FName, ContactNo, Address, Age, Income);
Crops(CName, Climate, Soil, Fertiliser);
Buyers(BID, BName, Age, ContactNo, Address, Annual_Inc, CompanyName);
Schemes(SchID, SName, Type, Eligibility, IssuedBy);
Quality(qfactor);
Farm_details(FID, CName, QFactor, CostPrice, Availability, SellingPrice, Sq.Area, District);
Transaction Details(FID, CName, QF, BID, DateofPurchase, Rate, QtySold);
Farmer-Scheme (FID, SchID, StartDate, EndDate) ;
__________________________________________________________________________________________________________________________________
Canonical form of FDs:
FID -> { FName, ContactNo, Address, Age, Income }
Since the determinant in every FD is a SuperKey of the Farmer relation, it is in BCNF.
CName -> {Soil, Climate, Fertilizer}
Since the determinant in every FD is a SuperKey of the Crops relation, it is in BCNF.
BID -> { BName, Annual_Inc, ContactNo, Address, Age, CompanyName }
Since the determinant in every FD is a SuperKey of the Buyer Details relation, it is in BCNF.
SchID -> { SName, Type, Eligibility, IssuedBy}
Since the determinant in every FD is a SuperKey of the Schemes relation, it is in BCNF.
{FID, CName, QFactor} -> {Sq.Area, Availability, SellingPrice, CostPrice, District}
Since the determinant in every FD is a SuperKey of the Farm Details relation, it is in BCNF.
{FID, CName, QF, BID, DateOfPurchase} -> { QtySold, Rate }
Since the determinant in every FD is a SuperKey of the Transaction Details relation, it is in BCNF.
{ FID, SchID } -> {StartDate, EndDate}
Since the determinant in every FD is a SuperKey of the Farmer-Scheme relation, it is in BCNF.
__________________________________________________________________________________________________________________________________
Minimal set of FDs:
FID -> FName
FID -> ContactNo
FID -> Address
FID -> Age
FID -> Income
CName -> Soil
CName -> Climate
CName -> Fertilizer
BID -> BName
BID -> Income
BID -> ContactNo
BID -> Address
BID -> Age
BID -> CompanyName
SchID -> SName
SchID -> Type
SchID -> Eligibility
SchID -> IssuedBy
{FID, CName, QFactor} -> Sq.Area
{FID, CName, QFactor} -> Availability
{FID, CName, QFactor} -> SellingPrice
{FID, CName, QFactor} -> CostPrice
{FID, CName, QFactor} -> District
{FID, CName, QF, BID, DateOfPurchase} -> QtySold
{FID, CName, QF, BID, DateOfPurchase} -> Rate
{ FID, SchID } -> StartDate
{ FID, SchID } -> EndDate
All of the above relations are clearly in BCNF form.