&KDSWHU 'LDJQRVLVDQG0DQDJHPHQW · 1 1 1 1 1 1 ¢1 1 1 ï1 1 1 1 1 1
Class363 1
-
Upload
prince-sallue -
Category
Technology
-
view
69 -
download
0
description
Transcript of Class363 1
Introduction to Database Systems
Lecture #1
Dated: 19-10-2007
Classes: 01:30 PM – 03:00 PM Thursday11:30 AM – 01:00 PM Friday
Instructor: Nauman Riaz Chaudhry Cell: 0300-9503200 Email: [email protected]
Course Overview
Background and History Data Models
E/R Model Relational Model Object Oriented Model XML and Database
Database Programming Relational Algebra SQL Object Oriented
Textbook
C. J. Date “An Introduction to Database Systems ”, Seventh Edition, Pearson Education
Jeffrey D. Ullman and Jennifer Widom, “A First Course in Database Systems”, Second Edition, Prentice Hall, 2001
Other useful textbooks: Fundamentals of Database Systems (Elmasri and
Navathe) Database System Concepts (Abraham Siberschatz, Henry
F.Korth and S.Sudarshan) Database Management Systems (Ramakrishnan)
Tentative Schedule
Introduction (1-2 classes) E/R Model (2-3 classes) Relational Model (3-4 classes) Other Models (2-3 classes) Relational Algebra (3-4 classes) SQL (4-5 classes) Constraints and triggers (1-2 classes) System Aspects of SQL (3-4 classes) XML (3-4 classes)
Course Load
3 - 5 homework assignments 1 project 5 Quiz's A Midterm Exam A Final Exam
Homework and project assignments are due in the beginning of class one or two weeks that follows. Late homework will not be accepted, and a score of zero will be assigned for that assignment.
Course Policy
exams: no access to any material nor discussion with anyone (except the instructor) is allowed.
assignments: solutions should be developed independently. Stealing, giving or receiving any code drawings, diagrams, text, or designs from another person is not allowed.
max penalty for academic dishonesty: F in the course; reported to the university.
Grading Policy
The grade will be calculated using the following weights: Homework and Quizzes 15% Project 10% Mid-term Exams 25% Final Exam 50%
Starting from now … Something completely different!
What is Database?
Essentially, a database is a set of data, or a collection of information. These data are related.
Examples: Student Information
human genome sequence company products information
More Examples
Airline Reservation Systems Reservations by a single customer on a single flight,
including such information as assigned seat or meal preference
Information about the flight, the airports thy fly from and to, the departure and arrival times, etc.
Ticket prices, requirements, and availability
Banking Systems Customers, accounts, loans and the balances Deposit or withdraw money
What’s DBMS?
DataBase Management System (DBMS) A powerful tool for creating and manage large
amounts of data efficiently and allowing it to persist over long periods of time, safely. It also provides efficient accesses to multiple users.
It is used to manage databases.
DBMS capabilities
Persistent Storage Programming Interface Transaction management
DBMS capabilities (Cont.)
Allow users to create databases and specify their schema, using data-definition language.
Allow users to query and modify the data, using data-manipulation language.
Support the storage of very large amount of data over a long period.
Data consistency and failure recovery.
File System
Why not using file system? Can be used to store data information for a long
period as well. Consistency and failure recovery capability
Problems: no query language, no efficient access for a data
item support of the creation of database is limited consistency control is not adequate
Management of Data is complex
DBMS Evolution
File Systems Hierarchical Model (Tree-based) Network Model (Graph-based) Relational Model Object Oriented Model Object/Relational Model
Relational Database System
Ted Codd 1970 The view of data: relations relations, tuples, attributes tables, rows, columns Queries could be expressed in high level
language, it is simple and efficient It is widely used in most commercial
systems
Example 1.1
AccountNo Balance Type
12345 1000.00 Savings
67890 2846.92 checking
… … …
Bank Account Information(Accounts)
Example 1.1 (Cont.)
Check the balance SELECT balance
FROM Accounts WHERE accountNo= 67890 Check the accountNo SELECT accountNo
From Accounts WHERE type=‘savings’ AND balance < 0
Major DBMS Products
Oracle IBM: DB2, Informix Microsoft: SQL Server, Access Sybase MySQL Postgres
All are "relational" (or "object-relational") database systems at their core.
Schema versus data
Schema describes how data is to be structured - defined at set-up time, rarely changes (part of the "metadata")
Data is actual "instance" of database, may change rapidly
Comparable to types and variables in programming 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"
People
DBMS implementer: builds system Database designer: establishes
schema Database administrator: loads data,
keeps whole thing running Database user: queries/modifies data
DBMS Evolution Trends
Size smaller and smaller using personal computer, similar to applications such as
spreadsheet and word processing bigger and bigger terabytes or even petabytes data, using tertiary storage
and parallel computing techniques. Architecture Client-server architecture (Two-Tier) client database Server Multi-Tier architecture: client application server database server
DBMS Trends (Cont.)
Versatile Data type integers, characters
small storage requirement
videos, audios large storage requirement
Integration Data warehouses, data mining
Overview of DBMS
DDL commandsDBA DDL Complier Execution engine
… Query Processing
Answering the queryUser Query Compiler Execution engine
… Transaction processing
Storage and Buffer Management
Buffer manager Storage manager
Data: the contents of the database Metadata (Schema) : structure of the
database Statistics: data properties Indexes
Transaction Processing
Transaction manager Logging Concurrency control Deadlock resolution
Query Processor
Query complier Query parser Query preprocessor Query optimizer
Execution engine
Outline of Database System
Database designDetermine the database structure
Database programmingPerform database operations
Database system implementationBuild the database
Next Class
E/R Concepts