With my android room database, I have 2 tables: order
and service
, where service is either: massage, haircut, or spa. An order could have 1 or more services, I want my service table to just have my 3 different services. What is the right way to do this?
Should I be using join
? Foreign key
? @relation
? embed
?
I don't want any copies of services in my order table, because the detail/price of service could change at any time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.