functional-dependencies example
Can anyone plz give example how functional dependencies are being implemented in sql.
I have read som开发者_JS百科ewhere that functional dependencies can be implemented using assertions. But how these are implemented can anyone give an example for it. Moreover how to implement FD's in Oracle coz, assertions can't be created in oracle.
Primary keys and UNIQUE constraints are two examples of how functional dependencies are implemented in SQL.
Functional dependency:
DEPTNO -> DNAME, LOC
DNAME -> DEPTNO, LOC
SQL implementation:
create table dept
(deptno integer PRIMARY KEY,
dname varchar2(10) UNIQUE,
loc varchar2(10));
精彩评论