lecture*1* 08/24/15 - penn state college of...

14
CMPSC431W: Database Management Systems Instructor: YuSan Lin [email protected] Course Website: hCp://www.cse.psu.edu/~yul189/cmpsc431w Slides based on McGrawHill & Dr. WangChien Lee Lecture 1 08/24/15

Upload: dothien

Post on 12-Apr-2018

218 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

CMPSC431W:  Database  Management  Systems  

Instructor:  Yu-­‐San  Lin    [email protected]  

 Course  Website:  hCp://www.cse.psu.edu/~yul189/cmpsc431w  

Slides  based  on  McGraw-­‐Hill  &  Dr.  Wang-­‐Chien  Lee  

     

Lecture  1  08/24/15  

Page 2: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

Outline  

•  Overview  of  this  course  •  MoSvaSon  for  studying  database  management  systems  

•  Three  types  of  data  models  

2  

Page 3: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

Course  Emphasis  

•  How  to  design  a  database  applicaSon  •  How  to  use  a  DBMS  effecSvely  •  How  a  DBMS  works  

3  

Page 4: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

Course  OrganizaSon  

I  FoundaSons  

II  ApplicaSons  

III  Systems  

IV  Systems  

V  Systems  

VI  ApplicaSons  

1  IntroducSon  

2  ER  model  

Conceptual  Design  

3  RelaSonal  Model  

4  RelaSonal  Algebra  

and  Calculus  

5  SQL  

6  Database  ApplicaSon  

Development  

7  Internet  ApplicaSons  

8  Storage  and  Indexing  

12  Query  EvaluaSon  

16  TransacSon  Management  

19  Schema  Refinement,  FDs,  NormalizaSon  

NoSQL  

4  

Page 5: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

CHAPTER  1:  OVERVIEW  OF  DATABASE  SYSTEMS  

5  

Page 6: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

What  is  a  DBMS?  

•  Database  –  is  storage  of  _____;  – Maintains  a  very  _____,  _________  collecSon  of  data.  

•  A  database  models  a  real-­‐world  enterprise.  –  ________  (e.g.,  students,  courses)  –  ___________  (e.g.,  John  is  taking  CMPSC  431W)  

•  Database  Management  System  (DBMS)  is  a  sokware  package  designed  to  store  and  manage  databases.  

6  

Page 7: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

Database  ApplicaSons  •  Banking:  all  transacSons  •  Airlines:  reservaSons,  schedules  •  Universi@es:  registraSon,  grades  •  Sales:  customers,  products,  purchases  •  Manufacturing:  producSon,  inventory,  orders,  supply  chain  

•  Human  resources:  employee  records,  salaries,  tax  deducSons  

…  The  list  goes  on!  

7  

Page 8: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

File  System  v.s.  DBMS  

•  File  system:  a  collecSon  of  individual  _____  accessed  by  applicaSon  programs  

•  DBMS:  a  computerized  record-­‐keeping  system  •  Drawbacks  of  file  systems:  – _________________________  – _________________________  – _________________________  – _________________________  

8  

Page 9: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

Why  Use  a  DBMS?  

•  _________________________________  •  _________________________________  •  _________________________________  •  _________________________________  •  _________________________________  •  _________________________________  •  _________________________________  •  _________________________________  

9  

Page 10: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

Data  Models  

•  A  data  model  is  a  collecSon  of  high-­‐level  constructs  for  describing  stored  data  that  hides  low-­‐level  storage  details.  •  Three  major  data  models  are  – __________  data  model  – __________  data  model  – __________  data  model  

10  

Page 11: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

Network  Data  Model  

Data  records  are  linked  as  _______.  

Hayes   Main   Harrison  

Johnson   Alma   Palo  Alto  

Smith   North   Rye  

A-­‐102   400  

A-­‐101   500  

A-­‐102   400  

A-­‐215   700  

11  

Page 12: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

Hierarchical  Data  Model  

The  hierarchical  model  organizes  data  records  as  collecSons  of  ______.  

Hayes   Main   Harrison   Johnson   Alma   Palo  Alto   Smith   North   Rye  

A-­‐102   400   A-­‐101   500   A-­‐201   900   A-­‐201   900   A-­‐215   700  

12  

Page 13: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

RelaSonal  Data  Model  

•  The  relaSonal  data  model  is  the  most  widely  used  data  model  today.  – Main  concept:  ______,  basically  a  table  with  rows  and  columns.  

– Every  relaSon  has  a  _______,  which  describes  the  columns,  or  fields.  

•  Example:   Students ( sid: string, name: string, login: string,

age: integer, gpa: real)

13  

Page 14: Lecture*1* 08/24/15 - Penn State College of Engineeringyul189/cmpsc431w/files/slides/cmpsc431w...Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems* V Systems*

Don’t  Forget  

•  Sign  up  the  two  accounts:  – GitHub  – Asana  

•  Submit  your  team  informaSon,  along  with  account  informaSon,  by  this  Friday  (8/28)  

•  Reading:  – Project  descripSon:  prepare  any  quesSon  to  discuss  on  Friday  

– SecSon  1.1  ~  1.5  

14