Module 9: Create a Database

CMPS 160: Databases

Introduction

A data model captures the essential entities and relationships in a model, as we have seen in the previous module. But a data model cannot be directly turned into a database and has to be transformed into a database design first. This step is sometimes confusing because superficially a data model and database design look much alike, but there are several important differences. The most important differences are that a database design requires the definition of primary and foreign keys, and the introduction of intermediate tables for many-to-many relationships. After finishing the database design the next step would be to implement it in an actual DBMS, such as MySQL.

Module Objectives

  • Describe how the different types of constraints in a table (not null, unique, primary key, foreign key)
  • Understand the difference between a column-level constraint and a table-level constraint.

  • Describe the use of an index.
  • Describe the use of a script for creating the tables of a database.
  • Describe three character sets that are commonly used with MySQL and the pros and cons of each character set.

Learning Resources

  • Module 9 Readings: Chapter 11
  • Module 9 Slides: Chapter 11

Learning Activities

For Further Study

Leave A Reply

Your email address will not be published.