# Is it possible for CakePHP to use 2 separate tables for reading/writing?

**URL:** <https://discourse.cakephp.org/t/is-it-possible-for-cakephp-to-use-2-separate-tables-for-reading-writing/7381>\
**Category:** Need Help\
**Created:** [March 2, 2020, 7:22pm UTC](https://discourse.cakephp.org/t/is-it-possible-for-cakephp-to-use-2-separate-tables-for-reading-writing/7381 "2020-03-02T19:22:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akkaweb](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/akkaweb/32/53_2.png) [@akkaweb](https://discourse.cakephp.org/u/akkaweb)\
**Post date:** [March 2, 2020, 7:22pm UTC](https://discourse.cakephp.org/t/is-it-possible-for-cakephp-to-use-2-separate-tables-for-reading-writing/7381/1 "2020-03-02T19:22:37Z")

</div>

I have an API written using CakePHP and one of the tables contain data for AppUsers. The request is to place the _ **AppUsers** _ table into a separate database but somehow maintain the App working as it is one Database. I need to take into account that other tables have data that belongs to the _AppUsers_ table. Is this even possible? How can I manage it. If not, any suggestions? Note that this table is not used to log in a user into the application. It is just used to collect data from a device.

 ![DatabaseSketch](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/b/bed50e97e799870843fbff69f491164a5e325470.png)

---

<div class="post-metadata">

**Author:** ![manbor](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@manbor](https://discourse.cakephp.org/u/manbor)\
**Post date:** [August 14, 2025, 11:30am UTC](https://discourse.cakephp.org/t/is-it-possible-for-cakephp-to-use-2-separate-tables-for-reading-writing/7381/2 "2025-08-14T11:30:45Z")

</div>

CakePHP allow to configure multiple databases.

> **[Database Basics - 4.x](https://book.cakephp.org/4/en/orm/database-basics.html#configuration)**

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [August 14, 2025, 12:09pm UTC](https://discourse.cakephp.org/t/is-it-possible-for-cakephp-to-use-2-separate-tables-for-reading-writing/7381/4 "2025-08-14T12:09:40Z")

</div>

I think you meant to link to the read and write connections section, right? 😃

> **[Database Basics - 4.x](https://book.cakephp.org/4/en/orm/database-basics.html#read-and-write-connections)**

But be aware, that this is a CakePHP 4.5+ or 5.0+ only feature
