MySQL Workbench - Create Database based on EER Model (Forward Enginner Options)

2

Doubt:

In WorkBench I created the table in EER Diagram and now I want to connect to Hostname 127.0.0.1.

The path I make is Forward Engineer - > Next - > and then I have a number of options, do I have to select which ones?

Options:

  • Drop object before each Create
  • Object Generate DROP SCHEMA
  • (...)
asked by anonymous 25.02.2014 / 11:08

3 answers

3

Is this screen here?

Comeon,onebyone:

  • DROPObjectsBeforeEachCREATEObject:deletesthetablesbeforecreatingthemagain
  • GenerateDROPSCHEMA:deletesthe/schemadatabasebeforecreatingitagain
  • SkipcreationofFOREIGNKEYS:doesnotcreateforeignkeys
  • SkipcreationofFKindexesaswell:doesnotcreatetheindexesfortheforeignkeys(onlyifyoucheckthepreviousoption)
  • Omitschemaqualifierinobjectnames:donotprefixobjectswithschemaname
  • GenerateUSEstatements:useUSEstatements
  • GenerateSeparateCREATEINDEXstatements:Donotcreateindexeswithintablegenerationcommands
  • AddSHOWWARNINGSaftereveryDDLstatement:SelectthisoptiontoaddtheSHOWWARNINGScommandstotheoutput;thiswilldisplayanywarningswhentheoutputisexecuted,whichisgoodfordebuggingpurposes
  • Donotcreateviewplaceholdertables:¯\_(ツ)_/¯
  • Donotcreateusers.Onlycreateprivileges(GRANTs):doesnotcreateanyusers,onlyguaranteestheiraccesstothenecessarytables(itisassumedthatusersarealreadycreated)
  • GenerateINSERTstatementsfortables:checkthisoptionifyouhaveeditedrowstogeneratedtablesandwantthemtobeinserted
  • DisableFKchecksforINSERTs:DisablesforeignkeycheckingforINSERTs.

References:

link link

    
25.02.2014 / 13:29
2

I'll follow the Wizard menus that appear on my machine (Fedora with Worbench in English):

  • [Connect Options] You should define the host where you will call. At the your case, localhost or 127.0.0.1; Sets the user name and password and click "Next".
  • [Options] You should do Next, without any problem. All the options that are there serve as a migration - if the database / tables already exists and you want to modify because you made changes to the ER model. "Next"
  • [Select Options] In this window you can choose if you want export / create only tables, Views (View Objects), Stored Procedurs (Routine Objects), Triggers, and User Objects (User Object); "Next"
  • [SQL Script Review] - you can review the changes that will be made in the DB. You can change anything you want but it is not all necessary. "Next"
  • And you should have the database created on the host / database you defined.

    I hope it helps!

        
    25.02.2014 / 13:28
    0

    I do this: I create the bd in mysql then I open the workbench and I create my EER diagram, I give a ctrl + shift + ze I am advancing ... One thing I like to do is copy the sql that is generated, because if it gives some error I open phpmyadmin I select my bd and I insert the sql that I copied and I analyze the error to correct it (but this is a case in point)

        
    02.03.2014 / 12:27