I. REQUIREMENTS/SPECIFICATION
A. Narrative: Description of the problem and features of the system
B. Inputs: GUI input fields
C. Outputs: GUI output fields and reports
II. ANALYSIS
A. Modeling
1. Entity/Relationship (E/R) Diagram
2. Functional Dependency (FD) List
3. FD Diagram
4. OO Set Diagram
B. Prototype: GUI with labels, fields, buttons, text
C. User's Manual
III. DESIGN
A. Preliminary Design
1. Data Design
a. Internal: OO Set Definitions in Java
b. External: Relation Schema
2. Architecture Design
a. Modular Structure
b. Control Relationships
3. User Interface Design
B. Detail Design
1. Detail Data Design
a. Internal: Refined Data Structures
b. External: SQL Data Dictionary
2. Procedural Design
a. Internal: Pseudocode
b. External: SQL Queries
IV. IMPLEMENTATION
A. Internal: Java OO Set Prototype
B. External: JDBC SQL
V. TEST
A. Data Sets
1. Internal
a. Java OO Sets
b. Report Results
2. External
a. SQL Inserts
b. Query Results
B. Unit Test (White Box)
C. Integration Test (Black Box)
INTRODUCTION: NORMAL FORMS [2]
Normal Forms: find database schema with `good' properties
BAD(S#,NAME,CITY,P#,XNAME,YCITY,QTY)
| S# | NAME | CITY | P# | XNAME | YCITY | QTY |
| S1 | smith | london | P1 | nut | london | 300 |
| S1 | smith | london | P2 | bolt | paris | 200 |
| S1 | smith | london | P3 | screw | rome | 400 |
S(S#,NAME,CITY) Key: S#
P(P#,XNAME,YCITY) Key: P#
SP(S#,P#,QTY) Key: S#P#
NewpageINTRODUCTION: KEYS
key: one or more attributes that uniquely identifies record
| A | B | C |
| E | F | G | H |
composite key: two or more attributes (ABC)
superkey: contains a key (ABCE)
subkey: part of a key (AC)
prime attribute: belongs to a key (A)
There may be several different candidate keys
primary key: designated from the set of candidate keys
foreign key: points to another relation (where it is prime)
INTRODUCTION: FUNCTIONAL DEPENDENCIES [3]
determines
``Any rows that agree on
, will also agree on
''
Usually
is unique in the relation.
``You give me
and I can tell you
.
determines
.
You give me S3, and I can tell you its Blake.
You give me P2, and I can tell you the COLOR is Red.
You give me S2 and P1 and I can tell you the QTY is 300.
Make three relations out of these FD's (Third Normal Form)
S(S#,SNAME,STATUS,CITY)
P(P#, PNAME, COLOR, WEIGHT, CITY)
SP(S#,P#,QTY)
SP is an intersection relation
many-to-many relationship between S and P