sql - Conditional Relationship? -
i've been asking around bit on subject matter, started build database tables company's website , ran bit of hitch.
in database, have table, dbo.aspnetusers, in table, have 2 columns employee_id , company_id. company_id tied table companies.companies field matching same name. column employee_id foreign key 2 different tables: companies.employees , employee.employees.
inside of employee.employees table, employees company stored. inside of companies.emloyees, employees other companies access our system stored, company's employees aren't stored here.
because of this, appears can't impose foreign key constraint on aspnetusers table either table. true? there way bypass this?
Comments
Post a Comment