jartaud
jartaud

Reputation: 385

What's the best way to design an Entity / Relationship Model?

For example if I have 20 tables, I have to design it by section? i.e

CLIENT (id, name...) -- orders -- ODERS_DETAIL(id, products...)
.
.
.
lives --- ADDRESS(...)

Or I can use The MySQL Workbench EER Model (To me, it looks like the Pysical Model)?

Or like this: Data Modeling Levels

Upvotes: 0

Views: 793

Answers (2)

Joe
Joe

Reputation: 3347

Well, I would not do it in code. That is for the RDBMS itself. MySQL EER Workbench does not do true entity modeling - it is modeling tables, you are correct. If you want true ER modeling I suggest Oracle's newly released ('Early Adopter') SQL Developer Data Modeler. It is pretty easy to use, is free and can forward and reverse engineer models to tables. http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html

Upvotes: 1

Jé Queue
Jé Queue

Reputation: 10653

When in doubt, design a table that is totally flat, and then determine where you have duplicated data, these can be considered for tables (entities).

The "ER model" defines entities unto themselves and allow the reference of entity-to-entity (table-to-table) through a separate relation. If you can remove yourself from thinking about foreign keys in your entities and focus on the relations in their own separate table.

Upvotes: 1

Related Questions