Re: Database related SQL question
Posted in 1993
John Baker writes: |> In X-Informix-List-Id <news.2884> Rakesh Goyal <U12066@uicvm.uic.edu> asks: |> |> > We are doing a research study, in one of my study questionnaire, I have |> > 219 different questions. My question is: Is it better to make one table |> > containing all of 219 columns (fields), or I should break up the columns |> > in smaller tables? Is there a limit on how many columns I can have in 1 |> > table. |> |> Since your Informix table is converted into a C structure, there is a limit |> to the number of columns you can have in a single table. It depends on the |> C compiler on your machine. Check your documentation for the limit to the |> number of members in a structure. Limits on c structures have nothing to do with limits to the number of columns in an Informix database. We DO NOT use C structures. A "record" is a fixed number of bytes. We then apply offsets to break that record into individual columns. At no point is this ever turned into a C structure (unless, of course, you are using a structure as a host variable, and fetch into that structure - but Informix is not doing that, the user is). For more details on this concept, check out a CISAM manual. |> The C compiler on our Unisys 5000/80 has a limit of 146 members in a |> structure. Therefore, if I have more than 145 columns that I would like |> to fit into one Informix table, then I *must* make two or more tables of |> 145 columns max and use the 146th column as the key to link them together. Nope. You can put as many columns in the table as you like. Dave