Docsity

Introduction to Database Systems - Database Systems - Lecture Slides, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Introduction to Database Systems - Database Systems - Lecture Slides and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Introduction to Database

Systems

Why Study Databases?

  • Databases are useful
    • Many computing applications deal with large amounts of information
    • Database systems give a set of tools for storing, searching and managing this information - Databases in CS - Databases are a ‘core topic’ in computer science - Basic concepts and skills with database systems are part of the skill set you will be assumed to have as a CS graduate

Databases

  • Web indexes
  • Library catalogues
  • Medical records
  • Bank accounts
  • Stock control
  • Personnel systems
  • Product catalogues
  • Telephone

directories

  • Train timetables
  • Airline bookings
  • Credit card details
  • Student records
  • Customer histories
  • Stock market prices
  • Discussion boards
  • and so on…

Database Systems

  • A database system

consists of

  • Data (the database)
  • Software
  • Hardware
  • Users
  • We focus mainly on

the software

  • Database systems

allow users to

  • Store
  • Update
  • Retrieve
  • Organise
  • Protect

their data.

Database Management

Systems

  • A database is a

collection of

information

  • A database

management system

(DBMS) is the

software than

controls that

information

  • Examples:
    • Oracle
    • DB2 (IBM)
    • MS SQL Server
    • MS Access
    • Ingres
    • PostgreSQL
    • MySQL

What the DBMS does

  • Provides users with
    • Data definition language (DDL)
    • Data manipulation language (DML)
    • Data control language (DCL)
  • Often these are all

the same language

  • DBMS provides
    • Persistence
    • Concurrency
    • Integrity
    • Security
    • Data independence
  • Data Dictionary
    • Describes the database itself

File Based Systems

  • File based systems
    • Data is stored in files
    • Each file has a specific format
    • Programs that use these files depend on knowledge about that format - Problems: - No standards - Data duplication - Data dependence - No way to generate ad hoc queries - No provision for security, recovery, concurrency, etc.

Relational Systems

  • Problems with early

databases

  • Navigating the records requires complex programs
  • There is minimal data independence
  • No theoretical foundations - Then, in 1970,

E. F. Codd wrote “A

Relational Model of

Data for Large

Shared Databanks”

and introduced the

relational model

ANSI/SPARC Architecture

  • ANSI - American

National Standards

Institute

  • SPARC - Standards

Planning and

Requirements

Committee

  • 1975 - proposed a

framework for DBs

  • A three-level

architecture

  • Internal level: For systems designers
  • Conceptual level: For database designers and administrators
  • External level: For database users

Internal Level

  • Deals with physical

storage of data

  • Structure of records on disk - files, pages, blocks
  • Indexes and ordering of records
  • Used by database system programmers - Internal Schema RECORD EMP LENGTH= HEADER: BYTE(5) OFFSET= NAME: BYTE(25) OFFSET= SALARY: FULLWORD OFFSET= DEPT: BYTE(10) OFFSET=

External Level

  • Provides a view of

the database tailored

to a user

  • Parts of the data may be hidden
  • Data is presented in a useful form
  • Used by end users and application programmers - External Schemas Payroll: String Name double Salary

**Personnel: char Name char Department

Mappings

  • Mappings translate

information from one

level to the next

  • External/Conceptual
  • Conceptual/Internal
  • These mappings

provide data

independence

  • Physical data

independence

  • Changes to internal level shouldn’t affect conceptual level
  • Logical data

independence

  • Conceptual level changes shouldn’t affect external levels