Upload
mustazzihim-suhaidi
View
214
Download
0
Embed Size (px)
Citation preview
7/28/2019 Class24_DesigningDatabases_LogicModeling
1/24
File and Database Design;Logic Modeling
Class 24
7/28/2019 Class24_DesigningDatabases_LogicModeling
2/24
SDLCProject Identification
& Selection
Project Initiation
& Planning
Analysis
Logical Design
Physical Design***
Implementation
Maintenance
7/28/2019 Class24_DesigningDatabases_LogicModeling
3/24
Databases File Systems
Databases
Hierarchical Database Model
Network Database Model
Relational Database Model
Object Oriented Database Model
7/28/2019 Class24_DesigningDatabases_LogicModeling
4/24
File Systems Each new application is designed with
its own set of files.
Problems: Changes in files require changes to
programs.
Uncontrolled redundancy
Inconsistent data
Limited data sharing
7/28/2019 Class24_DesigningDatabases_LogicModeling
5/24
Database Approach Negatives
Need new, specialized
personnel Need for explicit
backups
Interference due to
shared data Organizational conflict
Postives
Minimal data redundancy
Consistent data Integration of data
Sharing of data
Data independence
Ease of applicationdevelopment
Reduced programmaintenance
7/28/2019 Class24_DesigningDatabases_LogicModeling
6/24
Designing a relational
database Create a table (file) for each entity type.
Choose a primary key for each table.
Choose appropriate data types and valuerestrictions for each field.
Create new tables to represent many-to-many relationships.
Add foreign keys to represent one-to-manyrelationships.
Define referential integrity constraints.
Evaluate schema quality and make necessaryimprovements.
7/28/2019 Class24_DesigningDatabases_LogicModeling
7/24
What were looking at Databases, Tables (files, entities),
Records, Fields (attributes)
How well define above in the DataDictionary
7/28/2019 Class24_DesigningDatabases_LogicModeling
8/24
Tables Each entity on your ER diagram will
become a table in your database.
7/28/2019 Class24_DesigningDatabases_LogicModeling
9/24
RecordsA row in the table.
A group of fields (or attributes) storedin adjacent memory locations andretrieved together as a unit.
7/28/2019 Class24_DesigningDatabases_LogicModeling
10/24
Fields May also be called an attribute or data
element.
All fields (or attributes on your ERdiagram) will be defined in the Data
Dictionary.
7/28/2019 Class24_DesigningDatabases_LogicModeling
11/24
Fields Name
Data type
Primary key(s)
Data integrity
Handling missing data Ownership
7/28/2019 Class24_DesigningDatabases_LogicModeling
12/24
Data Integrity Default value
Picture control
Range controls
Null Value controls
7/28/2019 Class24_DesigningDatabases_LogicModeling
13/24
Data Dictionary The repository of all data definitions for
all organizational applications.
7/28/2019 Class24_DesigningDatabases_LogicModeling
14/24
What well show in a DD: Table (file) (entity) name
All fields (attributes) within the table.
For each field: Name
Note if primary key
Definition/description of field Data type (page 352, or whether its
numeric or character plus the length)
TABLE PIG
7/28/2019 Class24_DesigningDatabases_LogicModeling
15/24
TABLE: PIG
PrimaryKey
Attribute
Name
Attribute Definition Attribute Type
* PigID The unique identifier
of the pig
5 numeric characters
PigName The name of the pig 15 alpha characters
PigWeight The weight, in pounds
and ounces of the pig
6 numeric characters, with 2
numbers after the decimal
PigGender The gender of the pig
either male or female
1 alpha character, M or F
are allowed
7/28/2019 Class24_DesigningDatabases_LogicModeling
16/24
Logic Modeling Knowing whats going on inside the
programs. What is the logic to create
the reports, calculated fields?
Well show logic modeling through use
of decision trees and decision tables.
7/28/2019 Class24_DesigningDatabases_LogicModeling
17/24
7/28/2019 Class24_DesigningDatabases_LogicModeling
18/24
7/28/2019 Class24_DesigningDatabases_LogicModeling
19/24
Decision TablesA matrix representation of the logic of a
decision, which specifies the possible
conditions for the decision and theresulting actions.
Condition stubs
Action stubs Rules
7/28/2019 Class24_DesigningDatabases_LogicModeling
20/24
Steps in creating Decision
tables: Name all conditions and the values each
condition can assume.
Name all possible actions that can occur. List all possible rules based on every possible
combination of conditions.
Define the actions for each rule. Simplify the decision table by removing
indifferent conditions.
7/28/2019 Class24_DesigningDatabases_LogicModeling
21/24
Examples!
7/28/2019 Class24_DesigningDatabases_LogicModeling
22/24
Decision TreesA graphical representation of a decision
situation in which decision situation
points (nodes) are connected togetherby arcs (one for each alternative on adecision) and terminate in ovals (the
action that is the result of all of thedecisions made on the path leading tothe oval
7/28/2019 Class24_DesigningDatabases_LogicModeling
23/24
Decision trees Often used for statistical reasons for
calculating probabilities and making
choices based on probabilities. Used more often for simpler
problems.
7/28/2019 Class24_DesigningDatabases_LogicModeling
24/24
Examples!