Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: OT - SQL choosing a schema for index tables

by parthodas (Acolyte)
on Aug 28, 2015 at 07:16 UTC ( [id://1140291]=note: print w/replies, xml ) Need Help??


in reply to OT - SQL choosing a schema for index tables

How many fields would be there for multiple values. IF there is only one such column, then you can think of creating a different table and use Foreign Key. If the no of columns are higher, then the situation will become too complex to get a data from different tables.
Also, you can insert multiple values in a column. Though it is not advisable. So it depends, depending on your situation & requirement how you plan to retrieve/fetch data.

Replies are listed 'Best First'.
Re^2: OT - SQL choosing a schema for index tables
by bangor (Monk) on Aug 28, 2015 at 13:23 UTC
    There are 10 fields that can have multiple values. I did look into storing these in the main table but everywhere I saw "don't do that". You can see how I am currently fetching data in my reply to erix below.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1140291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-03-28 21:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found