title: Database Design Optimization
body: <p>This one is sort of a homework question, in that it is related to a question I have for my introductory databases course but is not the question itself. I am studying out of Phillip Pratt's "A Guide to MySql" and am stuck on a problem in the second chapter.
  The problem states:</p>
  
  <blockquote>
    <p>Indicate the changes (using the shorthand representation) that you
    would need to make the current deign of the Premiere Products database
    to support the following requirements. A Customer is not necessarily
    represented by a single sales rep, but can be represented by several
    sales reps. When a customer places an order, the sales rep who gets
    the commission on the order must be in the collection of sales reps
    who represent the customer. </p>
  </blockquote>
  
  <p>The database is currently designed as below (note that the bold fields are the primary keys):</p>
  
  <blockquote>
    <p>Rep (<strong>Rep_Num</strong>, Last_Name, First_Name, Street, City, State, Zip, Commission, Rate) </p>
    
    <p>Customer (<strong>Customer_Num</strong>, Customer_Name, Street, City, State, Zip, Balance, Credit_Limit, Rep_Num) </p>
    
    <p>Orders (<strong>Order_Num</strong>, Order_Date, Customer_Num)</p>
    
    <p>Part(<strong>Part_Num</strong>, Description, On_Hand, Class, Warehouse, Price)</p>
    
    <p>Order_Line (<strong>Order_Num</strong>, <strong>Part_Num</strong>, Num_Ordered, Quoted_Price)</p>
  </blockquote>
  
  <p>My solution to the problem was to add a separate table for representation as follows:</p>
  
  <blockquote>
    <p>Rep (<strong>Rep_Num</strong>, Last_Name, First_Name, Street, City, State, Zip, Commission, Rate) </p>
    
    <p>Customer (<strong>Customer_Num</strong>, Customer_Name, Street, City, State, Zip, Balance, Credit_Limit) </p>
    
    <p>Represents(<strong>Represents_Id</strong>, Customer_Num, Rep_Num)</p>
    
    <p>Orders (<strong>Order_Num</strong>, Order_Date, Represents_Id)</p>
    
    <p>Part (<strong>Part_Num</strong>, Description, On_Hand, Class, Warehouse, Price)</p>
    
    <p>Order_Line (<strong>Order_Num</strong>, <strong>Part_Num</strong>, Num_Ordered, Quoted_Price)</p>
  </blockquote>
  
  <p>I am wondering if this is the most efficient way to handle the proposed problem, and if my solution has any obvious flaws?</p>