Academics / Courses / DescriptionsCOMP_SCI 339: Intro to Databases
VIEW ALL COURSE TIMES AND SESSIONS
Prerequisites
Students must have completed COMP_SCI 214 & (COMP_SCI 213 or COMP_ENG 205), or be CS Grad students (MS or PhD) in order to register for this course.Description
Data models and database design. Modeling the real world: structures, constraints, and operations. The entity relationship to data modeling (including network hierarchical and object-oriented), emphasis on the relational model. Use of existing database systems for the implementation of information systems.
- Spring Section: Students must be familiar with Java programming prior to taking this course.
- This course satisfies the Systems breadth requirement.
COURSE INSTRUCTOR: Prof. Rogers (Winter & Spring) and Andrew Crotty (Spring)
COURSE COORDINATORS: Prof. Peter Dinda & Prof. Jennie Rogers
REQUIRED TEXTBOOKS:
- Hector Garcia-Molina, Jeffrey D. Ullman, Jennifer D. Widom, Database Systems: The Complete Book, 2nd Edition, Prentice Hall, 2009. (Prof. Dinda)
- Ramakrishnan, Raghu and Johannes Gehrke. "Database management systems." 3rd Edition. New York: McGraw-Hill, 2002; ISBN-10: 0072465638, ISBN-13: 978-0072465631 (Winter & Spring; Prof. Rogers)
RECOMMENDED ADDITIONAL TEXTBOOKS:
- Joe Celko, SQL for Smarties: Advanced SQL Programming, 5th edition, Morgan Kaufman, 2014. (Useful) (Prof. Dinda)
- Tom Christiansen, brian d foy, Larry Wall, Jon Orwant, Programming Perl, 4th Edition, O’Reilly and Associates, 2012. (Useful) (Prof. Dinda)
- Familiarity with concepts from discrete math such as set theory (COMP_SCI 212/310 for example) (Winter & Spring; Prof. Rogers)
- Object-oriented programming experience, preferably with Java (Winter & Spring; Prof. Rogers)
- Background in using a source code revision control system, especially git (Winter & Spring; Prof. Rogers)
COURSE OBJECTIVES: This course introduces the underlying concepts behind data modeling and database systems using relational database management systems (RDBMS, specifically Oracle), the structured query language (SQL), and web applications (Perl DBI inCGI) as examples. Students are also introduced to the internals of an RDBMS engine.
- Detailed information about the (Prof. Dinda) version of the course can be found at: http://www.cs.northwestern.edu/~pdinda/db
COURSE GOALS:
Students learn:
- How to model domains and data using the entity-relationship model
- How to design a normalized schema in the relational data model
- How to implement schemas using SQL
- How to keep data consistent and safe with using the ACID properties (transactions) of a modern RDBMS
- How to query data using SQL
- How to interface to a modern RDBMS from a modern programming language
- How such interfaces are used to create web applications
- How an RDBMS provides quick access to data using indices, and how indices are implemented
- How an RDBMS manages storage and the storage hierarchy
- How an RDBMS optimizes and executes queries using the relational algebra, the theoretical underpinning of database systems
- How an RDBMS implements transactions
- Current topics
DETAILED COURSE TOPICS:
- Introduction to database-backed web applications
- Web systems, CGI and other application models
- Introduction to Perl
- Introduction to SQL and ACID
- Waterfall versus spiral models of development
- Entity-relationship data model
- Design principles
- Referential integrity and other constraints
- Relational data model
- Schemas and keys
- Functional and multi-valued dependencies
- Normalization and normal forms
- Translating ER schemas to relational schemas
- Relational algebra
- Bags and sets
- Basic operators
- Joins
- Grouping
- Expressions and constraints (statements)
- Equivalent expressions and optimization
- SQL in depth
- Writing constraints
- Advanced data types
- Regular expressions
- Nulls and 3-valued logic
- Indices
- Views
- Transactions
- Triggers
- Security (access control, SQL injection attacks)
- Storage systems and records
- Disks and RAID
- Record layout / free space management
- Buffer management
- B-Tree indices
- B+Tree
- Query and join implementations
- Hash indices
- Extensible hashing
- Linear hashing
- Query and join implementations
- Bitmap indices
- Query and join implementations
- Brief introduction to transaction implementation
- Logging (undo, redo, redo/undo)
- Locking (deadlock, lock ordering, two-phase locking)
HOMEWORK ASSIGNMENTS:
1. Entity-Relationship data model
2. Relational data model
3. Relational Algebra
LABORATORY PROJECTS:
- Extending a database-backed web app
- Designing an implementing a database-backed web app
- Implementing a component of an RDBMS
GRADES:
- 50 % Projects
- 10 % Homework
- 20 % Midterm
- 20 % Final