Introduction To Database Systems: Ruoming Jin TTH 9:15 - 10:30pm Spring 2009 RM MSB115
Introduction To Database Systems: Ruoming Jin TTH 9:15 - 10:30pm Spring 2009 RM MSB115
Ruoming Jin
TTH 9:15 – 10:30pm
Spring 2009
rm MSB115
Course Goals
This course is an introduction to the design, use, and
internal workings of database management system.
1. Understanding Relational Model/Algebra: data is
represented as a set of two dimensional tables and
operators are defined by manipulate the data.
2. Mastering SQL programming and mySQL database: you
will master the operations on a database system.
3. Database design: how to build a real database for an real
application?
4. Web+Database: PHP and C++ access of mySQL.
5. Database System Implementation:
Storage/Indexing/Transactions
• Project
• 3 Exams during the semester and Final Exam
• Project 20% of the final grade
2 Exams 15% of the final grade per each exam
1 Exam 20% of the final grade
Final 25% of the final grade
Attendance 5%
• No late projects are accepted
• A – 91 – 100; B – 80-90; C – 70–79; D - >64
Class Schedule
AC=AC-50
AC #103 450
Program2
AC=AC-100
Security Problems
80's
Choice for most new
Relational applications
90’s
Object Bases
Knowledge Bases
now
Advantages of Databases
• Conceptual
– TA
Name char(10),
Age char (3),
Salary Fixed Dec(6);
- Student
Name char(10),
Year-of_study char(3)
GPA Fixed Dec(5,2);
Examples
- STUDENTS-TA
Name char(25),
Age char (3),
A view
Salary Fixed Dec(8,2),
Year-of_study char(3)
GPA Fixed Dec(3,2);
Three Level Data View –
Data Abstractions
View1 . . . . . View k
Conceptual
View
Of Data
Phyisal
Data
Storage
Logical Data Models
• A collection of tools for describing
– data
– data relationships
– data semantics
– data constraints
A Break-through : Relational Model
• Class Person{
public:
Person();
~Person();
float GetSalary();
float PutSalary(float&);
string Name;
int SSN;
date BirthDate;
private:
float salary;
}
Object-Oriented Model
Data Encapsulation
SQL
SELECT Chair
FROM Faculty, Department
WHERE Faculty.name = “Ken Noname”
AND Faculty.Dept = Department.Dept
Data definition language (DDL) ~ like type definitions in C or C++
Data Manipulation Language (DML)
Query (SELECT)
UPDATE < relation name >
SET <attribute> = < new-value>
WHERE <condition>
Data Definition Language
• Specification notation for defining the database
schema
– E.g.
create table account (
account-number char(10),
balance integer)
• DDL compiler generates a set of tables stored in a
data dictionary
• Data dictionary contains metadata (i.e., data about
data)
– database schema
– Data storage and definition language
• language in which the storage structure and access methods
used by the database system are specified
• Usually an extension of the data definition language
Database Host Languages
C, C++, Fortran, Lisp, COBOL
Application prog.
Calls to
DBMS
DB
Local Vars
(Memory)
(Storage)