A
A
Anton2017-03-30 11:09:16
MySQL
Anton, 2017-03-30 11:09:16

Symfony Bundle DB Tables - Table Prefixes or Separate DBs?

We have a workflow system, which I am currently rewriting in Symfony3. There was a question on the organization of Bundles and their models.
The system is a set of modules (Bundles in Symfony3 terminology). Each module contains documents. Documents have comments, statuses, and a set of fields that differ from module to module. Also, some (but not all) modules are linked. For example, a document in module A is created on the basis of a document created and signed in module B.
At the moment, the separation of modules is implemented by prefixes, they are all in the same database:

exp_document,
exp_comments,
pay_document,
pay_comments,

But somewhere I read that you can still do such a division: one module (bundle) = one database.
That is, it will be:
exp_db:
document,
comments,
pay_db:
document,
comments,

Question: how to organize better? With prefixes, how now? Or with division on databases?
Considering that in some modules there is a link to information from other modules.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
shagguboy, 2017-03-30
@shagguboy

at division on a DB foreign keys you will not make.
if to use ORM that names of tables are unimportant in principle.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question