Results 1 to 4 of 4
  1. #1
    razmyasdfg is offline Member
    Join Date
    Jul 2008
    Location
    London (Kingsbury)
    Posts
    41
    Rep Power
    0

    Default Product Offer in Mysql

    Hi.

    I am Working on Java POS Project. I wanted to implement item/product offers in my database like

    example
    Coke (330ml) = £ 0.69

    2 coke (330ml) = £ 1.00

    how do I implement in Mysql ?

    Reg :-Razmy

  2. #2
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    Your question is too general to answer. What I can say is to put a unique ID for each product that will be added to your product table. This ID will hold the information/details of that product. I think, first thing that you should do is to list the details that will be needed to describe a certain product

    Some links that you might want to read:
    Lesson: JDBC Introduction (The Java™ Tutorials > JDBC(TM) Database Access)
    Lesson: JDBC Basics (The Java™ Tutorials > JDBC(TM) Database Access)
    3 Normal Forms Database Tutorial

  3. #3
    razmyasdfg is offline Member
    Join Date
    Jul 2008
    Location
    London (Kingsbury)
    Posts
    41
    Rep Power
    0

    Default

    Quote Originally Posted by mine0926 View Post
    Your question is too general to answer. What I can say is to put a unique ID for each product that will be added to your product table. This ID will hold the information/details of that product. I think, first thing that you should do is to list the details that will be needed to describe a certain product

    Some links that you might want to read:
    Lesson: JDBC Introduction (The Java™ Tutorials > JDBC(TM) Database Access)
    Lesson: JDBC Basics (The Java™ Tutorials > JDBC(TM) Database Access)
    3 Normal Forms Database Tutorial

    I have created the Item_Table in my database and the Primary_Key is the product Barcod. and i have been able to do all the stuff like retrieve data from database to Jtable. The Programe work like this
    i have placed a JTextFiled to get the barcode from barcode reader. when i scan a barcode it will check with my database weather the product exist if its it will add to JTable with Item Name and the price of it. (PRICE SHOULD NOT BE £ 1.38)

    what i wanted to do is if i scan one coke the price will be £ 0.69 and if i scan two coke the price should be £ 1.00 how do i do this?
    Last edited by razmyasdfg; 06-26-2011 at 01:36 AM.

  4. #4
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    The first thing I think of about your problem is to have another table which stores the number of item to be bought and the (discounted) price. But I am not sure if this is a good idea for your project. Second thing that I think of is to have different product ID for that, it is what I see in gorceries and supermarkets, the company(e.g. the Coke-a-Cola company) before they deliver the item they pack it (the 2 cokes) and put different barcode.

Similar Threads

  1. need scjp 1.6 voucher in offer
    By sathiyanannauniversity in forum Java Certification
    Replies: 10
    Last Post: 07-17-2010, 05:52 PM
  2. Amazing Offer to start Voip Buisness
    By taiger786 in forum Reviews / Advertising
    Replies: 0
    Last Post: 02-20-2010, 12:02 PM
  3. Amazing Offer to start Voip Buisness
    By taiger786 in forum Reviews / Advertising
    Replies: 0
    Last Post: 02-19-2010, 11:32 AM
  4. Spesial Offer 4 you hurryup!!!
    By taiger786 in forum Reviews / Advertising
    Replies: 0
    Last Post: 02-11-2010, 09:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •