Hi all,
 we have recently had to build a fairly complex database schema and we
tried at first to create the schema.yml and then build all the
objects' model and the related sql code.
But we have noticed that the SQL code generated didn't turn out how we
expected it to.
So we have decided to try a different approach:

     - Model the DB with mysql Workbench
     - Generate the related SQL code
     - Build the Database
     - From the Database generate the schema.yml
     - Add some code rows to the schema.yml
     - Generate the model objects

Maybe the first schema.yml had some errors in definition and (maybe)
it reflects the error in the SQL generation, but i would like to
discuss with you all about the two different approaches:

     - which one is better ?
     - are them the same ?
     - are there any problems using one instead the other approach?

Well, we have thought a bit about these questions (not so much ...
lol) and here some "tips":

    - in both approaches you have to manipulate the schema.yml, so
regardless you have to know the syntax
    - it is  simpler  to model the DB and then add some code rows to
schema.yml than to build all the schema.yml from scratch and next
generate the DB
    - usually, even if i have to write the schema.yml first i draw the
DB with mysql Workbench and check if i have cycles and archive it for
documentation.
      But if i already have the db model, why should i write the
schema.yml from scratch?

A friend consider that lost time writing details that symfony can
write for you is useless.

In the end i have my own opinion:
    For simple databases (up to 10 tables) i think is reasonable to
write the schema.yml from scratch and proceed to build all as written
in the manual.
    For complex databases i think is more useful having first the DB
modelled and if have already the DB, is reasonable to generate the
schema.yml from the SQL code

This is my opinion and i hope to find 100 people that think i'm right
and other 100 that think i'm wrong (hehehe i really hope to find 200
people that have time to write a comment here :-D :-D )

Thank you all

Giovanni

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to