How to create database ER diagram

Hello there. I got a task to create a database with Entity Relantionship diagram. So far I managed to import the whole contents (tables) of database to phpmyadmin sql database server, using xampp.
I have a lot of tables, but im newbie, and I don't really know how to connect the tables. Can someone help me with this?

so you took all of your tables from Microsoft SQL Server and moved them to MySQL database? or are you connecting to Microsoft SQL Server from phpmyadmin?

I am a bit confused

I got a file database.sql and imported it to the local MySQL server using xampp.
The file created all the tables you can see in the picture.

This is a Microsoft SQL Server forum but someone else might help you with doing the connecting of the tables.

Sorry for posting it in the wrong forum :slight_smile:

ER is for any db.

The easiest place to get info on table relationships is in Foreign Key (FK) constraints defined in the db. That will give you info on some parent and child tables.

The next best way is to use the table names and key column names to relate the tables. But that depends solely on how well the designers adhered to the "standard" way of naming tables/key columns.

Typically the "master"/parent table with a key named "id" or "

_id". In other tables, the key should be name "
_id".

Best practice is to name the "child" tables in the style of "<parent_table>_<child_table>. For example, tables "orders" would have an "order_id" column, and table "order_items" would have a column "order_id" in it. It's then fairly easy to see that those two tables related to each other, even without a formal FK.

I've tried to connect tables, but unfortunately failed. It shows error message everytime.
error_message