04.06.2015 Views

Database Modeling and Design

Database Modeling and Design

Database Modeling and Design

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.2 The <strong>Database</strong> Life Cycle 7<br />

Step II(c) Transformation of the conceptual model to SQL tables<br />

Customer<br />

cust-no cust-name . . .<br />

Product<br />

prod-no prod-name qty-in-stock<br />

create table customer<br />

(cust_no integer,<br />

cust_name char(15),<br />

cust_addr char(30),<br />

sales_name char(15),<br />

prod_no integer,<br />

primary key (cust_no),<br />

foreign key (sales_name)<br />

references salesperson<br />

foreign key (prod_no)<br />

references product);<br />

Salesperson<br />

sales-name<br />

addr<br />

dept<br />

job-level<br />

vacation-days<br />

Order<br />

order-no sales-name cust-no<br />

Order-product<br />

order-no prod-no<br />

Step II(d) Normalization of SQL tables<br />

Decomposition of tables <strong>and</strong> removal of update anomalies<br />

Salesperson<br />

Sales-vacations<br />

sales-name<br />

addr<br />

dept<br />

job-level<br />

job-level<br />

vacation-days<br />

Step III Physical design<br />

Indexing<br />

Clustering<br />

Partitioning<br />

Materialized views<br />

Denormalization<br />

Figure 1.2<br />

(continued)<br />

number of data dependencies that need to be analyzed. This is<br />

accomplished by inserting conceptual data modeling <strong>and</strong> integration<br />

steps [steps II(a) <strong>and</strong> II(b) of Figure 1.2] into the tradi-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!