Module 4: Structured Query Language I

CMPS 160: Databases


In the previous module we saw how a relational database allows one to store data in a consistent manner. In this module, we will look at how the relational structure is created in practical terms and how data is inserted, removed, updated, and queried. All of these operations are performed by using one ubiquitous tool: the Structured Query Language (SQL). This (mostly) declarative programming language has been around since the seventies and is used in virtually all relational databases (and even NoSQL databases). Over the years, many changes have been made to the language that have been captured in the different versions of the SQL standard. After studying this module, you should be able to use SQL and have a good idea of its capabilities.

Module Objectives

  • Learn basic SQL statements for creating database structures
  • Learn basic SQL statements for adding data to a database
  • Learn basic SQL SELECT statements and options for processing a single table
  • Learn basic SQL SELECT statements for processing multiple tables with subqueries
  • Learn basic SQL SELECT statements for processing multiple tables with joins
  • Learn basic SQL statements for modifying and deleting data from a database
  • Learn basic SQL statements for modifying and deleting database tables and constraints

Learning Resources

  • Module 4 Readings: Chapter 3 (first half)
  • Module 4 Slides: Chapter 3 (first half)

Learning Activities

  • Module 4 Quiz: Chapter 3


How to get started with the MySQL Workbench and SQL queries:

How to reverse engineer a database and write a join query:

For Further Study

It is highly recommended to work through the exercises at the end of the chapter, specifically:

  • 3.7 – 3.10
  • 3.13 – 3.18

2 comments on “Module 4: Structured Query Language I”

  1. Teandria Reply

    Professor, I thought this tutorial would help with the install:-( …..I am not trying to be a dbm, so I guess I am not wired to figure out the instructions.. They are not very intuitive…I understand u feel that it is easy, but you are not a novice, I am. Hence, why I am a student trying to learn. I thought this course would help me have a better understanding of access and SQL…. I am not able to get the download. Can u please add a tutorial for that?

    • Mark Voortman Reply

      I’m not claiming they are easy, so let me help you out. I’ve set up the MySQL server for you. You can continue with installing the MySQL Workbench and then follow the videos above. I will send your password by email.

Leave A Reply

Your email address will not be published. Required fields are marked *