Module 3: Query data from a table

CMPS 160: Databases

Introduction

Databases are one of the fundamental pillars of information technology. Any data that has to be persisted is very likely to be stored in a database. Every time you access a website on the internet data is retrieved from and stored in a database. What makes databases such a good tool for storing data? How do databases store data? What is the data model? All these questions and many more will be answered in this course. In this module, we will take a bird’s eye view on databases and touch on all the important concepts.

n this module, we will look at how the relational structure is created in practical terms and how data is queried from a single table to multiple tables. The learning of the different SQL (Structured Query Language) operators that are utilized in SQL. This module will consist of two different chapters in the book.

Module Objectives

  • Identify how to start and stop MySQL database server
  • Learn how to use MySQL Workbench
  • Learn how to create a database connection
  • Learn how to save and execute scripts in MySQL environment
  • Learn how to use MySQL commands through Jail environment
  • Distinguish between the base table values and the calculated values in SELECT statements.
  • Describe the use of a column alias.
  • Describe the order of precedence and the use of parentheses for arithmetic expressions.
  • Describe the use of the CONCAT function in string expressions.
  • Describe the use of functions with strings, dates, and numbers.
  • Describe the use of the DISTINCT keyword.
  • Learn the use of comparison operators, logical operators, and parentheses in the WHERE clause.
  • Learn about the use of IN, BETWEEN, and LIKE operators in the WHERE clauses.
  • Learn about inner join, left outer join, right outer join, full outer and cross join.
  • Describe how to combine inner and outer joins
  • Describe the use of the implicit syntax for coding joins
  • Learn about MySQL Workbench ( create a database connection, objects of a database, column definitions for a table)

Learning Resources

  • Module 3 Readings: Chapter 3 & 4
  • Module 3 Slides: Chapter 3 & 4

Learning Activities

  • Module 3 Assignment: Download the Database Scripts for this module to use in the Assignment: Database Scripts

For Further Study

Leave A Reply

Your email address will not be published.