San Jose State University : Site Name


Main Content

Working in Mars Mission Control, JPL

Ronald Mak

Department of Computer Science
Spring Semester 2018

Office hours: TuTh: 3:00-4:00 PM
Office location: ENG 250
Mission Control, Jet Propulsion Laboratory (JPL)
NASA Mars Exploration Rover Mission

CS/SE 157B: Database Management Systems II

Section 3: TuTh 9:00 - 10:15 AM, room MH 233


# Assigned Due Assignment
1 Feb 6 Feb 19 Design a database
1 Feb 20 Feb 28 PHP functions and object-relational mapping


Date Content
Jan 25 Slides: Topics and course learning outcomes; project teams; postmortem report; grading; database requirements; data models; front-end apps; operational vs. analytical databases
Jan 30 Slides: ERDPlus; entities and attributes; ER diagrams; relationships; cardinalities: 1:1, 1:M, M:N, exact; weak entities; logical database model; relational tables; primary key; mapping entities; entity integrity constraint
Feb 1 Slides: Foreign keys; mapping 1:M, M:N, 1:1 relationships; referential integrity constraint; mapping example #1; mapping candidate keys, multivalued attributes, derived attributes; mapping example #2; mapping unary relationships, multiple relationships, weak entities; mapping example #3; relational database constraints: implicit and user-defined
Feb 6 Slides: phpMyAdmin; set the root password; edit; add a new database user; create a table; insert data; MySQL command line; MySQL Workbench; Assignment #1; database update operations and anomalies; normalization; functional dependencies: trivial, augmented, equivalent, full key, partial, and transitive
Feb 8 Slides: Normalization: 1NF, 2NF, and 3NF; normalization example; normalization vs. denormalization; create table examples; drop table sequences; joins; Cartesian products
Feb 13 Slides: Table creation with constraint management; insert into select; client-server web apps; basic "naked" HTML; HTML page template; paragraphs and headings; lists; tables; links; images; form data; get and post methods; text input; checkbox input; radio button input; select list input; three-tier architecture;

Example basic HTML files: paragraphs.html   lists.html   tables.html   links.html   images.html
Example image files: RonCats1a.jpg   RonCats1a.jpg   RonCats1a.jpg   RonCats1a.jpg
Example form HTML files: text.html   checkbox.html   radio.html   select.html
Example PHP form processing: text.php   checkbox.php   radio.php   select.php
Feb 15 Slides: PHP syntax; variables; strings; heredocs; string operations; constants; arrays; indexed arrays; associative arrays; looping over array elements; multidimensional arrays; functions; scope; PHP Data Objects (PDO); PDO example; PHP query() vs. exec(); table join with PHP; SQL injection attack; PHP prepared statements;

Example PHP features: strings.php   heredoc.php   indexedarray.php   assocarray.php   multiarray.php
Simple end-to-end web application: index.html   queryDB.php
Example SQL injection attack: teacher1.html   teacher1.php
Example PHP prepared statement: teacher2.html   teacher2.php
Feb 20 Slides: PHP input filtering; object-oriented PHP: classes; inheritance, objects, abstract classes, interfaces, traits; object-relational mapping (ORM); type hinting; namespaces; PHP error reporting; Assignment #2; cascading deletes and updates; indexing; MySQL text, numeric, date, time functions

Example object-oriented code: Pet.php   Shape.php   Triangle.php   Crud.php   Debug.php   Rectangle.php   traittest.php
Example ORM code: people1.html   queryDB1.php   people2.html   queryDB2.php
Example error handling code: display.php   levels.php   suppress.php   custom.php
Feb 22 Slides: GROUP BY; GROUP BY HAVING; views; database design example


This course will concentrate on practical aspects of database management systems as currently practiced by industry: The emphasis will be on acquiring job skills that employers want for new hires in data management. Gain confidence and proficiency in developing enterprise-class transactional and analytical applications that use back-end data management. The course will also introduce some key data science topics, including Big Data, cloud computing, and data mining.


Department policy is to enforce
all course prerequisites strictly

CS 157A (with a grade of "C-" or better); Computer Science, Applied and Computational Math, or Software Engineering Majors only; or instructor consent.

Recommended books

Database Systems: Introduction to Databases and Data Warehouses
Nenad Jukic, Susan Vrbsky, and Svetlozar Nestorov
Prospect Press, 2017

Paperback ISBN: 978-1-943153-19-0 (available from
eTextbook ISBN: 978-1-943153-18-3 (available from and

These are much less expensive versions of the textbook originally published in 2014 by Pearson.
Pearson ISBN: 978-0-13-257567-6
The Kimball Group Reader: Relentlessly Practical Tools for Data Warehousing and Business Intelligence, 2nd edition
Ralph Kimball and Margy Ross
Wiley, 2015
ISBN: 978-1119216315
Database Systems: The Complete Book, 2nd edition
Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Windom
Pearson Prentice Hall, 2009
ISBN: 978-0-13-187325-4