1
Introduction to Information Systems
Lecture 1
Priv.-Doz. Dr. Heinz Stockinger Spring Term 2009
2
Outline for Todays Lecture
- Overview of database systems
- Course Outline
- First Steps in SQL
Introduction to Information Systems Lecture 1 Priv.-Doz. Dr. Heinz - - PDF document
Introduction to Information Systems Lecture 1 Priv.-Doz. Dr. Heinz Stockinger Spring Term 2009 1 Outline for Today s Lecture Overview of database systems Course Outline First Steps in SQL 2 Staff Lecturer Heinz
1
2
3
4
5
6
7
8
9
– http://www.cs.washington.edu/education/courses/cse444/ – http://www.acm.org/sigmod/record/issues/0309/4.AlonLevy.pdf
10
11
12
13 14
15
16
17
18
19
Read ‘students.txt’ Read ‘courses.txt’ Find&update the record “Mary Johnson” Find&update the record “CSE444” Write “students.txt” Write “courses.txt”
20
21
22
CREATE TABLE Students ( Name CHAR(30) SSN CHAR(9) PRIMARY KEY NOT NULL, Category CHAR(20) ) . . . INSERT INTO Students VALUES(‘Charles’, ‘123456789’, ‘undergraduate’) . . . .
23
SSN Name Category 123-45-6789 Charles undergrad 234-56-7890 Dan grad _ _ SSN CID 123-45-6789 CSE444 123-45-6789 CSE444 234-56-7890 CSE142 _
CID Name Quarter CSE444 Databases fall CSE541 Operating systems winter
24
25
Students Takes
sid=sid sname name=“Mary” cid=cid
Courses
26
BEGIN TRANSACTION; INSERT INTO Takes SELECT Students.SSN, Courses.CID FROM Students, Courses WHERE Students.name = ‘Mary Johnson’ and Courses.name = ‘CSE444’
IF everything-went-OK THEN COMMIT; ELSE ROLLBACK
27
)
28
29
30
31
32
33
34
35
36
37
38
39