Data Storage Formats Files Databases

Slides:



Advertisements
Similar presentations
Systems Development Life Cycle
Advertisements

1 Translation of ER-diagram into Relational Schema Prof. Sin-Min Lee Department of Computer Science.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved. Slide 1 Key.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
© 2005 by Prentice Hall Chapter 3a Database Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
IS 4420 Database Fundamentals Chapter 6: Physical Database Design and Performance Leon Chen.
CHAPTER 12: Design: Designing Databases 1.1 MSIS 5653 Advanced Systems Development Dursun Delen, Ph.D. Department of Management Oklahoma State University.
Designing Databases Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Modern Systems Analysis and Design Third Edition
Chapter 9 Designing Databases
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
10-1 Chapter 10 Designing Databases Modern Systems Analysis and Design Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Chapter 6 Physical Database Design. Introduction The purpose of physical database design is to translate the logical description of data into the technical.
1 C omputer information systems Design Instructor: Mr. Ahmed Al Astal IGGC1202 College Requirement University Of Palestine.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design, 2 nd Edition Copyright 2003 © John Wiley & Sons, Inc. All rights reserved.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 2 Slide 1 Chapter 10 Designing Databases.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Concepts and Terminology Introduction to Database.
1 Translation of ER-diagram into Relational Schema Prof. Sin-Min Lee Department of Computer Science.
TM 7-1 Copyright © 1999 Addison Wesley Longman, Inc. Physical Database Design.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved. Slide 1 Systems.
Lecture 12 Designing Databases 12.1 COSC4406: Software Engineering.
10/3/2012ISC329 Isabelle Bichindaritz1 Logical Design.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Chapter 6 1 © Prentice Hall, 2002 The Physical Design Stage of SDLC (figures 2.4, 2.5 revisited) Project Identification and Selection Project Initiation.
Chapter 10 Designing Databases Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
DataBase Management System What is DBMS Purpose of DBMS Data Abstraction Data Definition Language Data Manipulation Language Data Models Data Keys Relationships.
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
Database Management COP4540, SCS, FIU Physical Database Design (ch. 16 & ch. 3)
Unit 4 Object Relational Modeling. Key Concepts Object-Relational Modeling outcomes and process Relational data model Normalization Anomalies Functional.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Chapter 13 Designing Databases Systems Analysis and Design Kendall & Kendall Sixth Edition.
File and Database Design Class 22. File and database design: 1. Choosing the storage format for each attribute from the logical data model. 2. Grouping.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
IS 320 Notes for April 15, Learning Objectives Understand database concepts. Use normalization to efficiently store data in a database. Use.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Essentials of Systems Analysis and Design Fourth Edition Joseph S. Valacich Joey F.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 9 Designing Databases.
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
9-1 © Prentice Hall, 2007 Topic 9: Physical Database Design Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
Logical Database Design and the Relational Model.
11-1 © Prentice Hall, 2004 Chapter 11: Physical Database Design Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Lecture 4: Logical Database Design and the Relational Model 1.
Logical Design 12/10/2009GAK1. Learning Objectives How to remove features from a local conceptual model that are not compatible with the relational model.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 12 Designing.
SQL Basics Review Reviewing what we’ve learned so far…….
Cis339 Modern Systems Analysis and Design Fifth Edition Chapter 10 Designing Databases 10.1.
Logical Database Design and the Rational Model
Chapter 9 Designing Databases
Physical Database Design and Performance
MIS 322 – Enterprise Business Process Analysis
Modern Systems Analysis and Design Third Edition
Translation of ER-diagram into Relational Schema
CHAPTER 5: PHYSICAL DATABASE DESIGN AND PERFORMANCE
Chapter 9 Designing Databases
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Chapter 9 Designing Databases
Physical Database Design
Chapter 12 Designing Databases
Chapter 10 Designing Databases
Chapter 9 Designing Databases
Chapter 17 Designing Databases
Presentation transcript:

Data Storage Formats Files Databases Electronic lists of data that have been optimized to perform a particular transaction Databases Logical groupings of data that are related to each other

Data Design File oriented system Data files are designed to fit individual systems Can handle large volumes of structured data Well suited to mainframe and batch input Data redundancy and integrity problems Rigid data structure Master,Look-up, Transaction, Work (Scratch), Audit & History Files

Data Design Database systems Scalable Sharing of data (flexible design) Balancing conflicting requirements Enforcement of standards Controlled redundancy Security Increased programmer productivity Data independence

Types of Databases Legacy Hierarchical and network Handle data efficiently Require a lot of programming effort Relational Easier to develop (though less machine efficient) SQL operates on entire tables (not individual records) Object Objects have both data and processes Relationships among object classes are maintained using pointers Can handle complex data (e.g. video, audio, graphics) Multi-dimensional Designed to support aggregation of data on multiple dimensions Data Warehouses

Purpose of Database Design structure the data in stable structures that have minimal redundancy develop a logical design that reflects the data requirements in the forms & reports develop a logical database design from which we can do physical database design translate a relational database model into a technical file and database design choose data storage technologies

Logical Design Develop a logical data model for each known user interface for the application using normalization principles. Combine normalized data requirements from all user interfaces into one consolidated logical database model Translate the conceptual E-R data model for the application into normalized data requirements Compare the consolidated logical database design with the translated E-R model and produce one final logical database model for the application

Physical Design Choosing storage format (data type) for each attribute from the logical database model Grouping attributes from the logical database model into physical records Arranging related records in secondary memory (hard disks and magnetic tapes) so that records can be stored, retrieved and updated rapidly – file organizations Selecting media and structures for storing data to make access more efficient

Logical and Physical Records Logical record Field value that describes a single person, place, thing or event Physical record Smallest unit of data that is accessed by the operating system Block of one or more logical records

Relational Database Model Data represented as a set of related tables or relations Relation A named, two-dimensional table of data. Each relation consists of a set of named columns and an arbitrary number of unnamed rows Properties Entries in cells are single-valued Entries in columns are from the same set of values Each row is unique The sequence of columns can be interchanged without changing the meaning or use of the relation The rows may be interchanged or stored in any sequence

Relational Database Model Well-Structured Relation A relation that contains a minimum amount of redundancy and allows users to insert, modify and delete the rows without errors or inconsistencies Normalization The process of converting complex data structures into simple, stable data structures

Modification Anomalies Update redundancies Deletion Insertion violates entity integrity 45

First normal form A table that meets the definition of a relation If there are repeating groups: Place the repeating groups in a new table Duplicate the primary key of the original table Designate a new primary key for this table 48

Normalization Second Normal Form (2NF) Third Normal Form (3NF) Each non-primary key attribute is identified by the whole key (called full functional dependency) Third Normal Form (3NF) Non-primary key attributes do not depend on each other (called transitive dependencies)

Functional Dependencies A particular relationship between two attributes. For a given relation, attribute B is functionally dependent on attribute A if, for every valid value of A, that value of A uniquely determines the value of B Instances (or sample data) in a relation do not prove the existence of a functional dependency Knowledge of problem domain is most reliable method for identifying functional dependency

Second Normal Form A relation is in 2NF if any of the following conditions apply: The primary key consists of only one attribute No nonprimary key attributes exist in the relation Every nonprimary key attribute is functionally dependent on the full set of primary key attributes

Conversion to 2NF Decompose the relation into new relations using the attributes (determinates) that determine other attributes The determinates become the primary key of the new relation

Third Normal Form A relation is in 3NF if it is in 2NF and there are no functional (transitive) dependencies between two (or more) nonprimary key attributes To convert a relation into 3NF, decompose the relation into new relations using determinates

Functional Dependencies and Primary Keys Foreign Key An attribute that appears as a nonprimary key attribute in one relation and as a primary key attribute (or part of a primary key) in another relation Referential Integrity An integrity constraint specifying that the value (or existence) of an attribute in one relation depends on the value (or existence) of the same attribute in another relation

Transforming E-R Diagrams into Relations Represent entities Represent relationships Normalize the relations Merge the relations

Representing Entities Each regular entity is transformed into a relation The identifier of the entity type becomes the primary key of the corresponding relation The primary key must satisfy the following two conditions The value of the key must uniquely identify every row in the relation The key should be non-redundant (irreducible)

Representing Relationships Binary 1:N Relationships Add the primary key attribute (or attributes) of the entity on the one side of the relationship as a foreign key in the relation on the right side The one side migrates to the many side Binary or Unary 1:1 Three possible options Add the primary key of A as a foreign key of B Add the primary key of B as a foreign key of A Both

Representing Relationships Binary and higher M:N relationships Create another relation and include primary keys of all relations as primary key of new relation Unary 1:N Relationships Model the entity type as one relation Utilize a recursive foreign key A foreign key in a relation that references the primary key values of that same relation Unary M:N Relationships Create a separate relation Primary key of new relation is a composite of two attributes that both take their values from the same primary key

Merging Relations (View Integration) View Integration Problems Synonyms Two different names used for the same attribute When merging, get agreement from users on a single, standard name Homonyms A single attribute name that is used for two or more different attributes Resolved by creating a new name Dependencies between nonkeys Dependencies may be created as a result of view integration In order to resolve, the new relation must be normalized

Data Storage Format EBCDIC & ASCII Unicode Binary 1 byte of storage for each character (numeric, digit or symbol) Can represent a maximum of 256 characters Unicode Represents characters as integers Requires 16 bits for each character Can represent over 65,000 characters Binary More efficient for storing numeric data

Designing Fields Field Choosing data types Data Type Four objectives The smallest unit of named application data recognized by system software Each attribute from each relation will be represented as one or more fields Choosing data types Data Type A coding scheme recognized by system software for representing organizational data Four objectives Minimize storage space Represent all possible values for the field Improve data integrity for the field Support all data manipulations desired on the field

Designing Fields Calculated fields Coding/compression techniques A field that can be derived from other database fields Coding/compression techniques Reduces storage space Increases data integrity May be difficult to remember Program must be written to decode fields if the codes are not displayed

Date Fields ISO Julian (extended) Absolute date YYYYMMDD Easy to sort Good format for comparisons Julian (extended) YYDDD (YYYYDDD) Easy to calculate if dates fall in the same year Absolute date Total number of days from some specific base year e.g. Jan 1st, 1900

Methods of Controlling Data Integrity Default Value A value a field will assume unless an explicit value is entered for that field Picture Control (or template) A pattern of codes that restricts the width and possible values for each position of a field Range Control Limits range of values which can be entered into field Referential Integrity An integrity constraint specifying that the value (or existence) of an attribute in one relation depends on the value (or existence) of the same attribute in another relation Null Value A special field value, distinct from 0, blank or any other value, that indicates that the value for the field is missing or otherwise unknown

Designing Physical Tables A named set of rows and columns that specifies the fields in each row of the table Design Goals Storage efficiency Normalization (logical design) Speed of access De-normalization Indexing Clustering (interfile or intrafile)

Designing Physical Tables Denormalization The process of splitting or combining normalized relations into physical tables based on affinity of use of rows and fields Optimizes certain operations at the expense of others Three common situations where denormalization may be used Two entities with a one-to-one relationship A many-to-many relationship with nonkey attributes Reference data

Designing Physical Tables File Organization A technique for physically arranging the records of a file Objectives for choosing file organization Fast data retrieval High throughput for processing transactions Efficient use of storage space Protection from failures or data loss Minimizing need for reorganization Accommodating growth Security from unauthorized use

Types of File Organization Sequential The rows in the file are stored in sequence according to a primary key value Updating and adding records may require rewriting the file Deleting records results in wasted space Only one sequence may be maintained without duplicating rows

Types of File Organization Indexed The rows are stored either sequentially or non-sequentially and an index is created that allows software to locate individual rows Index A table used to determine the location of rows in a file that satisfy some condition Secondary Index Index based upon a combination of fields for which more than one row may have same combination of values

Designing Physical Tables Guidelines for choosing indexes Specify a unique index for the primary key of each file Specify an index for foreign keys Specify an index for nonkey fields that are referenced in qualification, sorting and grouping commands for the purpose of retrieving data Hashed File Organization The address for each row is determined using an algorithm

Designing Controls for Files Backup Techniques Periodic backup of files Transaction log or audit trail Change log Data Security Techniques Coding, or encrypting User account management Prohibiting users from working directly with the data. Users work with a copy which updates the files only after validation checks

Audit Controls Audit log files Audit fields Records details of all accesses and changes to the file Audit fields Date the record was created or modified Name of the user who performed the action Number of times the record has been accessed