MySQL Workbench 6 - difference in creating database / schema as a model and within a MySQL Connector

StackOverflow https://stackoverflow.com/questions/21491726

  •  05-10-2022
  •  | 
  •  

문제

I was rooting MySQL Workbench and I had a TILT. In MySQL Workbench initial screen there are two things I did not understand.

  • When creating a connection and access this, I have the option of creating schemas / databases and create your tables, scripts, etc. .. If I create a database named example, I only have the option to create the tables by script, not by EER diagram.
  • Returning to the MySQL Workbench initial screen, there is also the option of creating a model (for me it is a schema / database in the same way). If we create a model named example, as in the previous item within this you can create scripts, views, tables, and have the distinction of creating EER diagrams.

What I wanna know is:

  1. Why there are options of create schemas / databases as models and within MySQL Connections?

  2. why I can create schemas / databases with the same name in both options to create schemas / databases (MySQL Connectors and Models) without naming conflicts happen?

  3. If they are the same thing, why when I create a model MySQL Connector does not synchronize automatically to recognize the model?

  4. If they are the same thing, that I can create EER Diagram for schema / database in the Model and not in MySQL Connector?

Thanks to anyone who can answer me these questions.

도움이 되었습니까?

해결책

You started from the wrong premise. Models and connections are two completely different things (why would there be different sections in MySQL Workbench if not?).

Via connections you can reach a server and work on it. Create users, retrieve data, create db objects etc.

Modeling is however the task to design a database structure. All the objects you create only exist within that model. You can design your structure from a higher level of view instead of going down to the pure SQL (which you can too, if you want). Nothing reaches a server until you either forward engineer your model or synchronize it to that server. The first is simply creating all the objects as you designed them, the latter is a two-way 'merge', that is, a diff is generated between the model and the server content and changes are applied to make the structure on the server be the same as in the model and vice versa.

Understanding that fundamental difference answer all your questions above.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top