I'm trying to determine if using '-1' in an
Identity column has any drawbacks, or if there is a better way to do what I want.
In my database I have
User table and a
Group table. All users must belong to only one group. Table definitions look something like this.
CREATE TABLE User ( UserId int Identity(1,1) not null primary key, GroupId int not null -- FK to group /* More columns */ ) CREATE TABLE Group ( GroupId int Identity(1,1) not null primary key, /* More Columns */ )
When the user logs into the application they are able to see info about the group they belong to. Now we want to add a special group where the users are able to view (and not edit) the data for all of the other groups. My team has already decided that users should belong to a special group to receive this functionality. I'm wondering if it is a good idea to denote this group as special by setting its GroupId to 1.