Introduction to database systems fundamental concepts
This presentation is the property of its rightful owner.
Sponsored Links
1 / 20

Introduction to Database Systems Fundamental Concepts PowerPoint PPT Presentation


  • 44 Views
  • Uploaded on
  • Presentation posted in: General

Introduction to Database Systems Fundamental Concepts. Irvanizam Zamanhuri, M.Sc Computer Science Study Program Syiah Kuala University Website: http://www.informatika.unsyiah.ac.id Email: [email protected] Users/Programmers. Database System.

Download Presentation

Introduction to Database Systems Fundamental Concepts

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


Introduction to database systems fundamental concepts

Introduction to Database SystemsFundamental Concepts

Irvanizam Zamanhuri, M.Sc

Computer Science Study Program

Syiah Kuala University

Website: http://www.informatika.unsyiah.ac.id

Email: [email protected]


A dbms presents programmers and users with a simplified environment

Users/Programmers

Database System

Queries / Application Programs

DBMS Software

Software to Process Queries / Programs

Software to Access Stored Data

Stored Database Definition

Stored

Database

(Metadata)

A DBMS Presents Programmers and Users with a Simplified Environment

“Catalogue”,

“Data dictionary”


Data model schema and instance

Schema

A formal definition that fixes all the relevant features of those parts of the real world that are of interest to the users of the database

The schema of a db is held in the data dictionary

Data Model

A set of concepts that can be used to describe the structure of a database: the data types, relationships, constraints, semantics and operational behaviour

Hides details of data storage

Data Model, Schema and Instance

Student(studno,name,address)

Course(courseno,lecturer)

Student(123,Bloggs,Bolzano)

Course(CS321,Franconi)

Schema (in relational data model)

Instance


Other data models

ADDER

CPU

A

FA

Adder

ALU

ADDER

Other Data Models

Relational model is good for:

Large amounts of data  simple operations

Navigate among small number of relations/tables

Difficult Applications for relational model:

  • VLSI Design (CAD in general)

  • CASE

  • Graphical Data

  • Bill of materials, transitive closure

ALU


Object data models

Object Data Models

Where number of “relations” is large, relationships are complex

  • Object Data Model

  • “Knowledge Data Model” (= Objects + Deductive Rules)

    OBJECT DATA MODEL

    1. Complex Objects – Nested Structure (pointers or references)

    2. Encapsulation, set of methods/access functions

    3. Object Identity

    4. Inheritance – Defining new classes like old classes

    Object model: usually find objects via explicit navigation

    Also query language in some systems


Data models

Data Models

60’s

70's

80's

90’s

now

Hierarchical

Network

Relational

Choice for most new applications

Object Bases

Knowledge Bases


Sharing multiple views of data

Sharing—Multiple views of data

Database Management System

Database


Characteristics of the db approach

Characteristics of the DB Approach

  • Insulation of programs and data

  • Support of multipleuser views

  • Use of a catalogue to store the schema

     How can we realise these principles?


Three levels of abstraction

View 1

View 2

View 3

Conceptual Schema

Physical Schema

Three Levels of Abstraction

ANSI/SPARC architecture for DBMSs (1978):

  • Manyexternalviews

  • Oneconceptual(= logical) schema

  • Onephysical(= internal) schema

    • Views describe how users see the data

    • Conceptual schema defines logical structure

    • Physical schema describes the files and indexes used

mappings

mapping


Data independence

Data Independence

New functions

New

Change in

hardware

use

New

users

New data

Database

User's

view

Change in

New storage

technology

Linkage to other

techniques

databases

  • Logical data independence

    • change the conceptual schema without having to change the external schemas

  • Physical data independence

    • change the internal schema without having to change the conceptual schema

      Change the mapping, not the schema!


Database languages

Database Languages

  • Data Definition Language (DDL)

    • Commands for setting up schema of database

    • Process of designing schema can be complex, may use design methodology and/or tool

  • Data Manipulation Language (DML)

    • Commands to manipulate data in database: RETRIEVE, INSERT, DELETE, MODIFY

    • Also called “query language”


Host languages

Host Languages

C, C++, Fortran, Lisp, Java, Perl, …

Application prog.

Host language is completely general (Turing complete)

but gives you no support

Query language—less general “non procedural” and

optimizable

DBMS

Calls to

DB

Local Vars

(Memory)

(Storage)


Building an application with a dbms

Building an Application with a DBMS

  • Requirements gathering (natural language, pictures)

  • Requirements modeling (conceptual data model, ER)

    • Decide what entities should be part of the application and how they should be related

  • Schema design and implementation

    • Decide on a set of tables, attributes

    • Create the tables in the database system

    • Populate database (insert records/tuples)

  • Write application programs using the DBMS

    • … way easier now that the data management is taken care of


Introduction to database systems fundamental concepts

Conceptual Modeling

name

category

name

cid

ssn

Takes

Course

Student

quarter

Advises

Teaches

Professor

name

faculty

office


Schema design and implementation

Schema Design and Implementation

  • Tables:

  • Separates the logical view from the physical view of the data.

Student:

Takes:

Course:


Querying a database

Querying a Database

  • “Find all courses that Mary takes”

  • S(tructured) Q(uery) L(anguage)

  • Query processor figures out how to answer the query efficiently

select C.namefrom Student S, Takes T, Course Cwhere S.name=“Mary” and S.ssn = T.ssn and T.cid = C.cid


Query optimization

sname

cid=cid

sid=sid

name=“Mary”

Course

Takes

Student

Query Optimization

Goal:

Declarative SQL query

Imperative query execution plan

select C.name

from Student S, Takes T, Course C

where S.name=“Mary” and

S.ssn = T.ssn and T.cid = C.cid

Plan:Tree of relational algebra operators, choice of algorithm at each operator

Ideally: Want to find best plan. Practically: Avoid worst plans!


Traditional and novel data management issues

Traditional and NovelData Management Issues

  • Traditional Data Management:

    • relational data for enterprise applications

    • storage

    • query processing/optimization

    • transaction processing

  • Novel Data Management:

    • Integration of data from multiple databases, warehousing

    • Data management for decision support, data mining

    • Exchange of data on the web: XML


Database industry

Database Industry

  • Relational databases are a great success of theoretical ideas

  • Big DBMS companies are among the largest software companies in the world

    • Oracle

    • IBM (with DB2)

    • Microsoft (with SQL Server, Microsoft Access)

    • Sybase

  • $20B industry


Databases as a research area

Databases as a Research Area

  • Several aspects:

    • Modeling and design of databases

    • Database programming: querying and update operations

    • Database implementation

  • The study of databases cuts across many fields of Computer Science:

    • Operating systems

    • Formal languages

    • Artificial intelligence

    • Logic

    • Multimedia

    • Theoretical CS


  • Login