Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help on creating tables for a simple scenario

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the scenario a company has a no of employees however some of those employees could be working for multiple companies having one to many relationships.
How would i describe them so far i only have two tables Employees_Info (containing employees details) and company_info(containg company deatails) how can i affiliate an employee with a company considering the fact that an employee could be working for multiple companies.

Employees_Info table:
ID|Name|Salary|Hours|designation

company_info table:
ID|Company_name|Employees_No

Now what changes should i make so that i can affiliate an Employee with multiple companies any ideas suggestions??
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what you have is a link table, with an employee id and company id.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic