Поиск по этому блогу

понедельник, 22 июля 2013 г.

OLTP Three normal forms example

IBSN
Title
Authors
Publisher
12345
Book First
Author A,
Author B
Publisher Name, City, Street, Zip Code
57890
Book Second
Author C
Publisher Name, City, Street, Zip Code

First Normal For Remove repeating groups We have two authors in one cell
BOOKS Table
IBSN
Title
Publisher
12345
Book First
Publisher Name, City, Street, Zip Code
57890
Book Second
Publisher Name, City, Street, Zip Code
AUTHORS table
Author
IBSN
Author A
12345
Author A
12345
Author B
57890

Second Normal Form
BOOKS Table – Remove information which not depends on primary key, in this case Publisher address is not depend on IBSN
IBSN
Title
Publisher
12345
Book First
Publisher Name
57890
Book Second
Publisher Name

PUBLISHERS table
PUBLISHER
Street
City
State
Publisher Name
Street
City
State

Third Normal Form –remove columns which depend on each other: street exist in only one city, city can be only in one state …
PUBLISHERS table
Publisher
Address Code
Publisher Name
123

ADDRESSES table

Address Code
Street
City
State
123
Street
City
State

Комментариев нет:

Отправить комментарий