Many columns (as FK) vs 3x more Columns (in the same table)

Bruno Sandivilli <[email protected]>
Newsgroups gmane.comp.php.database
Message-ID <CAEO3wRiW5S8-9XQDfh7j1ELN51ArE90H7uGg=Urw_V1iQxH8XA@mail.gmail.com>
Hi, i strugling to decide what is the best choice:

I have a 15 row x 3 columns Flash DataGrid, it means, for each row i have 3
values.
To represent this in my Database, I could:


   1. Create 2 Tables : A Values table - with 3 columns ; and a Bill table
   (with 15 foreign keys, each one pointing to one row in the Values table).
   2. Create one Table with 45 columns (15 fields * 3 values for each
   field).

I want to know, wich is the best choice?
To manage my query, now i have a SELECT with a thousand of leftJoins.

This is the best choice?

How could I run a query wich will give all results linked, like:
( column_1_val_1, column_1_val_2, column_1_val_2,
  column_2_val_1, column_1_val_2, column_1_val_3,
 etc...) ?

Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.