in reply to Indexing Sublists
From a database-design point of view I think you should have 3 tables:Anonymous Monk|89|1:2:3
The table USER_HOBBIES describes the relationship between USERS and HOBBIES which is a many to many relationship.USERS(USER_ID, NAME) HOBBIES(HOBBY_ID, DESCRIPTION) USER_HOBBIES(USER_ID, HOBBY_ID)
With this approach you don't need the hobbies array, and you don't need to perform any split from your perl script: you move the logic into the db and let the db engine do the work.SELECT HOBBIES.DESCRIPTION FROM USER_HOBBIES, HOBBIES WHERE USER_HOBBIES.USER_ID = 23 AND USER_HOBBIES.HOBBY_ID = HOBBIES.HOBBY_ID
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Indexing Sublists
by marcos (Scribe) on May 15, 2000 at 17:11 UTC |