Sitemap
Towards AI

We train AI Engineers. We deploy Enterprise AI. Join 100K+ AI practitioners at Towards AI Academy or reach out for help making your company AI native. towardsai.com

Member-only story

Programming

Step-by-Step Design of Enhanced Entity-Relationship (EER) in MySQL

Database schema relationships of tables

4 min readApr 24, 2021

--

EER model. A photo by Author

This article will give a clear understanding of the visual representation of tables that are related to each other. EER is a modeling interface in MySQL workbench.

Topics to be covered:

1. Table creation
2. EER creation

Table creation

In this example, we will make three tables to get a glance at the EER design. We will take food retail tables that contain customer details, restaurant details, and order details.

The first table we will create is customer data table as shown below:

#Table 1
drop table if exists customerdata;
create table customerdata(
cid int(4) not null,
customer_name varchar(20) not null,
contact_number varchar(11) not null,
address varchar(30) not null,
constraint pk_customerdata primary key (cid)
);

#inserting values of table 1 columns
insert into customerdata(cid,customer_name,contact_number,address) VALUES
(1001,'Amit','1234567801','mumbai'),
(1002,'Shubendu','1234567802','delhi'),
(1003,'Seasia','1234567803','mohali'),
(1004,'Kokan','1234567804','pune'),
(1005,'Ajay','1234567805','bhopal');

--

--

Amit Chauhan
Amit Chauhan

Written by Amit Chauhan

Data Scientist, AI/ML/DL, Azure Cloud

Towards AI
Towards AI

Published in Towards AI

We train AI Engineers. We deploy Enterprise AI. Join 100K+ AI practitioners at Towards AI Academy or reach out for help making your company AI native. towardsai.com