Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Your First Table
CREATE TABLE basics
Entity Relationship Diagrams (ERD)
11. ERD to SQL code
Summary

Instruction

Okay, let's proceed. A table in an ERD diagram is represented by a rectangle with its name. Also, all of the columns are listed together with their data types. Not very complicated, right? Take a look:

LEAD

Do you recognize the table? That's right, it's the exhibit table for the childhood museum.

There can be other kinds of information displayed in the diagrams; you will learn about them in another part of the course.

Exercise

Based on the ERD diagram below, write the proper SQL statement to create the table in the database.

LEAD

Stuck? Here's a hint!

Type:

CREATE TABLE product (
  id integer,
  name varchar(32),
  brand varchar(32),
  price integer
);