problem in many to many relationship

前端 未结 3 825
感情败类
感情败类 2021-01-28 02:37

I have two tables jewelry(j_id,j_name,Description) and style(style_id,style_name,image) each table has a many to many relationship with the other table

3条回答
  •  梦毁少年i
    2021-01-28 03:20

    your question is not about designing your database for this many-to-many relationship but about the inserting strategy when creating new jewelry / style objects and relations between them?

    In that case your strategy has to be a transaction inserting your main data and after that relating each other. In case of abortion you can just rollback the transaction and everything you created is removed. As long as you're in a transaction and your isolation level is correct nobody will see the temporarily created data

提交回复
热议问题