DB Modeling . Help!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, some week's ago i was having a querying problem, it was i nightmare.
Now i'm i have the same modeling problem. But his time i've stopped to
think before.

Right Here we go:

It's 'simple'. I have a simple datagrid (5 columns x 50 rows). Each row
have a label and the 5 columns values.How can i store this values in an SQL
DB?

I mean (the standart html output):




                                                a1        |  a2       |  a3
       |  a4b    |     a5

Consumption Edge                   [3,4]     [32,34]   [113,40]    [32,4]
     [4,21]

Consumption Out of Edge          [3,4]     [32,34]   [113,40]    [32,4]
   [4,21]

Demand Edge                          [3,4]     [32,34]   [113,40]    [32,4]
       [4,21]

Demand Out of Edge                [3,4]     [32,34]   [113,40]    [32,4]
     [4,21]

Total Billed                               [3,4]     [32,34]   [113,40]
 [32,4]        [4,21]

.
.
.
.
.
.


The actual modeling is a table with columns:
*cosumption_edge_a1*,*cosumption_edge_a2 *... etc;
 *cosumption_out_edge_a1*,*cosumption_out_edge_a2*. etc ...

But i'm thinking in a diferent model: like this: a table with the values (
5 columns(a1,a2,a3,a4,a5) ), and another with the values. so the first
table will have 5 foreign keys pointing to the values in the other talbe?

What do you think?

Thanks!

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux