15
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 Textbook: R. Ramakrishnan and J. Gehrke, Database Management Systems, Third EdiTon, McGrawHill Publisher. Lecture 1 08/24/15

Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* 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  Textbook:  R.  Ramakrishnan  and  J.  Gehrke,  Database  Management  Systems,  

Third  EdiTon,  McGraw-­‐Hill  Publisher.  

     

Lecture  1  08/24/15  

Page 2: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Outline  

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

•  Three  types  of  data  models  

2  

Page 3: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Course  ObjecTves  

•  To  present  an  introducTon  of  database  management  systems  (DBMSs)  –  Introduce  the  students  to  the  design,  use,  and  applicaTon  of  database  management  systems  

– Obtain  broad  knowledge  in  concepts  of  database  management  systems  

•  Emphasize  on  – How  to  design  a  database  applicaTon  – How  to  use  a  DBMS  effecTvely  – How  a  DBMS  works  

3  

Page 4: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Course  OrganizaTon  

I  FoundaTons  

II  ApplicaTons  

III  Systems  

IV  Systems  

V  Systems  

VI  ApplicaTons  

1  IntroducTon  

2  ER  model  

Conceptual  Design  

3  RelaTonal  Model  

SQL  DDL  

4  RelaTonal  Algebra  

and  Calculus  

5  SQL  DML  

6  Database  ApplicaTon  

Development  

7  Database-­‐Backed  

Internet  ApplicaTons  

8  Overview  of  Storage  and  

Indexing  

12  Overview  of  Query  

EvaluaTon  

16  Overview  of  TransacTon  

Management  

19  Schema  Refinement,  FDs,  NormalizaTon  

NoSQL  

4  

Page 5: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

CHAPTER  1:  OVERVIEW  OF  DATABASE  SYSTEMS  

5  

Page 6: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Overview  

•  What  is  database?  •  What  is  a  Database  Management  System  (DBMS)?  •  Why  DBMS  for  managing  data?  •  What  are  data  models?  •  How  to  retrieve  data  and  build  database  applicaTons?  •  How  is  applicaTon  data  represented  in  a  DBMS?  •  How  DBMS  support  concurrent  access  and  failure  recovery?  

•  What  are  the  main  components  of  a  DBMS?  •  Who  is  involved  with  databases?  

6  

Page 7: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

What  is  a  DBMS?  

•  Database  –  is  storage  of  _____;  – Maintains  a  ________,  ________  collecTon  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  solware  package  designed  to  store  and  manage  databases.  

7  

Page 8: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Database  ApplicaTons  •  Banking:  all  transacTons  •  Airlines:  reservaTons,  schedules  •  UniversiTes:  registraTon,  grades  •  Sales:  customers,  products,  purchases  •  Manufacturing:  producTon,  inventory,  orders,  supply  chain  

•  Human  resources:  employee  records,  salaries,  tax  deducTons  

…  The  list  goes  on!  

8  

Page 9: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Files  v.s.  DBMS  

•  In  the  early  days,  database  applicaTons  were  built  on  top  of  ___________  – ApplicaTon  must  stage  large  datasets  between  ___________and  _____________(e.g.,  buffering,  page-­‐oriented  access,  32-­‐but  addressing,  etc.)  

–  Special  code  for  different  queries  – Must  protect  data  from  inconsistency  due  to  mulTple  concurrent  users  

–  Crash  recovery  –  Security  and  access  control  

9  

Page 10: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Why  Use  a  DBMS?  •  Capability  to  store  _____________________  •  __________________  •  __________________  •  Reduced  applicaTon  _________________  •  __________________  •  Uniform  __________________  •  ___________  access  •  ___________________  •  ___________________  

10  

Page 11: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Why  Study  Databases?  

•  Shil  from  computaTon  to  informaTon  – at  the  “low  end”:  scramble  to  web  space  – at  the  “high  end”:  scienTfic  applicaTons  

•  Datasets  increasing  in  diversity  and  volume  – Digital  libraries,  interacTve  video,  Human  Genome  project,  EOS  project  

•  DBMS  encompasses  most  of  CS  – OS,  languages,  theory,  AI,  mulTmedia,  logic  

11  

Page 12: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Data  Models  •  A  __________is  a  collecTon  of  high-­‐level  constructs  for  

describing  stored  data  that  hides  low-­‐level  storage  details.  •  A  ________  is  a  descripTon  of  a  parTcular  collecTon  of  

data,  based  on  a  given  data  model.  •  The  ____________  is  the  most  widely  used  data  model  

today.  –  Main  concept:  _______,  basically  a  table  with  rows  and  columns.  

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

•  Example:   Students (sid: string, name: string, login: string, age: integer, gpa: real)

12  

Page 13: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* 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  

13  

Page 14: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Hierarchical  Data  Model  

The  hierarchical  model  organizes  data  records  as  collecTons  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  

14  

Page 15: Lecture*1* 08/24/15yusanlin.com/cmpsc431w/files/slides/cmpsc431w_lec01_student_ver.pdf · – How*aDBMS*works* 3. Course*Organizaon* I Foundaons* II Applicaons* III Systems* IV* Systems*

Don’t  Forget  

•  Sign  up  the  two  accounts:  – GitHub  – Asana  

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

15