Just a thought:create table clients( client_id int not null identity(1,1) primary key nonclustered, user_name nvarchar(256) not null check (len(user_name) > 0) unique clustered, password varbinary(256) not null)create table products( product_id int not null identity(1,1) primary key nonclustered, client_id int null references clients(client_id), name nvarcahr(256) not null check (len(name) > 0), description nvarchar(1024) null, unit_price money not null default 0.0000, enabled bit not null default (0), date_created datetime not null default current_timestamp)create table client_products( client_product_id int not null identity(1,1) primary key nonclustered, client_id int not null references clients(client_id), product_id int null, name nvarchar(256) not null check (len(name) > 0), description nvarchar(1024) null, unit_price money not null default 0.0000)create trigger client_products_to_products on client_products for insert begin insert into products (client_id, name, description, unit_price, enabled) select client_id, name, description, unit_price, 0 from inserted end
... Added the trigger... haven't written a trigger in a while and I'm not sure if my syntax is 100% correct but the idea is there. That's all you should need (plus/minus your own columns of course). I assume when you say:quote:
1) Clients can add products to their table from the master table, but they don’t have to — they can add products manually if they wish.