Database Management · Intermediate level

Intermediate level · Module 6: Intermediate Database Project · Lesson 2 of 3

Building and Loading

Create the database, import and clean the data and prove that the constraints work.

In this lesson you will

  • Build the database from scripts
  • Load cleaned data and test constraints

Key concepts

schema scriptsimport pipelineconstraint testsaudit trail

The lesson

Create the database entirely from versioned scripts so it can be rebuilt at any time.

Import the messy data through staging, clean it, review duplicates and load it. Record numbers at each step: rows imported, cleaned, flagged and loaded.

Prove the constraints with a set of statements that must fail, and add the audit trigger.

Step by step

  1. Run the schema scripts on an empty database.
  2. Import, clean and load the data.
  3. Run the constraint tests.
  4. Record the import statistics.

Practice activity

Build and load the NGO database.

Expected result: A database rebuilt from scripts, loaded with clean data, with import statistics and passing constraint tests.

Check your understanding

  1. Why build the database from scripts?

    Show answer

    So it can be recreated reliably at any time.

  2. Why record row counts at each import step?

    Show answer

    To check that no rows were lost unexpectedly and to explain the results.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.