2012-06-16 15:34:23 +04:00
|
|
|
Getting Started: Database First
|
|
|
|
===============================
|
|
|
|
|
|
|
|
.. note:: *Development Workflows*
|
|
|
|
|
|
|
|
When you :doc:`Code First <getting-started>`, you
|
|
|
|
start with developing Objects and then map them onto your database. When
|
|
|
|
you :doc:`Model First <getting-started-models>`, you are modelling your application using tools (for
|
|
|
|
example UML) and generate database schema and PHP code from this model.
|
2012-08-23 17:41:19 +04:00
|
|
|
When you have a :doc:`Database First <getting-started-database>`, you already have a database schema
|
2012-06-28 17:34:58 +04:00
|
|
|
and generate the corresponding PHP code from it.
|
2012-06-16 15:34:23 +04:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
This getting started guide is in development.
|
|
|
|
|
|
|
|
Development of new applications often starts with an existing database schema.
|
|
|
|
When the database schema is the starting point for your application, then
|
|
|
|
development is said to use the *Database First* approach to Doctrine.
|
|
|
|
|
2012-08-23 17:41:19 +04:00
|
|
|
In this workflow you would modify the database schema first and then
|
2012-06-16 15:34:23 +04:00
|
|
|
regenerate the PHP code to use with this schema. You need a flexible
|
|
|
|
code-generator for this task and up to Doctrine 2.2, the code generator hasn't
|
|
|
|
been flexible enough to achieve this.
|
|
|
|
|
2012-08-23 17:41:19 +04:00
|
|
|
We spinned off a subproject, Doctrine CodeGenerator, that will fill this gap and
|
2012-06-16 15:34:23 +04:00
|
|
|
allow you to do *Database First* development.
|