In article <00f801c54a68$71689260$2801a8c0@localdomain>,
"Jigal van Hemert" <jigal@stripped> writes:
> From: "Martijn Tonies"
>> Ehm... it might be me - but what sense does it make to have a NULL
>> in a PK?
>> If you "need" this, then your primary key probably isn't a primary key.
>> Care to explain why and how you're designing your database?
> The table contains an variable number of integer parameters for accounts:
> id INT(11) - accountID
> name VARCHAR(32) - parameter name
> value INT(11) - parameter value
> Other tables contain string, datetime, etc. parameters.
> Since most searches are made for a value (or range) of one or more
> parameters, a usable primary key is:
That's a horrible denormalization. If one named parameter can hold
only one INT value for one account id, then (id, name) could be a
primary key; otherwise, you'd need a surrogate primary key.