practicing on mutliple databases

I have a model named 'User' in PostgreSQL, an 'Item' in MongoDB, and a 'Cart' in PostgreSQL. Shouldn't the 'Cart' model be relational with Item and User, should I change the mongodb? In other words, a user has a cart, and a cart has an item.
7 Replies
only you know
only you know4mo ago
@Pobiega
Pobiega
Pobiega4mo ago
Don't randomly ping people. Rude.
only you know
only you know4mo ago
🙊 🥺 sry
SwaggerLife
SwaggerLife4mo ago
A user can have many carts and a cart can hold many items.
Jimmacle
Jimmacle4mo ago
you're using multiple databases at once? why?
only you know
only you know4mo ago
for learning how to control multiple databases when program need more dbs
Jimmacle
Jimmacle4mo ago
well, you can't enforce relationships at all between multiple databases not without writing all that logic yourself anyway what kind of applications need "more dbs" where you've split relational data across them? not to mention mongo isn't a relational database i feel like this whole problem you've invented for yourself isn't something you'd really run into in most applications