database technology n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Database Technology PowerPoint Presentation
Download Presentation
Database Technology

Loading in 2 Seconds...

play fullscreen
1 / 34

Database Technology - PowerPoint PPT Presentation


  • 95 Views
  • Uploaded on

Database Technology. Session II 10:15 - 11:00 Dr S Sudarshan & Dr D B Phatak IIT Bombay. OVERVIEW. Storage devices Files and Index Structures Legacy Systems and Cobol Relational Databases and SQL Transactions and ACID properties System Architectures Security and Audit.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Database Technology' - brook


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
database technology

Database Technology

Session II 10:15 - 11:00

Dr S Sudarshan & Dr D B Phatak

IIT Bombay

overview
OVERVIEW
  • Storage devices
  • Files and Index Structures
  • Legacy Systems and Cobol
  • Relational Databases and SQL
  • Transactions and ACID properties
  • System Architectures
  • Security and Audit

Data Base Technologies

storage devices
Storage Devices
  • Main memory
    • volatile, lost on power failure
    • expensive and relatively small
  • Hard disk
    • non-volatile, reasonably fast access
    • relatively cheap, and large
    • main storage system for databases
    • Mean time to Failure: ~5 years

Data Base Technologies

raid systems
RAID Systems
  • Goal: improve storage reliability
  • Data stored on multiple disks
    • if one disk fails, data still available on others
  • Essential for safety of data
  • Hardware RAID
    • expensive, very high availability
    • for 24x7 applications (24 hrs X 7 days/wk)
  • Software RAID
    • cheaper, use if some downtime is allowable

Data Base Technologies

storing data on disks
Storing Data on Disks
  • Byte: unit of information
    • one character
  • File:
    • sequence of bytes
  • File system:
    • stores multiple files
    • organizes files into directories/folders

Data Base Technologies

file structure
File Structure
  • Information stored within large files
  • Sequential files
    • sorted on a key (e.g., account number)
  • Index needed for efficient access
    • e.g. find information of account 2345
    • similar to library card catalogs

Data Base Technologies

traditional file processing
Traditional File Processing
  • COBOL:
    • Common Business Oriented language
  • Files contain sequence of records,
    • e.g. Record per account
  • Complex program for each task
    • e.g. withdrawal, deposit, average balance, …
  • File structures often very complex
    • motivated by efficiency, but become hard to understand

Data Base Technologies

segment of a sample cobol program
SEGMENT OF A SAMPLE COBOL PROGRAM

Open Input SALARYTABLE-FILE.

    • Perform Varying I from 1 to 11.
    • Move zero to GROUPTOT [I].
    • END-PERFORM.
  • PROCESS-NEXT.
    • Read EMPTAB-FILE
    • At End Go To End-job.
    • - - - - -
    • Add salary to Group tot [K].
    • Go to Process-Next.
  • END-JOB.
  • - - - -

Data Base Technologies

programming paradigms
PROGRAMMING PARADIGMS
  • 4 GL: What to do
    • Set processing
  • 3 GL: How to do (Algorithm)
    • Record by Record Processing
  • 2 GL: Algorithm at the lowest level
    • Details of Individual Operations

Data Base Technologies

relational databases
Relational Databases
  • Motivation:
    • simplify storage structures
    • easy to use language for queries/updates
    • efficiency is job of system
      • automatic optimization
  • Legacy systems
    • Systems built using COBOL and older data models
    • Still in wide use, but declining usage

Data Base Technologies

relational databases provide
Relational Databases Provide:
  • Tabular Data model: simple, yet powerful
  • A Standard Query Language: SQL
  • Mature Products with Reliable, Fault-Tolerant Operations available
  • Good Performance
    • High number of transactions per second
    • Parallel operation for scalability (handle growth)
  • Distributed and Replicated Data Bases
    • Interoperation, High availability

Data Base Technologies

relational model tabular data
Relational Model: Tabular Data

Account

Transactions

Data Base Technologies

querying the database using sql
Querying the Database using SQL
  • select name, balancefrom accountwhere name = “D. B. Phatak”
  • insert into transactions values (3/5/99, cash, 5000, -, 14000)
  • select acct-num, avg(balance)from transactionswhere date between 1/4/99 and 30/4/99groupby acct-num

Data Base Technologies

transactions acid properties
Transactions: ACID Properties
  • Transactions:
    • e.g. Debit/credit
  • Problems:
    • Failures (e.g., power, disk storage)
    • Concurrent transactions
  • Solution:
    • Support for ACID properties

Data Base Technologies

acid properties
ACID Properties
  • Atomicity: Transaction appears to either run completely or not at all -- no partial state
  • Consistency: Integrity checks (e.g., balance >= 0)
  • Isolation: Locks on data so that transactions do not step on each others toes
  • Durability: Data/updates are never lost

Data Base Technologies

database application classes
Database Application Classes
  • OLTP: Online Transaction Processing
    • supports many small transactions
  • Decision Support
    • Summaries/aggregates
    • OLAP: Online Analytical Processing

Data Base Technologies

performance issues
Performance Issues
  • Important for high volume systems
    • e.g., internet banking
  • Sizing / Performance tuning
    • deciding on CPUs, memory size, disk size, number of disks, etc
    • tuning transaction code
      • to reduce disk I/O
      • to reduce lock conflicts between concurrent transactions
  • Scalability via parallelism
    • Smoothly handling more traffic as the business grows

Data Base Technologies

access security
Access Security
  • Authentication
    • Identifying who a person is
    • Passwords
      • widely used, but quite insecure
    • Smart cards, biometrics, etc
      • More on this later
  • Access privileges
    • who is allowed to do what
  • Audit trail
    • Trace back what happened

Data Base Technologies

authorization mechanisms
Authorization Mechanisms
  • Privileges
    • e.g., read table, update table, insert row in table, delete row from table, privilege to grant privileges
  • Each user given specific set of privileges he/she needs
  • Roles
    • privileges given to roles
      • (e.g., teller, manager)
    • users authorized to play roles

Data Base Technologies

audit trails
Audit Trails
  • Database keeps track of all transactions in an audit table
    • what the transaction did, and who ran it
  • Mechanisms for tracing back what transactions affected a particular entity (such as an account)

Data Base Technologies

more on security
MORE ON SECURITY
  • Encryption, Session Key
  • Data Encryption Standard (DES-3)
    • Shared Private key
  • RSA, DH Algorithms
    • Public/Private key

Data Base Technologies

slide22
SQL
  • SQL is Intergalactic Dataspeak
  • Strong Data Definition Language (DDL)
    • Domain Definitions
    • Integrity Constraints
  • Security & Access Control Provided
    • Views, Permissions
  • Interactive Queries

Data Base Technologies

slide23
SQL
  • Embedded SQL:
    • Use of SQL commands from within 3GL programs (programs in C/COBOL/…)
  • Open Data Base Connectivity (ODBC):
    • Standard for client server interconnectivity, using C language
  • JDBC: Like ODBC, for Java language
  • SQL Standards: 86, 89, 92, SQL-3 Draft

Data Base Technologies

slide24
SQL
  • No Standards for User Interface
    • Screens (Forms & Menus)
    • Reports
  • Special Tools Available
    • Native to Product
    • Independent Vendors

Data Base Technologies

24

database servers
DATABASE SERVERS
  • Major players
    • Oracle, IBM DB2, Microsoft SQL Server, Informix, Sybase, Ingress
  • Wide range of performance, features, and price

Data Base Technologies

database architectures
Database Architectures
  • Centralized
    • Dumb terminals connected to single server
  • Client Server
    • Smarter client machines connect to server
    • Main work still done at server
  • Parallel Servers
    • Work divided between multiple CPUs
  • Distributed
    • Multiple independent databases in cooperation

Data Base Technologies

evolution of client server computing
EVOLUTION OF CLIENT SERVER COMPUTING
  • Multiple Computers to Independently Handle Component Tasks of an Application
  • Need to Partition Tasks Judiciously

Data Base Technologies

two tier partitioning
TWO TIER PARTITIONING

Data Base Technologies

client server terminology
CLIENT - SERVER TERMINOLOGY
  • Service: Provided by the Server
    • Each Client Is a Consumer
  • Shared Resources : Managed by Server
  • Client : Initiator of a Request

Data Base Technologies

servers
SERVERS
  • File Servers : Novell
  • Database Servers : SQL
  • Transaction Servers : OLTP
    • TP lite (Stored Procedures)
    • TP heavy (TP monitors)

Data Base Technologies

server functions
SERVER FUNCTIONS
  • Wait for Requests
  • Handle Concurrent Transactions
  • Take care of VIP requests
    • Assign priorities
  • Authentication, Authorisation
  • Audit trails

Data Base Technologies

client functions
CLIENT FUNCTIONS
  • Typically Processes Running on Front-end Machine (PC)
  • Provide User Interface
  • Support Graphics, Multimedia

Data Base Technologies

three tier c s
THREE TIER C/S
  • Tier One : Client
  • Tier Two : Application Server
  • Tier Three: Database Server

Data Base Technologies

more c s terminology
MORE C/S TERMINOLOGY
  • Thin or Fat Client
  • Fat Server
  • n-Tier Architecture
  • OOUI

Data Base Technologies