Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS522 Advanced database Systems Huiping Guo Department of Computer Science California State University, Los Angeles Course administration.

Similar presentations


Presentation on theme: "CS522 Advanced database Systems Huiping Guo Department of Computer Science California State University, Los Angeles Course administration."— Presentation transcript:

1 CS522 Advanced database Systems Huiping Guo Department of Computer Science California State University, Los Angeles Course administration

2 1. Introduction CS522_S16 1-2 Course administration r Lectures Tu/TH 6:00 – 10:00pm, FA 219 r Instructor 1: Huiping Guo Week 1&2 m Email : hpguo@calstatela.eduhpguo@calstatela.edu m Phone: (323) 343-6673 m Office: ET-A318 m Office hours: r Instructor 2: Yuqing Zhu Week 4&5 r TA: Ms. Saloni Chacha salonichacha92@gmail.com

3 1. Introduction CS522_S16 1-3 Course administration (Cont.) r Textbook m “Fundamentals of Database System”, 7th edition by Ramez Elmasri and Shamkant B. Navathe r References m Database Systems: The Complete Book, by H. Molina, J. Ullman and J Widom m Database System Concept, by A.Silberschatz, H. Korth and S. Sudarshan r Prerequisites m CS422: Principles of Database Systems

4 1. Introduction CS522_S16 1-4 Course administration (Cont.) r Grading policy m Midterm (50%) 07/05 6:00 – 8:30 m Final exam (50%) TBD r Final letter grade m A 90-100 A- 85-89 m B+ 80-85 B 75-79 m B- 70-74 C+ 65-69 m C 60-64 C- 55-59 m F <55

5 1. Introduction CS522_S16 1-5 Course administration (Cont.) r Note: m The grading policy is for all students in the class m No extra homework for individual students m No make up exams DO NOT take this class if you cannot attend the midterm/final exam!  You ’ ll be graded based ONLY on your performance! NOT on your immigration status NOT on your graduation status NOT on your work status NOT on your request

6 Course administration (Cont.) r CSNS webpage m http://csns.calstatela.edu/ r Every student enrolled in the class has an account m both of your username and password are your CIN. m When you first sign in, you will be asked to choose a different username and password. m If you already used the system in other classes, your username and password are the same as before. r Make sure your email address on CSNS is correct 1. Introduction CS522_S16 1-6

7 Course administration (Cont.) r Important dates m Thursday, July. 14 Drop Deadline r Academic integrity m DON’T COPY OTHER’S WORK! m DON’T GIVE YOUR SOLUTIONS TO ANYONE! m DON’T COLLABORATE! m If plagiarism is found, ALL parties involved will get F 1. Introduction CS522_S16 1-7

8 Other policies r Please turn off your cell phone during the lecture r DO NOT talk in class during lectures r After lecture, leave the classroom. m Students are not allowed to stay in the classroom alone without the presence of the instructor 1. Introduction CS522_S16 1-8

9 Introduction to DBMS Huiping Guo Department of Computer Science California State University, Los Angeles

10 1. Introduction CS522_S16 1-10 Outline r Database Management Systems r Describing and Storing Data in a DBMS r Components of a DBMS

11 1. Introduction CS522_S16 1-11 Database Management System (DBMS) r Database m A very large, integrated collection of data which describe the activities of one or more related organizations m Ex: a university database r DBMS m A DBMS is software package designed to store and manage databases How to utilize a database effectively and efficiently

12 1. Introduction CS522_S16 1-12 DBMS vs. File System r In the early days, database applications were built directly on top of file systems r Drawbacks of using file systems to store data: m Data redundancy and inconsistency Multiple file formats, duplication of information in different files m Difficulty in accessing data Need to write a new program to carry out each new task m Integrity problems Integrity constraints (e.g. account balance > 0) become “buried” in program code rather than being stated explicitly Hard to add new constraints or change existing ones

13 1. Introduction CS522_S16 1-13 DBMS vs. File System r Drawbacks of using file systems (cont.) m Atomicity of updates Failures may leave database in an inconsistent state with partial updates carried out Example: Transfer of funds from one account to another should either complete or not happen at all m Concurrent access by multiple users Concurrent access needed for performance Uncontrolled concurrent accesses can lead to inconsistencies –Example: Two people reading a balance and updating it at the same time m Security problems Hard to provide user access to some, but not all, data r Database systems offer solutions to all the above problems

14 1. Introduction CS522_S16 1-14 Advantages of DBMS r Data independence m Application programs are not exposed to details of data representation and storage r Efficient data access m A DBMS utilizes a variety of sophisticated techniques to store and retrieve data efficiently r Concurrent access and crash recovery m A DBMS schedules concurrent accesses to the data in such a manner that users can think of the data as being accessed by only one user at a time

15 1. Introduction CS522_S16 1-15 Advantages of DBMS r Data integrity and security m A DBMS enforces integrity constraints m A DBMS enforces access controls that govern what data is visible to different classes of users r Data administration r Reduced application development time

16 1. Introduction CS522_S16 1-16 Describing and Storing Data in a DBMS r Data models r Levels of Abstraction r Data Independence

17 1. Introduction CS522_S16 Data Models r A data model is a collection of concepts for describing data. r A schema is a description of a particular collection of data, using the a given data model m Ex: ER model r The relational model of data is the most widely used model today. m Main concept: relation, basically a table with rows and columns. m Every relation has a schema, which describes the columns, or fields.. 1-17

18 1. Introduction CS522_S16 Levels of Abstraction r Many views, single conceptual (logical) schema and physical schema. m Views describe how users see the data. m Conceptual schema defines logical structure m Physical schema describes the files and indexes used. * Schemas are defined using DDL; data is modified/queried using DML. Physical Schema Conceptual Schema View 1View 2View 3 1-18

19 1. Introduction CS522_S16 Example: University Database r Conceptual schema: m Students(sid: string, name: string, login: string, age: integer, gpa:real) m Courses(cid: string, cname:string, credits:integer) m Enrolled(sid:string, cid:string, grade:string) r Physical schema: m Relations stored as unordered files. m Index on first column of Students. r External Schema (View): m Course_info(cid:string,enrollment:integer) 1-19

20 1. Introduction CS522_S16 Data Independence * r Applications insulated from how data is structured and stored. r Logical data independence: Protection from changes in logical structure of data. r Physical data independence: Protection from changes in physical structure of data. * One of the most important benefits of using a DBMS! 1-20

21 1. Introduction CS522_S16 1-21 DBMS Structure of a DBMS Database query Results File and Access Methods Buffer Manager Disk Space Manager Recovery Manager Plan Executor Parser Operator Evaluator Optimizer Query evaluation engine Transaction Manager Lock Manager Concurrency control DBMS Storage & indexing

22 1. Introduction CS522_S16 1-22 Storage and indexing r File and access method m File organization m indexing r Buffer manager m Responsible for reading data into memory for processing and writing it back r Disk manager m Allocates additional disk space for new records m Keeps track of the pages in use m Deallocates pages

23 1. Introduction CS522_S16 1-23 Query evaluation r Alternative ways of evaluating a given query m Equivalent expressions m Different algorithms for each operation r Need to estimate the cost of operations m Depends critically on statistical information about relations which the database must maintain m Need to estimate statistics for intermediate results to compute cost of complex expression r Cost difference between a good and a bad way of evaluating a query can be enormous

24 1. Introduction CS522_S16 1-24 Concurrency control r Transaction manager m A transaction is any one execution of a user program m Ensures that transactions request and release locks m schedules execution of transactions r Lock manager m Keeps track of requests for locks and grants locks

25 1. Introduction CS522_S16 1-25 Recovery manager r Responsible for maintaining a log and restoring the system to a consistent state after a crash r Responsible for transaction atomicity and durability m Ensures atomicity by undoing transactions that do not commit m Ensures durability by making sure that all actions survive system and media crashes

26 1. Introduction CS522_S16 1-26 Class objectives  Have a in depth understanding of how a DBMS works m Store and retrieve data m Evaluate and optimize queries m Manage transactions, control concurrency and recover from a crash


Download ppt "CS522 Advanced database Systems Huiping Guo Department of Computer Science California State University, Los Angeles Course administration."

Similar presentations


Ads by Google