0% found this document useful (0 votes)
12 views

1 Introduction

The document provides an introduction to principles of database systems including an overview of database evolution, capabilities of database management systems, examples of database applications, differences between file systems and database management systems, basic concepts of data modeling and structuring, and an introduction to the SQL query language.

Uploaded by

mohamed eldosuky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

1 Introduction

The document provides an introduction to principles of database systems including an overview of database evolution, capabilities of database management systems, examples of database applications, differences between file systems and database management systems, basic concepts of data modeling and structuring, and an introduction to the SQL query language.

Uploaded by

mohamed eldosuky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Principles of Database Systems

CSC 203

Lecture 1 introduction to
Database Systems

Associate. Prof Dr. Mohamed A. El-dosuky


In Science – Turing Awardees
The ACM A.M. Turing Award is an annual prize given by the 
Association for Computing Machinery (ACM) to an individual selected for contributions "of
lasting and major technical importance to the computer field"

CHARLES BACHMAN, 1973 EDGAR CODD, 1981


- Known for his work in the early development
of database management systems.
-Invented Relational model (RM),
the theoretical basis for relational
databases and relational database
management systems.

MICHAEL STONEBRAKER, 2014


JAMES GRAY, 1998
-Research and products are central
-For contributions to database
to many relational database systems
and transaction processing
research

2
Course Description
• Study the fundamentals of relational database
management systems (RDBMS)
• Learn the principles of designing and developing
applications using relational database systems.
• Materials include, but are not limited to
– the ER (Entity-Relationship) model and its mapping to the
relational data model
– the algebraic language in the relational data model and its
relationship to the commercial relational query language: SQL
– database design that conforms to different normal forms,
database applications, database indexing, transaction
management, recovery and other advanced topics
3
Course Goal

1. How to use a database system?


– Conceptual data modeling, the relational and other data models,
database schema design, relational algebra, and the SQL query
language
– ……

2. How to design and implement a database system?


– Indexing, transaction processing, and crash recovery
– ……

3. How to create elementary database system


applications
4
Textbook

5
Project
• A database-driven information system
– Select a real-world application that needs databases as backend
systems
– Design and build it from start to finish
– Your choice of topic: useful, realistic, database-driven, Web-
based
• Requirement
– Team work (one to three people)
• all members receive same grading, and if one drops out, the
others pick up the work
– Will be done in stages
• you will submit some deliverables at the end of each stage
6
Data Management Evolution

Jim Gray: Evolution of Data Management.


IEEE Computer 29(10): 38-46 (1996):
– Manual processing: -- 1900
– Mechanical punched-cards: 1900-1955
– Stored-program computer-- sequential record processing: 1955-
1970
– Online navigational network DBs: 1965-1980
• many applications still run today!
– Relational DB: 1980-1995
– Post-relational and the Internet: 1995-
7
Capabilities of DBMS
• Persistent Storage
– Data Structures for efficient access to very large amounts of
data
• Programming Interface
– More than reading and writing of files. Access and modify
data through a query language
• Transaction Management-  ACID 
– a set of properties of  database transactions intended to
guarantee validity even in the event of errors, power failures,
etc
• Atomicity : each transaction is treated as a single unit
• Consistency: any data written to the database must be valid
according to all defined rules, 
• Isolation:  controls how and when changes are made and if they
become visible to each other, users, and systems
• Durability: completed transactions  will survive permanently
8
Example: Banking System
• Data
• Information on accounts, customers, balances, current interest
rates, transaction histories, etc.
• MASSIVE
• keep history of all transactions, even more if keep images of
checks -> Far too big for memory
• PERSISTENT
• data outlives programs that operate on it

9
Example: Banking System
• SAFE:
– from system failures
– from malicious users
• CONVENIENT:
– simple commands to get accounts, write statement, transfer funds, etc.

– also unpredicted queries should be easy


• EFFICIENT:
– don't search all files in order to - get balance of one account, get all
accounts with low balances, get large transactions, etc.
– massive data! -> DBMS's carefully tuned for performance

10
Why File Systems Won’t Work?
• Storing data: file system is limited
– size limit by disk or address space
– when system crashes we may lose data
– Password/file-based authorization insufficient
• Query/update:
– need to write a new C++/Java program for every new query
– need to worry about performance
• Concurrency: limited protection
– need to worry about interfering with other users
– need to offer different views to different users (e.g. registrar, students,
professors)
• Schema change:
– entails changing file formats
– need to rewrite virtually all applications
That’s why the notion of DBMS was motivated!
11
DBMS Architecture
User/Web Forms/Applications
query transaction DDL commands

Query Parser Transaction Manager DDL Processor

Query Rewriter

Query Optimizer Concurrency Logging &


Control Recovery
Query Executor

Records Indexes
Lock Tables
Buffer:
Buffer Manager
data, indexes, log, etc
Main Memory
Storage Manager

Storage data, metadata, indexes, log, etc


CS411 12
Data Structuring: Model, Schema, Data
• Data model
– conceptual structuring of data stored in database
• E.g. arrays, objects in C or Java
• Data: set of records
– ex:, for a university system, student table
• each with student-ID, name, address, courses, photo
– ex: airplane system:
• data is graph where nodes represent cities, edges represent airline routes
• Schema versus data  
– schema: describes how data is to be structured, defined at set-up time, rarely
changes (also called "metadata")
• A set of attributes with a name for a relation
• Student(Id, Name, Address, Courses,..)
– data is actual "instance" of database, rows of relations(tables) changes
rapidly
• Each row has a component(value) for each attribute of relation defined in schema
13
Schema vs. Data
• Schema: name, name of each field, the type of each
field
– Students (Sid:string, Name:string, Age: integer, GPA: real)
– A template for describing a student
• Data: an example instance of the relation
Sid Name Age GPA
0001 Alex 19 3.55
0002 Bob 22 3.10
0003 Chris 20 3.80
0004 David 20 3.95
0005 Eugene 21 3.30

14
Characteristics of Databases

• Data - stored in tables - rows and columns


• Each row in a table stores data about an instance.
• A database may have multiple tables
• A database stores data and relationships.

15
Data in Tables

?
Any problem?
16
Related Tables

17
Components of a Database System

How does application communicate with DBMS?

18
Components of a Database System : SQL

19
SQL

• Data definition language (DDL)


– commands for setting up schema of database
• CREATE, DROP, ALTER

• Data Manipulation Language (DML)


– Commands to manipulate data in database:
• Select, INSERT, DELETE, UPDATE
– Also called "query language“
– Does not affect schema 

20
Examples
• Create another column e.g. address
– DDL
• Insert another student information
– DML

Sid Name Age GPA


0001 Alex 19 3.55
0002 Bob 22 3.10
0003 Chris 20 3.80
0004 David 20 3.95
0005 Eugene 21 3.30

21
People of DBMS
• DBMS user: queries/modifies data
• DBMS application designer
– set up schema, loads data, …

• DBMS administrator
– user management, performance tuning, …
• DBMS implementer: builds systems

22
What You Need To Learn

23
Questions

Any questions?

24

You might also like