Data Definition Language

Data Definition Language

  • CREATE

  • AUTO_INCREMENT

  • NOT NULL

  • DEFAULT

  • PRIMARY_KEY

Preparation

Createarrow-up-right

Droparrow-up-right

Addarrow-up-right

Auto Incrementarrow-up-right

How to create a database in workbencharrow-up-right

Examples

Creating a database (Remember to refresh)

CREATE DATABASE pokedex;

An example table:

Inserting with AUTO_INCREMENT

Exercise 1 (Study groups)

  • List at least 10 requirements from the case e.g:

    • A movie has a unique ID

    • A movie can be …

    • The cast of a movie is …

  • Formalise the requirements in a document (SAVE THE DOCUMENT)

Exercise 2 (Study groups)

  • Implement new IMDB data model

    • Using Create

    • Primary Key, NOT NULL, DEFAULT

    • (Foreign Key)

  • Reverse Engineer as EER diagram (Ask for help if needed)

  • Hand-in: get AS FAR AS POSSIBLE WHILE STILL HANDING IN (AFAP)

    • Identified requirements

    • EER Diagram

Handin here:

Deadline 28th September

https://kea-fronter.itslearning.com/LearningToolElement/ViewLearningToolElement.aspx?LearningToolElementId=1052653

Last updated