Hello, Just started designing a database which I have not done before. And am wondering the best way to handle group membership in the database.
Say I have two tables.
CREATE TABLE [dbo].[Computers] (
[ComputerID] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
);
CREATE TABLE [dbo].[ComputerGroups] (
[ComputerGroupID] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
);
Am I better off adding a [MemberOfGroup]
field to the Computers table, adding a [Member]
field to the ComputerGroups table or creating a 3rd junction table and adding the [ComputerID] [ComputerGroupID] FK's.
I can surly get this working but which which is the best way to accomplish this and why?