The Principle of Database System (CS 022)

 

Instructor :

Fang Li 

Room 3-533, SEIEE Building

Office time: Tuesday 13.30~14.30

 

TextBook: a first course in database systems (third edition) written by Jeffrey D.Ullman, Jennifer Widom, from Stanford University

The English reprint edition (英文影印版) can be bought through China-Pub  or from other book stores.

Reference books:

Database System Concepts  by Abraham Silberschatz, et al (机械工业出版社)  (Seventh edition) from Yale University

Readings in Database Systems (fifth edition) edited by Peter Bailis, Joseph M.Hellerstein, Michael Stonebraker

 

Introduction:  The lecture will introduce some basic concepts, components and features of database systems. It is an introduction to the design and use of database systems. Many models and query languages will also discussed. Entity-relationship data model, relational data model, semi-structure model and object-oriented data models will be learned in the lecture. Query languages include relational algebra, SQL (Structured Query Language) and Datalog. The aim of this lecture is to know the overview of database systems, to learn how to design many database applications and use SQL in different environments. New database systems will also be introduced at the end of the semester, such as NOSQL and NEWSQL.

 

Course Topics and Schedule (change every year):  

Week

Topics

Slides

Readings & Homework

1

Introduction to the course and database system

Intro.pdf, chapter 1

Textbook 1.2

2

Introduction to the relational model

Chapter2-relational model

3

Relational algebra

Chapter2-algebra

Exercise 2.3.1 Exercise 2.4.1 a,f,h

Exercise 2.5.1 b  or

Chapter 2 Homework

4

Normal forms

Chapter3-functionalDependecy

Chapter3-NormForm

 

 

 

5

Multivalued dependency & reasoning.

Chapter3-MultivaluedDependcy

 

Exercise 3.2.1 Exercise 3.5.2

Exercise 3.6.3 a,c or

Chapter 3 homework

6

ER Model

 

 

Chapter4-ERModel

 

Textbook 4.6.1 and 4.6.2

7

UML/ODL

Chapter4-UML/ODL

Classroom exercises:

Exercise 4.2.1  Exercise 4.4.1

Exercise 4.4.2

8

A logic language: datalog

Chapter5-LogicQueryLanguage

 

Exercise 5.3.1 a,f,h 

Exercise 5.4.1 g  or

Chapter 5 homework

9

SQL: introduction and query

Subqueries & aggregations

Chapter6-BasicQueryLanguage

Classroom Exercises for Chapter 6:

SQLite and DBdata

Chapter6-Subquery&Aggregations

 

10

SQL JoinOperation & Modification,

Transactions in SQL

Chapter6-Join&Modification

Chapter6-transaction

Chapter 6 homework

or

Exercise 6.2.2 e)

Exercise 6.3.1 c)

Exercise 6.4.6 i)

Exercise 6.6.4

Textbook 7.5

11

Many kinds of Constraints

Triggers,

Views and Indexes

Chapter7-constraints

Chapter7-triggers

Chapter 8-views and Indexes

 

 

 

 

12

EmbededSQL & Stored Modules

Database Connection Libraries. NOSQL

Chapter9-Embeded&storedModule

Chapter 9-JDBC&PHP

Python&SQLite by Bao,Weiming

NOSQL data model

Homework of chapter 9:

提交2~4页报告,叙述SQLitePython或其它语言的连接

13

Authorization

Recursion in SQL

Introduction to Object-relational model

Chapter10-authorization

Chapter10-recursiveSQL

Chapter10-ObjectRelationalModel

Textbook 10.2

Textbook 10.6,10.7

 

14

Online Analytic processing

Chapter10-OnlineAnalysis

 

 

Classroom Exercises: mydbdata

Exercise Solutions: OLAPqueries

15

XML model (DTD, XML schema)

Chapter 11-XMLModel,

Classroom exercises

 

Textbook 11.4

Online Testing

16

Introduction to Xpath,Xquery,XSLT

Review & QA

Chapter 12-QueryXML

 

Textbook 12.1

bookstoreSchema

BarsDTD

 

 


Detailed schedule and slides in:  http://oc.sjtu.edu.cn

Grading Scheme

1.     Homework & attendance (35%)  

2.     Final Examination (65%)