McGill University Department of Computer Science Course Outline of COMP-421 Database Systems Winter 2008 Course Instructor: Khaled Jababo Prerequisites: COMP-206, COMP-251 and COMP-302: Knowledge of data structures, algorithms, programming languages and basics of program development. Knowledge in operating systems is of advantage. Course Objectives Database systems have become an integral part of daily life information management. The big vendors like Oracle, IBM DB2 or Microsoft SQL Server are well known players on the IT market; Linux distributions (for instance Red Hat), include an open source database management system in their distribution package; even the Microsoft Office suite contains kind of a database management system. As a result, knowing at least the basic concepts behind these systems and how to use them is becoming an essential skill for IT specialists. This course is intended to give students a solid background in relational database management systems (DBMS). If you are interested in becoming an effective user of a DBMS, or a DBMS professional, this is a good introduction to the topic. The course has two main parts: the first part explains how to use a DBMS, the second part looks at how the DBMS works internally. The first part will discuss the design of databases and how to work with the database. Or in other words: how can you squeeze your "real world" data (the employee information of a company, the product information of a bookstore, the student and activity information of a students' association) into the relational data model of the database system and how can you retrieve the data afterwards. In more detail, the first part will cover the conceptual design of databases using the entity-relationship model and the relational data model. Then it will discuss how data can be accessed using Relational Algebra and SQL (the standard query language for relational database systems). The second part of the course is system-oriented and discusses the internals of a DBMS. Using a DBMS is one issue, using it efficiently and correctly is a different story. DBMS are designed to work for very different application areas and present a general purpose software. In order to be able to tune a DBMS to your specific requirements you must know how your database application is executed by the DBMS. This second part will cover two main areas: transaction management and query execution. When you connect to the DBMS and access the data, you do this in the context of a transaction. A transaction is considered one logical unit of work. A classical example is a money transfer from account A to account B. The DBMS provides some important transactional guarantees. For instance, a transaction is either executed completely or not at all (you don't want that the amount is withdrawn from account A but does not appear as a plus on account B). Understanding the concepts of transactions, and how DBMS implement them is crucial for keeping the data clean and consistent. The last topic will be about how the DBMS retrieves the data you are asking for. We will talk about how data is stored internally, what mechanisms exist to access this data and how the DBMS determines which algorithm to use to answer to user queries as fast as possible. If we have time we will talk about an advanced topic, e.g. XML database systems. Lecture Topics List of Topics 1: Introduction 2: Entity-Relationship Model 3: Relational Model and Data Definition Language 4: Relational Algebra 5: Functional Dependencies 6: SQL 7: Transactions 8: Concurrency Control 9: Essentials of File and Disk Management 10: Recovery System 11: Indexing 12: Query Processing 13: Query Optimization 14: XML (time permits) Textbook Raghu Ramakrishnan and Johannes Gehrke: Database Management Systems; McGraw Hill, 3rd Edition, 2003. References Abraham Silberschatz, Henry F. Korth and S. Sudarshan: Database System Concepts; McGraw Hill, 5th Edition, 2006. Hector Garcia-Molina, Jeffrey D. Ullman and Jennifer Widom: Database Systems: the complete book; Prentice Hall, 2002. The Web Page http://www.cs.mcgill.ca/~jababo/ Material presented in class will be linked to the page, as well as other material of interest. Other sites will be linked in as the course proceeds. Marking Scheme There are four written assignments (all probably having the same weight), four project deliveries (each with the same weight), one midterm and one final. The scheme will likely be 20% assignments 20% project deliveries 10% midterm 50% final A note on academic integrity McGill University values academic integrity. Therefore all students must understand the meaning and consequences of cheating, plagiarism and other academic offences under the Code of Student Conduct and Disciplinary Procedures (see http://www.mcgill.ca/integrity for more information). Please read carefully the student guide to avoid plagiarism. Assignments and Project Homeworks consist of written assignments and a programming project. In the written assignments the students have to solve concrete problems. A late turn-in will result in a penalty of 10% per day (e.g. if an assignment has in total 100 points, a student achieves 80 points but turns in the assignment a day too late, then he/she will receive 80-10=70 points. Every student has to do the written assignments by herself/himself. The programming project of this course is to develop and build a database application for a real-world domain. The students will design a schema, create a database using DB-II, maintain, query and update the data, develop application programs, and implement a user-friendly interface. The project will be done step by step with four project assignments. The students will work in teams of three on the programming project. All team members are supposed to work together and participate equally in the project development.