R
R
rassol2011-01-05 18:43:33
PHP
rassol, 2011-01-05 18:43:33

Working with the database in OOP applications in php 5.3

Tell us, who uses what to work with the database ( MySQL )?
Are you using an ORM ? If so, which one?
If not, how do you solve the problem of many-to-many relationships through the third table ? Are you creating an object for the third table?

I ask, because I have been tormented for more than a week - what to choose. Doctrine is recommended everywhere . I used it for my bike a year or two ago (the version was 1 stable then). Seemed unnecessarily redundant and terribly slow. The compilation of all classes into one file of 2.5 megabytes in size saved me a little then. I tried to take the second version in a hurry - it did not work right away. Is it worth it to "dig" further?

I will use MyISAM without foreign keys, of all the goodies, only mapping to objects and an iterator over them are really needed. Well, the ability to make "clean" requests if necessary. Links again. As many-to-one, and through the third table. A high load is planned.
I tried phpactiverecord - it's not a bad thing, but with relations it has ... Pichal. As with compound class names like My_Library_Facade, My_Library_Proxy etc.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
SwampRunner, 2011-01-05
@SwampRunner

I use pyha.ru/go/godb/

A
Atrax, 2011-01-05
@Atrax

I have my own bike :) many-to-many via a graph for which there is a separate table

S
standov, 2011-01-05
@standov

Propel - has everything you are looking for + much more and without the brakes of wild doctrine

D
Dunadan, 2011-01-05
@Dunadan

Are you using any framework?
We use Kohana 3 and Jelly for it - it's cheap, it's good with relations.
Many-to-many does not require the creation of a model for the intermediate table.
One problem - not standalone.

N
Nodge, 2011-01-05
@Nodge

When developing using the Yii Framework, I mainly use ORM. Sometimes in bottlenecks I make requests manually, through PDO. There were no particular performance issues.

Z
zizop, 2011-03-11
@zizop

We use Doctrine + own extensions for it. Satisfied as a boa constrictor) About the brakes, so it's inevitable. You have to pay for convenience. But you can speed up web applications well by using query caching and fetch caching.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question