Need Help Storing Data in MySQL


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Need Help Storing Data in MySQL

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Posts
    5

    Need Help Storing Data in MySQL

    Hello, I am currently developing a Java Application with an SQL backbone for my senior project in college. I have this application that has 5 different JLists that pulls its values from the database. When I select values from the 5 different lists, my application adds them to another list. I want to add these selected values to a table in the database, but the problem I am running into is that I don't know the best way to do this, because in some cases there could be few selections, and in other cases there could be many selections. Does anyone have any ideas how to go about storing this data.

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Presumably the selected items are associated with a row that includes a unique key? If so, I would use a table containing that key in one column, and a selected item in another column. If user select four items from your JLists, there would be four rows with that user's ID in the selected items table. Does that make sense?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center