pretty cs4250 logo
Logo courtesy

California State University Stanislaus

CS 4250: Database Management Systems

Fall 2018

3:00 - 3:50 pm, M W F, Science 137, Dr. Megan Thomas

[Syllabus ]        [Announcements]        [Calendar/Lecture Notes]        [Homeworks]        [Fun News]

Welcome to CS4250, an introduction to database management systems. Topics include:

Modeling, development, and implementation of database systems using storage structures, data definition languages, and data manipulation languages for the relational approach to database management. Database integrity and security problems. Historical development of database systems.

Prerequisite: CS 3100.

Announcements and Upcoming Events

12/9/2018 The final exam will reuse the sample schema used in the midterm. Here is the first chunk and here is the second chunk from the midterm (and final exam).
10/26/2018 One reason why you should be doing backups: "City Pays $2K in Ransomware, Stirs 'Never Pay' Debate" (, Oct 23, 2018)
10/9/2018 Here is one small chunk and here is a second chunk of the midterm you will take on Friday.
10/1/2018 Schema:
Earthquake (qname, date, latitude, longitude, magnitude, fault)
Damage(cityID, qname, cost, liveslost)
Cities(cID, cname, latitude, longitude, population) [city names may not be unique]
Questions (in SQL, and relational algebra where possible):
  • Find the names and dates of earthquakes whose magnitude was greater than 7.0.
  • Find the average population of cities whose names start with "San".
  • List the lives lost, quake names and city names for all quakes that occurred before 1960.
  • Find the names of earthquakes that have occurred in cities with a bigger population than that of some city named Vancouver. (Query should be written so can "swap in" name of a different city easily.)
  • List the city names and total cost, per city, of all quakes with magnitude greater than 7.0.
  • List the average magnitude of quakes for each fault (grouped by fault).
  • List all earthquakes and, where applicable, also list city names and lives lost in that city for quakes that affected cities.
  • List the names of cities whose populations are greater than the average city population.
The slides contain these questions, but this might be more readable.
9/24/2018 To help students practice SQL syntax, you may log in (using SSH or a similar tool) to and use your local MySQL account to try SQL queries at the MySQL command line.
After you log in to hopper, then
  • start the MySQL command line (#2 on the account paper you are given)
  • copy and paste the text from createHW2tables.txt into the MySQL prompt
  • then download and edit loadHW2data.txt so that it refers to whatever location you plan to put the files of sample data (you may need to edit on your local machine, then copy the file onto
  • put doctor.txt, patient.txt, department.txt at the location you specified in loadHW2data.txt
  • then copy and paste the text from loadHW2data.txt into the MySQL prompt
That will set up sample Doctor, Patient and Department tables, with schemas like in Hwk 2.(Note: for simplification, no foreign keys are set up. And real data is likely to have many more duplicates in human name fields, which a good DBA would think about carefully when writing queries.)
9/4/2018 The counseling center is offering some interesting workshops this semester, on topics like succeeding (and stuff) as a first generation college student, wellness, mindfulness, anxiety, etc, etc. Check them out!
Stress Management workshop on 9/19!
8/22/2018 LinkedIn August 2018 Workforce Report -- what skills are employers looking for? How is hiring going? Interesting quotation: "Demand for data scientists is off the charts"
8/22/2018 Welcome to CS 4250!


Project Overview

Project Part 1 20
Project Part 2 25
Homework 1 30
Project Part 3 20
Homework 2 30
Project Part 4 10
Mini-Homework 1 7
Homework 3 30
Project Part 5 25
Project Part 6 12
Project Part 7 70
Homework 4 35


At the CSU Stanislaus library:

The Ramakrishnan and Garcia-Molina/Ullman/Widom textbooks are both available at the university library.

On-line Resources

CSU Stanislaus Dreamers: Resources for AB540 and undocumented students

Fun News Items