> Clients can be referred to by one or more names and so there's
> another table:
>
> CREATE TABLE client_names (
> id integer,
> name text
> );
>
> Names aren't unique. Two clients can have the same name.
But the combination of id and name are unique: hence try this:
CREATE TABLE c
On 20081118 15:25:32, MikeW wrote:
> <[EMAIL PROTECTED]> writes:
>
> Can't make the 'name' column
> > 'unique' as two clients may have the same name. Can't make
> > the 'id' column 'unique' as a client may have more than one
> > name...
>
> However you can specify that the name/id pair is uniqu
<[EMAIL PROTECTED]> writes:
Can't make the 'name' column
> 'unique' as two clients may have the same name. Can't make
> the 'id' column 'unique' as a client may have more than one
> name...
However you can specify that the name/id pair is unique ...
PRIMARY KEY (name, id)
Regards,
MikeW
_
I'm working with an application that keeps a list of clients:
CREATE TABLE clients (
id integer primary key,
fingerprint varchar (40) unique,
...
);
Clients are uniquely identified by fingerprint but are referenced
by an integer id in most places in the database.
Clients can be r
4 matches
Mail list logo