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
@Pobiega
Don't randomly ping people. Rude.
🙊 🥺
sry
A user can have many carts and a cart can hold many items.
you're using multiple databases at once? why?
for learning how to control multiple databases when program need more dbs
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