Hi! I’m very new to databases and I’m using TypeORM and I have the tables user, category and productEach category belongs to an user and every product belongs to a category and every product belongs to an userI’ll have the user requested without its categories or products and the user requested with its categories but the categories without its productsOn the other hand I’ll have the category requested with the image of its user and without the products and the category requested with the products but the products without the userAnd I’ll have the products requested with its user image and its categorySo my question is when to use the one to many relationships and how to store for example the user in the product? Is it a good idea just to store the id or I need a specific relation?
Submitted July 17, 2020 at 05:09AM by gato0o1412
No comments:
Post a Comment