# Need advice choosing ORM or not with slim

**URL:** <https://discourse.slimframework.com/t/need-advice-choosing-orm-or-not-with-slim/4412>\
**Category:** Questions\
**Created:** [September 24, 2020, 2:20pm UTC](https://discourse.slimframework.com/t/need-advice-choosing-orm-or-not-with-slim/4412 "2020-09-24T14:20:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ledahu](https://avatars.discourse-cdn.com/v4/letter/l/ac8455/32.png) [@ledahu](https://discourse.slimframework.com/u/ledahu)\
**Post date:** [September 24, 2020, 2:20pm UTC](https://discourse.slimframework.com/t/need-advice-choosing-orm-or-not-with-slim/4412/1 "2020-09-24T14:20:28Z")

</div>

Hi

im beginning a new project. The core is a “search engine” , meaning FullText search in multiple table. Raw SQL is my first choice but…

So my question is : what is the best compromize using slim between maintanability and performance ? and if ORM, which one ?

Thank you for your advice !

---

<div class="post-metadata">

**Author:** ![tj\_gumis](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@tj\_gumis](https://discourse.slimframework.com/u/tj_gumis)\
**Post date:** [September 29, 2020, 10:02am UTC](https://discourse.slimframework.com/t/need-advice-choosing-orm-or-not-with-slim/4412/2 "2020-09-29T10:02:19Z")

</div>

Keep yourself away from Doctrine, make your own ORM if you have to 🙂

---

<div class="post-metadata">

**Author:** ![ledahu](https://avatars.discourse-cdn.com/v4/letter/l/ac8455/32.png) [@ledahu](https://discourse.slimframework.com/u/ledahu)\
**Post date:** [September 30, 2020, 5:39am UTC](https://discourse.slimframework.com/t/need-advice-choosing-orm-or-not-with-slim/4412/3 "2020-09-30T05:39:17Z")

</div>

🙂

for now, im gonna use the CakePHP/database querybuilder

---

<div class="post-metadata">

**Author:** ![tj\_gumis](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@tj\_gumis](https://discourse.slimframework.com/u/tj_gumis)\
**Post date:** [October 1, 2020, 7:28am UTC](https://discourse.slimframework.com/t/need-advice-choosing-orm-or-not-with-slim/4412/4 "2020-10-01T07:28:29Z")

</div>

If it"s just about the query builder, you should definitely stop thinking of Doctrine 😃 and stay with what you have or even write something “tailor-made” by your own. On the other hand if somehow you’re convinced database object relational mapping is something you just can’t live without, but you need something light and flexible it means that PDO::FETCH\_CLASS might be your best friend ever related to your own DAO’s and DTO’s with value objects. You can even play with aggregates (in case of table relations) in quite simple way still accompanied by the old pal - PDO 😃 .

---

<div class="post-metadata">

**Author:** ![contactjavas](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/contactjavas/32/1217_2.png) [@contactjavas](https://discourse.slimframework.com/u/contactjavas)\
**Post date:** [October 6, 2020, 4:11am UTC](https://discourse.slimframework.com/t/need-advice-choosing-orm-or-not-with-slim/4412/5 "2020-10-06T04:11:31Z")

</div>

I use Slim 4 along with Eloquent as the ORM. It feels good.
