0

Objective: Have multiple tables for entities. For example I am creating an HR website where people can have accounts and create personnel entries.

Current model: Account Table (Name, contact, etc) Employee Table (Name, contact, dept, etc).

What I want to do is have separate tables for the entity type "employee" in other words each account (client) would have their own employee table.

So currently data looks like

Account
acc id   Name
------------------
1        Chevron
2        Texaco

Employee
emp id  acc id  Name 
------------------------
1       1       John
2       1       Stacy
3       2       Cleo
4       2       Johan

What I want is

Employee table for Chevron
emp id  Name
-----------------------------
1       John
2       Stacy

Employee table for Texaco
emp id   Name
----------------------------
1        Cleo
2        Johan

Is this possible?

2
  • Are you aware of a Database that allows multiple tables with the same name in the same schema? I sure don't. So how would you plan on making this work? Commented May 29, 2013 at 1:37
  • Haven't planned anything out, just curious as I mentioned below. Thanks for reviewing. Commented May 29, 2013 at 3:54

1 Answer 1

1

No, this is not supported by Entity Framework. (And I don't think it should be, since this is bad database design)

Sign up to request clarification or add additional context in comments.

1 Comment

I agree it's bad design. I was more curious than anything. Thanks for your post!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.