Saturday, March 5, 2011

Take Home Portion of the Exam

Please respond to this post with any questions regarding the exam.

6 comments:

  1. I have 2 questions...first, whether you want the orderid from the payment table to be the same as the id from the order table? Second, if we are required to make 2 tables (1 that includes the orderid and paymenttype and a another that includes the total), or are we allowed to combine them if we would like?

    ReplyDelete
  2. The orderid in payment should match the id of the order. As for whether or not to make two tables, it is up to you but you should make an educated design decision. If you do make two tables, submit CREATE TABLE statements from both.

    ReplyDelete
  3. I was thinking about this a little further, and the only problem with the orderid being the same as the id from the order table is that there is more than 1 order id per order #. So referencing the id from the order table would only be a reference to a single item from a particular order. Instead I feel like the orderid from the payment table should be referencing the order# from the order table. Does this make sense/is this correct?

    ReplyDelete
  4. Is the stored procedure suppose to update the prices in the database or is the store procedure only suppose to modify the current prices and not change the prices?

    ReplyDelete
  5. Nick - some used orderid in the way you are describing, others ordernum. Either way is ok, what is necessary is to associate a payment with a single order, which may consist of multiple items.

    Adam - the stored procedure should actually update the prices in the database.

    ReplyDelete
  6. Do we have to implement all 3 question into HWK 4?

    ReplyDelete