• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Replacement of comma-delimited lists

 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm currently designing a "project manager" webapp and I have a few questions regarding design (I'm using Hibernate and PostgreSQL.) I have two tables; one for projects and one for developers. In the project table, I have a column that specifies assigned developers. In the developer table, I have a column that specifies assigned projects. Both of these feilds contain comma-delimited lists and are formatted as text. Is there an alternative to this? Ideally, I want my accessor methods to be using either Lists or Collections.

Any help would be endlessly appreciated, Thank you for your time!
-D.P.

PS.
Cheers!
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ooops I guess this is the wrong place to put this post. Can a moderater please lock and move this for me?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I'd say that this is in the right place.

That's a whacky table structure. Rather than munging the multipe values together into a comma-separated list, the more usual approach would be to store the values individually in a related table, associating the list members with the "owning" record's primary key.

In this case it appear you want to create a separate table that assoicates developers with projects, and vice versa.
[ March 20, 2006: Message edited by: Bear Bibeault ]
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the advice. If I did it that way would I be able to grab the data in lists? In what way will the Hibernate stuff be set up? Do you know of any helpfull articles specifically? What should I google?

Thank you Bear, you're the best.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic