title: Database schema for an online shop
body: <p>So I'm fiddling with how you could design the basic db schema for a webshop. Sure, there's a lot of missing details here and there, but I just want to get the most basic stuff right. </p>
  
  <p>Some basic requirements for the shop, which I'm trying to make a schema of:</p>
  
  <p>The shop has an inventory of products. Each product has a price, but this price should vary depending on sales. Customers can make orders for multiple products at a time, and should be able to see their order history. When the order has been completed, there should be a track and trace number.</p>
  
  <p>So, the following image is what I've come up with so far. I'm sure something is missing, I'm just not really sure what, also how to model the dynamic price aspect.</p>
  
  <p><a href="https://i.stack.imgur.com/aNcQ0.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/aNcQ0.jpg" alt="enter image description here"></a></p>