DEV Community

[Comment from a deleted post]
Collapse
 
dealloc profile image
Wannes Gennar

At first glance:

  • I don't think I understand 100% what you mean with the items like "price -on_sale -sale_price -published_at -edition -isbn"
  • When you're representing money in your applications you must be very careful not to make rounding mistakes (see martinfowler.com/eaaCatalog/money.... and twitter.com/billkarwin/status/3475... unless you want to end up losing money
  • orders also require special attention. When making references to users for example you have to keep in mind that if a user deletes his account, you may still need to keep the orders (for financial / legal reasons), and you might have lost required data since the user the user_id field refers to no longer exists.
  • You keep the total price in the order entity, why is it duplicated in the create_book_order_table?