[Question] Is there a capability to connect to multiple databases
See original GitHub issueDjango provides a capability to define DATABASE_ROUTERS
in settings.
- It gives you a capability to define alias names in
DATABASES
for primary, replica*(1,2,3… so on). - you can customize the connection to read from replicas whereas write only to primary.
QuerySet
object also provides assistance for this setting. https://docs.djangoproject.com/en/3.2/topics/db/multi-db/
Is there such a definition in piccolo to connect to multiple instances (or databases) and accordingly read and write queries can be split for efficiency? Did not find anything in the docs.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
You're Using Too Many Databases. You Only Need One
Well, I'm here to tell you that you don't need to use multiple databases of your web apps. You only need one database:...
Read more >Do you pull data from multiple databases?
You use multiple database for different use cases in our organisations and it's difficult to pull that information together in a coherent way....
Read more >Optimal database combinations for literature searches in ...
Background. Within systematic reviews, when searching for relevant references, it is advisable to use multiple databases.
Read more >Administration Guide for Connecting to Native Databases ...
The ability to connect to multiple databases through a single synchronization project simplifies the process of maintaining multiple database connections, as ...
Read more >Benefits and detriments of multiple MySQL DB connections
There are no general positives or negatives to using multiple database connections in an application, it is always a case-specific issue.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve implemented a first version - will release it now. There’s future scope for adding routers etc like in Django, but hopefully this helps.
@satishdash Yeah, we can definitely build on top of it.
Something like this perhaps:
Once an API design has been settled on, it shouldn’t be too hard to implement. If you have any ideas for an API let me know.