Data Base Organization and File Structure Chapter 1 - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Data Base Organization and File Structure Chapter 1

Description:

... some aspect of real world, called mini world (models real world enterprise) ... add changes in mini world. Reduced application development ... Data Models ... – PowerPoint PPT presentation

Number of Views:1176
Avg rating:3.0/5.0
Slides: 33
Provided by: jiaw184
Learn more at: http://www.cs.uwm.edu
Category:

less

Transcript and Presenter's Notes

Title: Data Base Organization and File Structure Chapter 1


1
Data Base Organization and File Structure
Chapter 1
  • Suresh Choubey, Ph.D.

2
Chapter 1 Introduction
  • What is a data database?
  • A database is a collection of very large
    integrated collection of related data
  • Data are facts about people, event and other
    entities that can be recorded and that have
    implicit meaning, e.g., name, address and
    telephone of all people we know

3
Chapter 1 Introduction
  • Characteristics of a database?
  • A database is logically coherent collection of
    data with some inherent meaning
  • A database is designed, built and populated with
    data for a specific purpose
  • A database represents some aspect of real world,
    called mini world (models real world enterprise)
  • Entities, relationship

4
Chapter 1 Introduction
  • What is a database management system?
  • Database management systems (DBMS) is a
    collection of programs that enables users to
    create (store) and maintain a database. It
    involves design, construction (storage of data)
    and manipulation
  • Database systems DBMS database

5
Chapter 1 Introduction
  • Characteristics of database approach
  • Self-contained nature of database systems
  • Data meta data constraints on data are stored
    together in system catalog
  • Application programs are independent of data
  • Insulation between programs and data
  • DBMS access programs are independent of files
  • This property is called program-data independence

6
Chapter 1 Introduction
  • Characteristics of database approach(Cont. .)
  • Data abstractionDBMS gives conceptual
    representation of data, e.g. data model
  • Support of multiple views of data
  • Different users have differing views of database
  • Virtual data can be derived

7
Chapter 1 Introduction
  • Intended use of DBMS approach
  • Controlled redundancy
  • Redundancy causes duplication of efforts, wastage
    of storage space and inconsistency
  • Controlled redundancy may be useful in saving
    access time as some controlled data are stored at
    more than one place
  • Sharing of data
  • Requires concurrency control measures

8
Chapter 1 Introduction
  • Intended use of DBMS approach (Cont. .)
  • Restricting unauthorized access
  • DBMS provides security and authorization
    subsystems
  • Providing multiple interfaces
  • Query language for casual users, programming
    language for application programmers, forms for
    pragmatic users, menu driven interfaces for
    native users and natural language interfaces

9
Chapter 1 Introduction
  • Intended use of DBMS approach (Cont. .)
  • Representing complex relationships among data
  • Enforcing Integrity constraints
  • Providing backup and Recovery from crashes
  • Potential for enforcing standards
  • Flexibility can add changes in mini world
  • Reduced application development time

10
Chapter 1 Introduction
  • Intended use of DBMS approach (Cont. .)
  • Availability of up-to-date information
  • Economics of scale
  • Permits consolidation of data and application
  • Uniform data administration

11
Chapter 1 Introduction
  • Disadvantages of DBMS approach
  • High cost due to high initial investment for h/w
    and s/w and incorporation of sub-systems for
    security, concurrency control, recovery and
    integrity function
  • Security Problems
  • Initial development time

12
Chapter 1 Introduction
  • File Vs databases (Slide from text book author)
  • Application must stage large datasets between
    main memory and secondary storage (e.g.,
    buffering, page-oriented access, 32-bit
    addressing, etc.)
  • Special code for different queries
  • Must protect data from inconsistency due to
    multiple concurrent users
  • Crash recovery
  • Security and access control

13
Chapter 1 Introduction
  • Why study databases ? (Slide from text book
    author)
  • Shift from computation to information
  • at the low end scramble to webspace (a mess!)
  • at the high end scientific applications
  • Datasets increasing in diversity and volume
  • Digital libraries, interactive video, Human
    Genome project, EOS project
  • ... need for DBMS exploding

14
Chapter 1 Introduction
  • Why study databases ? (Slide from text book
    author)
  • DBMS encompasses most of CS
  • OS, languages, theory, AI, multimedia, logic

15
Chapter 1 Introduction
  • Personnel
  • DBA responsible for database and DBMS, account
    allocation, security maintenance
  • Database designers
  • Identify data and design data structures
  • Identify views and combine them
  • DBMS designers and implementers

16
Chapter 1 Introduction
  • Personnel (Cont. .)
  • End users access database for querying,
    updating and generating reports
  • Casual end users
  • Naïve or parametric end users use canned
    transactions
  • Sophisticated end users
  • Tool developers
  • Operators and maintenance personnel

17
Chapter 1 Introduction
  • DBMS can be network, relational, hierarchical and
    others
  • DBMS can also be single-user or multi-user
  • DBMS can be centralized or distributed (DDBMS)
  • homogeneous(use same DBMS s/w at multiple sites)
  • Heterogeneous (use s/w to access several
    autonomous pre-existing database)

18
Chapter 1 Introduction
  • Data Models
  • Is a set of concepts that describes the structure
    of the database (i.e., data types, relationship
    and constraints that should hold on data)
  • Is a set of operators for specifying retrievals
    and updates on database
  • Provides abstraction

19
Chapter 1 Data Models
  • A schema is a description of a particular
    collection of data, using the a given data model
  • The relational model of data is the most widely
    used model today
  • Main concept relation, basically a table with
    rows and columns
  • Every relation has a schema, which describes the
    columns, or fields

20
Chapter 1 Data Models Cocepts
  • High level called object based models
  • Entity - is an object hat is represented in the
    database
  • Attribute is a property that describes some
    aspects of object
  • Relationship
  • Implementation Level record-based data models
    such as relational and network
  • Physical data models describes how data is
    stored in the computer by representing
    information such as record formats, record
    orderings and access path

21
Chapter 1 Data Models
  • Database SchemasIs the description of database.
    Schema diagrams are used to represent it. Schema
    diagram consists of schema construct. e.g.,
    Student
  • It does not change frequently
  • Called INTENSION
  • Database Instance Data in database at a
    particular time or occurrence or state
  • called EXTENSION

22
Chapter 1 DBMS Architecture (Three schema or
ANSI-SPARC)
External view - 1
External level or view level
External View - n
External/Conceptual mapping
Conceptual Schema
Conceptual level
Conceptual/Internal mapping
Internal Schema
Internal level
Stored database
23
Chapter 1 Data Models
  • Many views, single conceptual (logical) schema
    and physical schema
  • External View contains n view, each view schema
    describing view of one user
  • Conceptual View describes structure of whole
    database for a community of users
  • Internal View describes physical storage
    structure of database
  • Provides abstraction

24
Chapter 1 Data Models
  • Mapping required to map users request to
    conceptual to internal to stored database and
    then back after formatting it to suit the users
    view of database
  • Data Independence Capacity to change the
    conceptual schema without having to change
    external schema or application programs
  • Applications insulated from how data is
    structured and stored

25
Chapter 1 Data Models
  • Logical Data Independence Protection from
    changes in logical structure of data
  • Physical Data Independence Protection from
    changes in physical structure of data

26
Chapter 1 Data Models
  • Physical Data Independence Physical data
    independence capacity to change the internal
    schema without having to change the conceptual
    (or external) schema
  • Change to reorganize physical files by creating
    additional access structures
  • Mapping information is stored in catalog
  • Disadvantages Overhead when compiling or
    executing a query or program ? inefficiency in
    DBMS

27
Chapter 1 Data Models
  • Example University Database
  • Conceptual schema
  • Students(sid string, name string, login
    string, age integer, gpareal)
  • Courses(cid string, cnamestring,
    creditsinteger)
  • Enrolled(sidstring, cidstring,
    gradestring)
  • Physical schema
  • Relations stored as unordered files
  • Index on first column of Students
  • External Schema (View)
  • Course_info(cidstring,enrollmentinteger)

28
Chapter 1 DBMS Languages
  • DDL can be used to define conceptual and
    internal schema in DBMS, where there is no strict
    separation
  • DDL is used to specify conceptual and SDL to
    specify internal where there is separation
  • VDL is used to specify user views and their
    mapping to conceptual
  • VDL statements can be compiled separately or can
    be imbedded in a programming language

29
Chapter 1 DBMS Languages
  • DML is used for retrieval, insertion, deletion
    and modification of data
  • High level or non-procedural DML
  • Can be used to specify complex database operation
  • Called set-at-a-time or set oriented DML
  • Low level or procedural DML
  • Embedded in a general-purpose programming
    language
  • Called record-at-a-time DML

30
Chapter 1 DBMS Languages
  • DML is declarative as it set what to retrieve
    and not how to retrieve
  • When DML is embedded in a programming language
  • DML is called data sub-language
  • Programming language is called host language
  • DML standalone is called Query Language

31
DBMS architecture (Slide from text book author)
These layers must consider concurrency control
and recovery
  • A typical DBMS has a layered architecture
  • The figure does not show the concurrency control
    and recovery components
  • This is one of several possible architectures
    each system has its own variations

32
Chapter 1 Summary (Slide from text book author)
  • DBMS used to maintain, query large datasets.
  • Benefits include recovery from system crashes,
    concurrent access, quick application development,
    data integrity and security
  • Levels of abstraction give data independence
  • A DBMS typically has a layered architecture
  • DBAs hold responsible jobs and are well-paid
  • DBMS RD is one of the broadest, most exciting
    areas in CS
Write a Comment
User Comments (0)
About PowerShow.com