Unique constraint on more than 10 columns
- by tk
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?