Hasan Toraman
Hasan Toraman

Reputation: 99

how to architecture Spring Boot Microservice

I have an architectural question about an application I want to build. The Application will have Angular as frontend and Backend Spring Boot generated with jhipster.

I will have a microservice called manufacturer where I have the following entities: seller material products. material has an many to many relationship with seller and the owner is material. and product with material many to many and is the owner.

my question is One material can have multiple sellers thus multiple prices. Does it make more sense to put the price field inside material or inside seller? I am not an DB expert but my guts tells me to put it inside material because it makes more logical sense from everyday use. Could someone maybe give me an advice is that ok if I put it inside material or does it make more sense to put it inside seller entity?

Upvotes: 1

Views: 205

Answers (1)

Kumar Ashutosh
Kumar Ashutosh

Reputation: 1254

Think practically being a seller. Multiple seller buy dough but have a varying a pizza prices. You might have seen online shopping websites have different prices for different sellers.

I don't know what you mean by material & product , but if I get it right, by material you mean raw-material for making product.

A seller would be linked with material in a one-to-many and with product in a many-to-many relationship.

Upvotes: 1

Related Questions