cs 4604: introduction to database management...

55
CS 4604: Introduction to Database Management Systems B. Aditya Prakash Lecture #1: Introduction

Upload: others

Post on 05-Jan-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

CS4604:IntroductiontoDatabaseManagementSystems

B.AdityaPrakashLecture#1:Introduction

Page 2: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

CourseInformation§  InstructorB.AdityaPrakash,Torg3160F,[email protected]–  OfficeHours:12noon-1pmTuesdaysandThursdays–  Andbyappointment–  IncludestringCS4604insubjectinanyemailyousendme

§  TeachingAssistantsDeepikaRamasubramanian,McBryde106,[email protected]–  OfficeHours:Wednesday:9-10:30am.Friday:10:30am-12noon

§  ClassMeetingTimeTuesdaysandThursdays,9:30-10:45am,McB113

§  KeepinginTouchCoursewebsitehttp://courses.cs.vt.edu/~cs4604updatedregularlythroughthesemester–  Piazzalinkonthewebsite

Prakash2018 VTCS4604 2

Page 3: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Textbook§  RequiredDatabaseManagementSystems,byRaghuRamakrishnanandJohannesGehrke.3rdEd.McGrawHill.Webpageforthebook(witherrata)http://pages.cs.wisc.edu/~dbbook/

§  Optional:–  Garcia-Molina,UllmanandWidom,3rdEd.–  Silberschatz,KorthandSudarshan,6thEd.

Prakash2018 VTCS4604 3

Page 4: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

CourseGrading

§  Projectisspreadover3deliverables§  Submithardcopiesofhomeworksandprojectassignmentsatthestartofclassontheduedate

§  Eachclasshasrequiredreading(oncoursewebpage)

§  NoPop-QuizzesJ

Homework 30% 6-7

Midtermexam 20% (Tentative)Oct4,classtime

Finalexam 30% Dec7,Friday

Courseproject 20% 3assignments

Prakash2018 VTCS4604 4

Page 5: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

CourseProject

§  Wewillputprojectoverviewlater(firstprojectassignment)

§  2,or3personsperproject.§  Projectrunstheentiresemesterwithregularassignmentsandafinalimplementationassignment.

Prakash2018 VTCS4604 5

Page 6: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

ClassPolicies§  Makesureyougothroughthedetailedpoliciesonwebsite:

http://courses.cs.vt.edu/~cs4604/Fall18/policies.html

§  Lectures:Informmeinadvance,ifyouhavetoleaveaclassearlyorcomelateforanyreason.

§  Latepolicy:4‘slip’days(tobeusedonlyforHWsnotproject)

§  Howtosubmitlate:seewebpage§  Exams:noaidsallowed,except:–  1pagewithyournotes(bothsides),forthemidterm–  2suchpages,forthefinal

Prakash2018 VTCS4604 6

Page 7: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

WhyStudyDatabases?§  Academic–  Databasesinvolvemanyaspectsofcomputerscience–  Fertileareaofresearch–  ThreeTuringawardsindatabases

§  Programmer–  aplethoraofapplicationsinvolveusingandaccessingdatabases

§  Businessman–  Everybodyneedsdatabases=>lotsofmoneytobemade

§  Student–  GetthoselastthreecreditsandIdon’thavetocomebacktoBlacksburgeveragain!

–  Google,Oracle,Microsoft,Facebooketc.willhireme!–  Databasessoundcool!–  ???

Prakash2018 VTCS4604 7

Page 8: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

WhatWillYouLearninCS4604?§  Implementation

–  Whatisunder-the-hoodofaDBlikeOracle/MySQL?§  Design

–  Howdoyoumodelyourdataandstructureyourinformationinadatabase?

§  Programming–  HowdoyouusethecapabilitiesofaDBMS?

§  CS4604achievesabalancebetween–  afirmtheoreticalfoundationtodesigningmoderate-sizeddatabases

–  creating,querying,andimplementingrealisticdatabasesandconnectingthemtoapplications

Prakash2018 VTCS4604 8

Page 9: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

CourseOutline§  Weeks1–4:Query/

ManipulationLanguagesandDataModeling–  RelationalAlgebra–  Datadefinition–  ProgrammingwithSQL–  Entity-Relationship(E/R)approach

–  SpecifyingConstraints–  GoodE/Rdesign

§  Weeks5–8:Indexes,ProcessingandOptimization–  Storing–  Hashing/Sorting–  QueryOptimization–  NoSQLandHadoop

§  Week9-10:RelationalDesign–  FunctionalDependencies–  Normalizationtoavoidredundancy

§  Week11-12:ConcurrencyControl–  Transactions–  LoggingandRecovery

§  Week13–14:Students’choice–  PracticeProblems–  XML–  Dataminingandwarehousing

Prakash2018 VTCS4604 9

Page 10: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

WhatisthegoalofaDBMS?

§  Electronicrecord-keepingFastandconvenientaccesstoinformation§  DBMS==databasemanagementsystem–  `Relational’inthisclass– data+setofinstructionstoaccess/manipulatedata

Prakash2018 VTCS4604 10

Page 11: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

WhatisaDBMS?§  FeaturesofaDBMS–  Supportmassiveamountsofdata–  Persistentstorage–  Efficientandconvenientaccess–  Secure,concurrent,andatomicaccess

§  Examples?–  Searchengines,bankingsystems,airlinereservations,corporaterecords,payrolls,salesinventories.

–  Newapplications:Wikis,social/biological/multimedia/scientific/geographicdata,heterogeneousdata.

Prakash2018 VTCS4604 11

Page 12: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

FeaturesofaDBMS•  Supportmassiveamountsofdata

–  Giga/tera/petabytes–  Fartoobigformainmemory

•  Persistentstorage–  Programsupdate,query,manipulatedata.–  Datacontinuestolivelongafterprogramfinishes.

•  Efficientandconvenientaccess–  Efficient:donotsearchentiredatabasetoansweraquery.–  Convenient:allowuserstoquerythedataaseasilyaspossible.

•  Secure,concurrent,andatomicaccess–  Allowmultipleuserstoaccessdatabasesimultaneously.–  Allowauseraccesstoonlytoauthorizeddata.–  Providesomeguaranteeofreliabilityagainstsystemfailures.

Prakash2018 VTCS4604 12

Page 13: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

ExampleScenario

§  Students,takingclasses,obtaininggrades– FindmyGPA– <andotherad-hocqueries>

Prakash2018 VTCS4604 13

Page 14: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Obvioussolution1:Folders

§  Advantages?– Cheap;Easy-to-use

§  Disadvantages?– Noad-hocqueries– Nosharing– LargePhysicalfoot-print

Prakash2018 VTCS4604 14

Page 15: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

ObviousSolution++

§  FlatfilesandC(C++,Java…)programs– E.g.one(ormore)UNIX/DOSfiles,withstudentrecordsandtheircourses

Prakash2018 VTCS4604 15

Page 16: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

ObviousSolution++

§  Layoutforstudentrecords?– CSV(‘comma-separated-values’) Hermione Grainger,123,Potions,A

Draco Malfoy,111,Potions,B

Harry Potter,234,Potions,A

Ron Weasley,345,Potions,C

Prakash2018 VTCS4604 16

Page 17: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

ObviousSolution++

§  Layoutforstudentrecords?– OtherpossibilitieslikeHermione Grainger,123 123,Potions,A

Draco Malfoy,111 111,Potions,B

Harry Potter,234 234,Potions,A

Ron Weasley,345 345,Potions,C

Prakash2018 VTCS4604 17

Page 18: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Problems?

§  inconvenientaccesstodata(need‘C++’expertize,plusknowledgeoffile-layout)–  dataisolation

§  dataredundancy(andinconsistencies)§  integrityproblems§  atomicityproblems§  concurrent-accessproblems§  securityproblems§  …….

Prakash2018 VTCS4604 18

Page 19: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Problems-Why?

§  Twomainreasons:–  file-layoutdescriptionisburiedwithintheCprogramsand

–  thereisnosupportfortransactions(concurrencyandrecovery)

Prakash2018 VTCS4604 19

DBMSshandleexactlythesetwoproblems

Page 20: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

ExampleScenario§  RDBMS=“Relational”DBMS§  Therelationalmodelusesrelationsortablestostructuredata§  ClassListrelation:

§  Relationseparatesthelogicalview(externals)fromthephysicalview(internals)

§  Simplequerylanguages(SQL)foraccessing/modifyingdata–  FindallstudentswhosegradesarebetterthanB.–  SELECTStudentFROMClassListWHEREGrade>“B”

Student Course Grade

HermioneGrainger Potions A

DracoMalfoy Potions B

HarryPotter Potions A

RonWeasley Potions C

Prakash2018 VTCS4604 20

Page 21: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

DBMSArchitecture

Prakash2018 VTCS4604 21

Page 22: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

TransactionProcessing§  Oneormoredatabaseoperationsaregroupedintoa“transaction”

§  Transactionsshouldmeetthe“ACIDtest”– Atomicity:All-or-nothingexecutionoftransactions.

– Consistency:Databaseshaveconsistencyrules(e.g.whatdataisvalid).AtransactionshouldNOTviolatethedatabase’sconsistency.Ifitdoes,itneedstoberolledback.

– Isolation:Eachtransactionmustappeartobeexecutedasifnoothertransactionisexecutingatthesametime.

– Durability:Anychangeatransactionmakestothedatabaseshouldpersistandnotbelost.

Prakash2018 VTCS4604 22

Page 23: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 23

Disadvantagesover(flat)files?

Page 24: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 24

Disadvantagesover(flat)files

§  Price§  additionalexpertise(SQL/DBA)(hence:over-killforsmall,single-userdatasetsBut:mobilephones(eg.,android)usesqlite)

Page 25: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

ABriefHistoryofDBMS§  Theearliestdatabases(1960s)evolvedfromfilesystems

–  Filesystems•  Allowstorageoflargeamountsofdataoveralongperiodoftime•  Filesystemsdonotsupport:

–  Efficientaccessofdataitemswhoselocationinaparticularfileisnotknown

–  Logicalstructureofdataislimitedtocreationofdirectorystructures–  Concurrentaccess:Multipleusersmodifyingasinglefilegeneratenon-uniformresults

•  Navigationalandhierarchical•  UserprogrammedthequeriesbywalkingfromnodetonodeintheDBMS.

§  RelationalDBMS(1970stonow)–  Viewdatabaseintermsofrelationsortables–  High-levelqueryanddefinitionlanguagessuchasSQL–  Allowusertospecifywhat(s)hewants,nothowtogetwhat(s)hewants

§  Object-orientedDBMS(1980s)–  Inspiredbyobject-orientedlanguages–  Object-relationalDBMS

Prakash2018 VTCS4604 25

Page 26: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

TheDBMSIndustry§  ADBMSisasoftwaresystem.

§  MajorDBMSvendors:Oracle,Microsoft,IBM,Sybase

§  Free/Open-sourceDBMS:MySQL,PostgreSQL,Firebird.–  UsedbycompaniessuchasGoogle,Yahoo,Lycos,BASF….

§  Allare“relational”(or“object-relational”)DBMS.

§  Amulti-billiondollarindustry

Prakash2018 VTCS4604 26

Page 27: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 27

Fundamentalconcepts

§  3-levelarchitecture§  logicaldataindependence§  physicaldataindependence

Page 28: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 28

3-levelarchitecture

§  viewlevel§  logicallevel§  physicallevel

v1 v2v3

Page 29: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 29

3-levelarchitecture

§  viewlevel§  logicallevel:eg.,tables– STUDENT(ssn,name)– TAKES(ssn,cid,grade)

§  physicallevel:– howarethesetablesstored,howmanybytes/attributeetc

Page 30: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 30

3-levelarchitecture

§  viewlevel,eg:– v1:selectssnfromstudent– v2:selectssn,c-idfromtakes

§  logicallevel§  physicallevel

Page 31: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 31

3-levelarchitecture

§  ->hence,physicalandlogicaldataindependence:

§  logicalD.I.:– ???

§  physicalD.I.:– ???

Page 32: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 32

3-levelarchitecture

§  ->hence,physicalandlogicaldataindependence:

§  logicalD.I.:– canadd(drop)column;add/droptable

§  physicalD.I.:– canaddindex;changerecordorder

Page 33: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 33

Databaseusers

§  ‘naive’users§  casualusers§  applicationprogrammers§  [DBA(Databaseadministrator)]

Page 34: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 34

Casualusers

DBMS

data

andmeta-data=catalog

select*fromstudent

Page 35: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 35

``Naive’’users

Pictorially:

DBMS

data

andmeta-data=catalog

app.(eg.,reportgenerator)

Page 36: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 36

App.programmers

§  thosewhowritetheapplications(likethe‘reportgenerator’)

Page 37: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 37

DBAdministrator(DBA)

§  Duties?

Page 38: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 38

DBAdministrator(DBA)

§  schemadefinition(‘logical’level)§  physicalschema(storagestructure,accessmethods

§  schemasmodifications§  grantingauthorizations§  integrityconstraintspecification

Page 39: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 39

Overallsystemarchitecture

§  [Users]§  DBMS– queryprocessor– storagemanager–  transactionmanager

§  [Files]

Page 40: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 40

DDLint.DMLproc.

queryeval.app.pgm(o)

trans.mgr

emb.DML

buff.mgr filemgr

data meta-data

queryproc.

storagemgr.

naive app.pgmr casual DBA users

Page 41: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 41

Overallsystemarchitecture

§  queryprocessor– DMLcompiler– embeddedDMLpre-compiler– DDLinterpreter– Queryevaluationengine

Page 42: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 42

Overallsystemarchitecture(cont’d)

§  storagemanager– authorizationandintegritymanager–  transactionmanager– buffermanager–  filemanager

Page 43: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 43

Overallsystemarchitecture(cont’d)

§  Files– datafiles– datadictionary=catalog(=meta-data)–  indices– statisticaldata

Page 44: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 44

Someexamples:

§  DBAdoingaDDL(datadefinitionlanguage)operation,eg.,createtablestudent...

Page 45: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 45

DDLint.DMLproc.

queryeval.app.pgm(o)

trans.mgr

emb.DML

buff.mgr filemgr

data meta-data

queryproc.

storagemgr.

naive app.pgmr casual DBA users

Page 46: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 46

Someexamples:

§  casualuser,askingforanupdate,eg.:updatestudentsetnameto‘smith’wheressn=‘345’

Page 47: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 47

DDLint.DMLproc.

queryeval.app.pgm(o)

trans.mgr

emb.DML

buff.mgr filemgr

data meta-data

queryproc.

storagemgr.

naive app.pgmr casual DBA users

Page 48: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 48

DDLint.DMLproc.

queryeval.app.pgm(o)

trans.mgr

emb.DML

buff.mgr filemgr

data meta-data

queryproc.

storagemgr.

naive app.pgmr casual DBA users

Page 49: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 49

DDLint.DMLproc.

queryeval.app.pgm(o)

trans.mgr

emb.DML

buff.mgr filemgr

data meta-data

queryproc.

storagemgr.

naive app.pgmr casual DBA users

Page 50: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 50

Someexamples:

§  app.programmer,creatingareport,egmain(){....execsql“select*fromstudent”...}

Page 51: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 51

DDLint.DMLproc.

queryeval.app.pgm(o)

trans.mgr

emb.DML

buff.mgr filemgr

data meta-data

queryproc.

storagemgr.

naive app.pgmr casual DBA users

pgm(src)

Page 52: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 52

Someexamples:

§  ‘naive’user,runningthepreviousapp.

Page 53: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 53

DDLint.DMLproc.

queryeval.app.pgm(o)

trans.mgr

emb.DML

buff.mgr filemgr

data meta-data

queryproc.

storagemgr.

naive app.pgmr casual DBA users

pgm(src)

Page 54: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 54

Conclusions

§  (relational)DBMSs:electronicrecordkeepers§  customizethemwithcreatetablecommands§  askSQLqueriestoretrieveinfo

Page 55: CS 4604: Introduction to Database Management Systemscourses.cs.vt.edu/~cs4604/Fall18/lectures/lecture-1.pdf§ Project is spread over 3 deliverables ... – Search engines, banking

Prakash2018 VTCS4604 55

Conclusionscontd

mainadvantagesover(flat)files&scripts:§  logical+physicaldataindependence(ie.,flexibilityofaddingnewattributes,newtablesandindices)

§  concurrencycontrolandrecovery