Title: CS 4432 Database Systems II Lecture 1: Introduction
1CS 4432Database Systems II Lecture 1
Introduction
2Recommended Background
- Beginning database knowledge as gained in say
CS3431 - Some knowledge of software engineering (Java),
such as CS3733.
3Staff
- INSTRUCTOR Professor Murali Mani
- Office Hours
- Mondays 1130 1230. Thursdays 1030 - 1130
am - TEACHING ASSISTANTS
- Di Wang
- wangdi_at_cs.wpi.edu
- Office hrs from webpage
See course webpage (https//my.wpi.edu) for
office location hours.
4Protocol for Communication
- Come to Office Hours!!
- We have many office hours spread throughout the
week. This is your resource! Use it ! - Post to discussion board mywpi
- E-Mail cs4432-staff _at_ cs.wpi.edu
- Expect at least a 24 hour response time
5Details
- LECTURES Monday, Tuesday, Thursday, Friday 900
- 950 pm AK233 - TEXTBOOK
- Garcia-Molina, Ullman, Widom "DATABASE SYSTEM
IMPLEMENTATION, or - DATABASE SYSTEMS, THE COMPLETE BOOK
- WEB SITE
- http//my.wpi.edu and
- http//www.cs.wpi.edu/cs4432/d08
- Please check website daily for last minute
announcements.
6Logistics
-
- ASSIGNMENTS
- 3-5 Written Homework Assignments.
- PROJECTS
- 2 3 Group Projects
- EXAMS
- 2 Exams
- GRADING
- Midterm 25
- Final Exam 25
- Homework Assignments 20
- Projects 30
- Class participation /-
7More Details
- Late Policy
- No late anything will be accepted !
- Note
- For special circumstance and under instructor
discretion, one late submission of up to 48 hours
may be granted. - Cheating
- No cheating of any kind !
- If cheating identified, you will receive an F,
and you will be reported to the proper WPI
honesty board.
8Planning Miscellaneous
- BS/MS Credit
- Database Projects MQP or ISP
- DB Undergraduate Research Position
- Summer Research (WPI/CRA/etc).
9Database Material at WPI
CS 3431
B, C terms
you are here
CS 4432
D term (alternate)
CS 542
CS 561
CS525
MQP/ISP
DSRG
Grad. DB
Advanced DB
Selected
Selected DB Project
DB Research at WPI
Spring
Varies
Any time
year round
DONT TAKE!
10Interested in Research ?Curious about Graduate
School?Take opportunity to visit WPI GRAD 2006
!Mar 19, Wed,Campus Center !
11A Brief Pre-amble
12Isnt Implementing a Database System Simple?
13Naïve Implementation
- Relations stored in files (ASCII)
- e.g., relation Students is in /usr/db/Students
Students
Depts
Smith 123 CS Jones 522 EE
CS Fuller Labs EE Atwater Kent PH Olin
Hall
. .
. .
14Naïve Implementation Details
- Directory file (ASCII) in /usr/db/schema
StudentsnameSTRidINTdeptSTR DeptsnameSTRo
fficeSTR
.
.
.
15Sample Query
select Students.name,Depts.office from
Students,Depts where Students.dept Depts.name
and Students.id gt 300
Smith 123 CS CS Fuller Labs Smith 123
CS EE Atwater Kent Smith 123 CS PH
Olin Hall Jones 522 EE CS Fuller
Labs Jones 522 EE EE Atwater Kent Jones
522 EE PH Olin Hall
16Execution Process
- To execute select from R where condition
- (1) Read dictionary to get R attributes
- (2) Read R file, for each line
- (a) Check condition
- (b) If OK, display
17Yet Another Execution
- To execute select A,B from R,S where condition
- (1) Read dictionary to get Students,Depts
attributes - (2) Read Students file, for each line
- (a) Read Depts file, for each line
- (i) Create join tuple
- (ii) Check condition
- (iii) Display if OK
18Whats wrong ? Layout ?
- Tuple layout on disk
- Example
- - Change string from Cat to Cats and
we have to rewrite file - - ASCII storage is expensive
- - Deletions are expensive
19Whats wrong ? Search ?
- Search expensive no indexes
- e.g., - Cannot find tuple with given key quickly
- - Always have to read full relation
20Whats wrong ?
- Brute force query processing
- e.g., select
- from R,S
- where R.A S.A and S.B gt 1000
- - Do select first?
- - More efficient join?
21Whats wrong ?
- No buffer manager
- e.g., Need caching
22Whats missing?
23Whats wrong ?
- No reliability
- e.g., - Can lose data
- - Can leave operations half done
24Whats wrong ?
- No security
- e.g., - File system insecure
- - File system security is coarse
25System Structure
Query Parser
User
Strategy Selector
User Transaction
Transaction Manager
Buffer Manager
Recovery Manager
Concurrency Control
File Manager
Log
Lock Table
M.M. Buffer
Statistical Data
Indexes
User Data
System Data
26Course Overview
- File System Structure
- Records in blocks, dictionary, buffer
management, - Indexing Hashing
- B-Trees, hashing,
- Query Processing
- Query costs, join strategies,
- Crash Recovery
- Failures, stable storage,
- Concurrency Control
- Correctness, locks,
- Transaction Processing
- Logs, deadlocks,
- Additional Topics
- If time permits
27Next time
- The lowest layer Hardware
- Read chapter 11