Databse Lecture Note - L1 Introduction

Table of Contents

1 Lecture Information

1.1 Lecturer

  • Name: Yunjun Gao
  • Office: Room 502, Caoguangbiao Building, Yuquan Campus, Zhejiang University
  • Mobile: 139-5716-7510
  • E-mail:

1.2 TA

  • Name: Keyu Yang
  • Mobile: 157-5711-5150
  • E-mail:

1.3 Examination and Grading Policy

  • One A4 page note is allowed
  • Assignments/Exercises 10%
  • Course quizs 10%
  • Experiments and Experimental project 30%
  • Final examination 50%

2 Database

A collection of:

  • interrelated
  • intergrated
  • persistent



DBMS is (Database) + A set of programs used to access, update and manage the data in database.

3.1 Characteristics of DBMS:

  • Efficency and scalability in data access;
  • Reduced application development time;
  • Data independence (physical data independence and logical data independence);
  • Data integrity and security;
  • Concurrent access and robustness.

4 View of Data

4.1 Level of Data Abstraction

  • Physical level: describes how a record is stored;
  • Logical level: describes data stored in database, and the relationships among the data on upper level;
  • View level: application programs hide details of data types.


4.2 Schemas and Instances

Schemas is the structure of the database on diifferent level, analogous to type information of a variable in a program.

  • Physical/Logical/Sub schema: schema at physical/logical/view level.

Instance is the actual content of the database at a particular point in time, analogous to the value of a variable.

4.3 Data Models

Data model is a collection of conceptual tools for describing

  • data structure;
  • data relationships;
  • data semantics;
  • data constraints.

Different level of data abstraction needs different data model to describe. E.g: Entity-Relationship model -> Conceptual design; Relational model -> Logical design.

5 Database Language

5.1 Data Definition Language(DDL)

Specification notation for defining the database schema.

Specifies database scheme, storage structure, access methods and consistency constraints.

DDL statements are compiled, resulting in a set of tables in a special file called data dictionary, which contains metadata.

5.2 Data Manippulation Language(DML)

Language for accessing and manipulating the data organized by appropriate data model.

Two classes of DMLs:

  • Procedural DML - C/Pascal, etc.
  • Nonprocedural DML - SQL/Prolog, etc.

5.3 Data Control Language(DCL)

5.4 SQL


6 Database Design

6.1 Steps of Database Design

  • Requirement analysis
  • Conceptual database design
  • Logical database design
  • Schema reffinement
  • Physical database design
  • Physical database design
  • Create and initialize the database & Security design


6.2 Entity-Relationship(E-R) Model

  • Entity(object): E.g., customers, accounts, bank branch. Entities are described by a

set of attributes.

  • Relationships between entities


6.3 Relational Model

Transfer E-R diagrams into relational schema


7 Database Users and Administrators

7.1 Users

  • Naive users
  • Application programmers
  • Sophisticated programmers
  • Specialized users


7.2 Administrators

Database administrator(DBA) is a special user having central control over database and programs accessing those data.


  • has highest privillege;
  • coordinates all the activities of DB
  • countrols all user authority

8 Transaction Management

A transaction is a collection of operations that performs a single logical function in a database application.

Transaction requirements:

  • Atomicity;
  • Consistence;
  • Isolation;
  • Durability.

9 Database Architecture


9.1 Storage Manager

9.2 Query Processor

  • DDL interpreter;
  • DML compiler;
  • Query processing.


9.3 Overall System Structure

9.4 Application Architecture

10 History of Database Systems

11 Summary

Created: 2019-02-27 Wed 20:04