Take the 2-minute tour ×

I am currently working with a MySQL database table structure. I found a great table structure online but i am not sure how to duplicate such thing. I am new to this and I am requesting help in creating a query that will create all tables( which have correlated data(index), foreign keys, many to many relationships, etc.).

Random I was able to make a query to select all fields:


FROM schedule 

INNER JOIN semester 

ON schedule.semester_id = semester.id

INNER JOIN office_hours

ON office_hours.schedule_id = schedule.semester_id

INNER JOIN faculty

ON faculty.id = office_hours.faculty_id

INNER JOIN faculty_titles

ON faculty_titles.faculty_id = faculty.id

INNER JOIN faculty_education

ON faculty_education.faculty_id = faculty.id 

INNER JOIN section

ON section.faculty_id = faculty.id 


ON class.id = section.class_id

INNER JOIN major_class_br
share|improve this question

1 Answer 1

up vote 1 down vote accepted

You find a good documentation of how to create tables in the corresponding MySQL documentation:

You can user MySQL Workbench if you want to play a little with a graphical front-end. You can download it from the link or install it from you Linux repository.

There are three section in the workbench: SQL Development, Data Modeling, and Server Administration. Choose "Create new EER Model" in the Data Modeling section and then "Add Diagramm". You can insert new Tables by drag and drop from the left bar and apply your model to your database by clicking on the Database menu entry and then "Forward Engineer...".

The table structure you linked in you querstion was created by MySQL Workbench as well. Therefore, it should be easy for you to compare it.

share|improve this answer

Your Answer


