开发者

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));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜