Wednesday, November 5, 2008




Files and Databases




Chapter 1

File Systems and Databases



Database
Persistent collection of data and
Metadata (data about the characteristics of the data and relationships
of the data)
Database Management System
collection of programs to manage the database
Manages and enforces database structure
Includes interface to manipulate the data
Allows data to be shared among multiple users


Data vs Information



  • Data:

    • Raw facts; building blocks of information
    • Unprocessed information

  • Information:

    • Data processed to reveal meaning


  • Accurate, relevant, and timely information is key to good decision making
  • Good decision making is key to survival in global environment

Importance of DBMS



  • Makes data management more efficient and effective
  • Query language allows quick answers to ad hoc queries
  • Provides easier access to more and better-managed data
  • Promotes an integrated view of organization�s operations
  • Reduces the chance of inconsistent data
  • Helps protect against loss of data

DBMS Manages Interface Between Data and Users




Database Design: Why Design is important



  • The database is the foundation of the information system.
  • Design should reflect the expected use
  • Poor design results in unwanted redundancy
  • Poor design leads to inconsistent data
  • Poor design leads to poor performance
  • Poor design leads to improper information systems operation

Historical Roots



  • First business computer applications focused on clerical tasks
  • Requests for information quickly followed
  • File systems developed to address needs
  • Data organized according to expected use
  • Data Processing (DP) specialists computerized manual file systems


File Systems


Figure 1.5


File System Data Management



  • Requires extensive programming, typically in Third Generation Language
    (3GL)
  • Leads to islands of information and data redundancy
  • Difficult to make ad hoc queries to obtain information
  • Difficult to maintain data integrity

Data and Structural Dependence



  • Data characteristics are embodied in programs not stored with the data.
  • Changes in data characteristics requires modifying programs
  • Changes in file structures require modification of related programs


Data Redundancy



  • Different and possibly conflicting versions of same data
  • Results in problems during data:

    • Modification (e.g. address changes)
    • Insertion
    • Deletion

  • Data inconsistency: Lack of integrity

Database Systems




  • Database consists of logically related data stored in a single repository
  • Advantages over file system management approach:

    • Eliminates inconsistency, data anomalies, data dependency, and structural
      dependency problems
    • Stores data structures, relationships, and access paths


Database vs. File Systems


Figure 1.6


Database System Environment




Database System Types



  • Scale

    • Single User (desktop)
    • Workgroup
    • Enterprise
    • Distributed or Federated

  • Use

    • Production/Transaction
    • Decision Support/Data Warehouse



Uses of Databases



  • Transactional (or production):

    • Supports a company�s day-to-day operations

  • Data warehouse:

    • Stores data used to generate information required to make tactical or strategic decisions
    • Such decisions typically require �data massaging�
    • Often used to store historical data
    • Structure is quite different



DBMS Functions



  • Metadata/Data Dictionary Management
  • Data storage management
  • Data transformation and presentation
  • Security management and Multiuser access control
  • Backup and recovery management
  • Data integrity management
  • Database language and application programming interfaces
  • Database communication interfaces

Database Models


Collection of logical constructs used to represent data structure and relationships




  • Conceptual Models: logical nature of data representation
  • Implementation Models: how data are represented

Database Models


The hierarchical and network models are of historical interest only.


Database Models:



  • Relational
  • Entity-Relationship
  • Object oriented


Relational Model



  • Most common model
  • Perceived by user as collection of tables containing data
  • Actually has a formal definitin based on set theory
  • Tables are a series of row/column intersections
  • Tables related by sharing common entity characteristic(s)

Relational Database


Relational Tables


Relational Database Model Advantages



  • Structural independence
  • Improved conceptual simplicity
  • Easier database design, implementation, management, and use
  • Ad hoc query capability with SQL (standard interface)
  • Powerful database management system


Relational Database Model Disadvantages



  • Substantial hardware and system software overhead
  • Poor design and implementation is made easy
  • Not a cure all: May promote "islands of information" problems
  • SQL is not completely standardized. One DBMS is not a "drop in"
    replacement for another.
  • May have problems storing some types of data


Entity Relationship Database Model



  • Primarily a database design tool.
  • Complements the relational data model concepts
  • Represented in an entity relationship diagram (ERD)
  • Based on entities, attributes, and relationships

ER-Diagram


Figure 01-14


ER Model Advantages



  • Conceptual simplicity
  • Visual representation
  • Effective communication tool
  • Integrated with the relational database model


ER Model Disadvatages



  • Limited constraint representation
  • Limited relationship representation
  • No data manipulation language
  • Loss of information content
  • May be overly complex for end users

Object-Oriented Model



  • Objects or abstractions of real-world entities are stored
  • Attributes describe properties
  • Collection of similar objects is a class
  • Methods represent real world actions of classes
  • Classes are organized in a class hierarchy
  • Objects inherit attributes and methods of classes above.


Object Oriented Model


Fig 1.15


OO Model Advantages



  • Adds semantic context
  • Structural and data independence
  • May mesh well with Object Oriented Programming

OO Model Disadvantages



  • Lack of standards in model
  • Lack of standard manipulation languages
  • Complex navigational data access
  • Steep learning curve
  • Poor performance







No comments: