Unique constraint on more than 10 columns

Posted by tk on Stack Overflow See other posts from Stack Overflow or by tk
Published on 2010-06-09T09:53:41Z Indexed on 2010/06/09 10:02 UTC
Read the original article Hit count: 210

I have a time-series simulation model which has more than 10 input variables. The number of distinct simulation instances would be more than 1 million, and each simulation instance generates a few output rows every day.

To save the simulation result in a relational database, i designed tables like this.

Table SimulationModel {

simul_id : integer (primary key),

input0 : string or numeric,

input1 : string or numeric,

...}

Table SimulationOutput {

dt : DateTime (primary key),

simul_id : integer (primary key),

output0 : numeric,

...}

My question is, is it fine to put an unique constraint on all of the input columns of SimulationModel table?

If it is not a good idea, then what kind of other options do i have to make sure each model is unique?

© Stack Overflow or respective owner

Related posts about database

Related posts about database-design