Documente Academic
Documente Profesional
Documente Cultură
What Is a DBMS?
! DBMS = Database Management System ! Database: Large, integrated collection of data. ! Models some real-world enterprise
! Entities (e.g., students, courses) ! Relationships (e.g., Lisa Simpson is taking EECS 484)
1/7/14
EECS 484
1/7/14
EECS 484
484 Metadata
! GOAL: Basic introduction to database management systems. ! Two perspectives:
! External (Database user)
! Data models, ER model, relational model, SQL, database design ! Java/JDBC Project: Common platform for building database applications
1/7/14
EECS 484
Textbook
! Textbook Database Management Systems, by Raghu Ramakrishnan & Johannes Gehrke. 3rd ed. ! Its not perfect, but is the best there is ! I assume youve done the reading for each lecture
! Life will be easier for you with the textbook
1/7/14
! Even so, the 10:30am class is hitting the classroom size limit ! I would like to allow everyone in (who has prereqs); were limited by room size ! Please drop the class formally if you dont want to take it; that will make room for others
EECS 484
! For some lectures, Ill ask you to watch online Coursera lectures before class
7 1/7/14
EECS 484
Syllabus
! Posted to Ctools ! Will be updated as we go ! Information is subject to change!
! Piazza
! http://piazza.com/umich/winter2014/eecs484 ! Bulletin board for questions, discussion, help with assignments and projects.
1/7/14
EECS 484
1/7/14
EECS 484
10
Instructional Staff
Dana
Yijia Mike
Rahul
11
1/7/14
EECS 484
12
Exams
! Midterm and Final ! Final is cumulative, but heavy emphasis on 2nd half; during the standard period
! Note: what is the standard period for a class with two timeslots? Were waiting to hear from the registrar; stay tuned
Homeworks
! Total of five homeworks ! Your best 4 count; worst one is dropped ! Done entirely by yourself ! Meant more for learning than evaluation ! Best 4 each count for 2% of your grade
1/7/14
EECS 484
13
1/7/14
EECS 484
14
Projects
! Total of four projects ! Each done in groups of size 2 ! Same partner for all projects ! Start looking for partners now!
! Register your group by Jan 13, using online form (announced via Ctools) ! Dont have a partner? Post to Piazza!
Discussion Sections
! Covers projects, hw, special topics ! Exams may have project-related questions ! Five Friday sections have identical content, but different instructors ! Stick to your discussion as a rule. But if you have to miss your section one week, feel free to attend a different one
15 1/7/14
EECS 484
16
Handin Policies
! Homework
! Typically due by 11:55PM on Thursday nights, before discussion the next day ! No late submissions accepted ! Worst homework dropped from total
! Projects
! 2 free late days total for all projects ! 1% course grade for each late day allowed beyond the free day Up to 2 late days allowed per project
1/7/14
EECS 484
17
1/7/14
EECS 484
18
Academic Honesty
! CoE Honor Code applies for all students ! Specifics on course website ! In general:
! Homeworks and exams are your work alone ! Projects are collaboration with your partner
! Can discuss work with others, but not copy ! Questions? Ask us first!
1/7/14
EECS 484
19
1/7/14
EECS 484
20
Project 4: Minirel
! Build key query processing subsystem of a DBMS
! Programming intensive, implemented in C++
1/7/14
EECS 484
21
1/7/14
EECS 484
22
Java
! Databases are most often accessed via SQL. ! But SQL is usually embedded in, and called from, a traditional programming language. ! Java is the most common choice, and so the one we have chosen for this course.
Data Models
! Data model: a collection of concepts for describing data. ! Schema: a description of a particular collection of data, using a given data model. ! Relational model: the most widely-used model today.
! Data model: Database is a collection of relations A relation is a table with rows and columns. ! Every relation has a schema, which describes the columns (also called the fields or attributes). ! Each row also called a tuple
! Entity-Relationship (ER) model: A semantic data model, i.e. a higher-level more user-intuitive model
1/7/14
EECS 484
! A (relational) DBMS only understands the relational model ! Must translate an ER schema to a relational schema
23 1/7/14
EECS 484
24
Levels of Abstraction
External Schema 1
! Conceptual schema: defines logical structure (aka logical schema) ! Physical schema: describes the files and indexes used. ! External schema: describe how users see the data, views ! Many external schemas, 1 conceptual (logical) schema & "! Schemas are defined using Data Definition Language (DDL) 1 physical schema. "! Data is modified/queried using Data Manipulation Language (DML)
25 1/7/14
EECS 484
External Schema 2
Courses
cid cname Cr. 4 3
Enrolled
sid 41 13 cid E-484 E-584 Grade AA+
1/7/14
EECS 484
26
Data Independence
! Applications insulated from data format and storage details. ! Logical data independence: Protection from changes in logical structure of data.
! External / Conceptual schemas
! Physical schema:
! Relations stored as unordered files. ! Index on first column of Students.
! External Schema:
! View: Course_info(cid: string, enrollment: integer) ! View: Class_rank(sid: string, gpa: real, rank: integer)
1/7/14
EECS 484
28
Transactions
You Read Balance: $100 Yes Sufficient funds? Pay $25 New balance: $75
Bank Balance : $75! Bank Balance : $100
! Inconsistency caused by interleaving actions of different user programs ! DBMS provides the illusion of a single-user system ! Key concept: Transaction, an atomic sequence of R/W ! Concurrency control, transaction management
1/7/14
EECS 484
30
Summary
! DBMS used to maintain, query large datasets ! Benefits include recovery from system crashes, concurrent access, quick application development, data integrity and security ! Levels of abstraction give data independence ! DBMS R&D is one of the most exciting areas in CS
1/7/14
EECS 484
31