Title: Systems Analysis
1Systems Analysis Design
2Conceptual Data Modeling
- Entity Relationship (E-R) Diagrams show how data
is stored - E-R Diagrams are the most common method for data
modeling
3Components of an E-R Diagram
- Mandatory Many (At least 1)
- Optional 1 (0 to 1 records)
- Optional Many (At least 0)
- Many with Maximum (1 to n)
4Other Possible Symbols
- There are a number of other symbols that you can
use to lay out specific data concepts without
using tables and column names
5Example using Other Components
Student
6Insert Sample Problem Here
7Refined Example
Student
Course
8Insert sample problem here
9Detailed Diagram Components
- It is often useful to show actual table and
column names on an E-R Diagram rather than just
entity names.
Table Name
Primary Key Columns
Column Names
10Drill Down 1 on ER Sample
11Drill Down 2 on ER Sample
12Example converted to Table View
Student
Course
- Student_ID
- Name
- Address
- Phone
- Course_ID
- Course_Name
- Course_Date
13E-R Diagrams are Useful!
- This is an example of a quick-and-dirty E-R
diagram that I build in Excel to help explain and
keep track of changes that I was making to a
database
14Insert Sample Problem Here
15Relationship Degrees - Unary
- Sometimes, a table will need to join back to
itself. - This is the case in most tree situations, as in
any situation where you need to specify
relationships between like parts - This is called a Unary relationship
16Using relationship tables with Unary Relationships
- Using extra tables to handle associations
sometimes makes it easier
17Relationship Degrees - Binary
- Most Common relationship relationship between
instances of two entity types
Student
PC User Account
Campus Building
Classroom
Student
Course
18Relationship Degrees - Ternary
- Relationship among instances of three entity types
Classroom
Student
Course
19Associative Entities
- As mentioned above, Associative Entities are
useful for creating associations between
entities, and for holding additional information
about the association.
20Sample Problem?
21Cardinality
- The minimum and/or maximum number of instances of
Entity B that can be related to Entity A. - Cardinality should be indicated with the line
endings in the E-R Diagram, as indicated in slide
3 of this presentation.
22Business Rules
- Entity Integrity
- Each entity must have a unique identifier that is
not null. For database tables, this is called a
Key and can contain more than one column. - Referential Integrity Constraints
- Rules concerning the relationships between entity
types. Databases can automatically enforce these
rules. - Domains
- Rules about valid values for fields in an Entity
23Sample Problem Order Form
- Turn the following order form into an E-R Diagram
24Problem General Solution
Customer
Order Item
5
Stock Item
25Problem Table Solution
26Problem Normalized Solution
27REVIEW E-R Diagram Components