Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Class 24
Maintenance
Databases
Hierarchical Database Model Network Database Model Relational Database Model Object Oriented Database Model
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
Database Approach
Negatives
Postives
Need new, specialized personnel Need for explicit backups Interference due to shared data Organizational conflict
Minimal data redundancy Consistent data Integration of data Sharing of data Data independence Ease of application development Reduced program maintenance
Create a table (file) for each entity type. Choose a primary key for each table. Choose appropriate data types and value restrictions for each field. Create new tables to represent many-tomany relationships. Add foreign keys to represent one-to-many relationships. Define referential integrity constraints. Evaluate schema quality and make necessary improvements.
Tables
Records
A row in the table. A group of fields (or attributes) stored in adjacent memory locations and retrieved together as a unit.
Fields
All fields (or attributes on your ER diagram) will be defined in the Data Dictionary.
Fields
Name Data type Primary key(s) Data integrity Handling missing data Ownership
Data Integrity
Data Dictionary
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
Primary Key
Attribute Definition
Attribute Type
5 numeric characters
PigName
15 alpha characters
PigWeight
PigGender
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.
Decision Tables
A matrix representation of the logic of a decision, which specifies the possible conditions for the decision and the resulting actions.
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.
Examples!
Decision Trees
A graphical representation of a decision situation in which decision situation points (nodes) are connected together by arcs (one for each alternative on a decision) and terminate in ovals (the action that is the result of all of the decisions made on the path leading to the oval
Decision trees
Often used for statistical reasons for calculating probabilities and making choices based on probabilities. Used more often for simpler problems.
Examples!