title: Flower Shop Online Database Schema - correct entity connections?
body: <p>I'm doing an web database app--flower shop online--where a person can order bouquets for people important to them and have the bouquets delivered to those people by a courier. I'm having a problem with the database schema. I can't connect entities the right way--connections are creating paradoxes and are very inefficient. This is the database schema:</p>
  <p><img src="https://i.stack.imgur.com/a3xCH.png" alt="click here to see the schema" /></p>
  <p>I'm having problems with connecting entities from SPEC_BUKIET to FLOWER. Database assumptions:</p>
  <ol>
  <li>Each kind of bouquet (entity BOUQUET_KIND) can have bouquets in different sizes</li>
  <li>Bouquets of different sizes (entity SPEC_BUKIET) and of the same kind have different prices</li>
  <li>Bouquets of different sizes and of the same kind have different quantities of flowers of the same kind used in them (e.g. a small bouquet uses 2 roses and 2 tulips, a medium bouquet uses 4 roses and 4 tulips, a large bouquet uses 8 roses and 8 tulips) (entity BOUQUET_FLOWER)</li>
  <li>Flowers of the same kind used in bouquets can have a different length and color (entity FLOWER)</li>
  </ol>
  <p>With a database designed like in the schema I'm getting a paradox where bouquets of the same kind in different sizes could have totally different flowers assigned and the SQL query to select flowers used in bouquets becomes complicated. What is an easier way to solve relationships in the schema?</p>