Skip to content

Instantly share code, notes, and snippets.

@christine-le
Last active August 7, 2017 00:52
Show Gist options
  • Save christine-le/f909c657d022ed27814aedd71d37e859 to your computer and use it in GitHub Desktop.
Save christine-le/f909c657d022ed27814aedd71d37e859 to your computer and use it in GitHub Desktop.
cp-7(part2): Transform a data model into a database

Checkpoints 7 (part 2, Transform a data model into a database): Quiz Questions

**1. What is a database migration? **

a) The process of upgrading the DBMS version

b) The process of making changes to a database's schema ← Correct

c) The process of optimizing existing SQL queries

d) None of the above.

Explanation:

A database migration includes changes that effects its schema, such as changes to the columns, tables and constraints.

Objective

Remember: Define a migration Understand: Explain how a migration changes the database

Covered in:

Modeling data relationships

**2. Which of the following would be considered a migration change? **

a)

DELETE FROM products
WHERE sku = '52983';

b)

INSERT INTO products
VALUES (103, 't-shirt', '12.99');

c)

ALTER TABLE products
ADD sku VARCHAR(20);  ← Correct

d) None of the above.

Explanation:

A migration changes the database's schema. The correct answer uses the ALTER statement to update the products table by adding a new column called sku.

Objective

Apply: Make a basic change to a migration

Covered in:

Modeling data relationships

**3. TBD **

a)

b)

c)

d)

Explanation:

Objective

Create: Use migrations to build a database containing tables for the data model

Covered in:

Modeling data relationships

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment