For example, Software engineer, Team lead, Project Manager, Project lead, QC engineer, QC Lead, QC manager etc. An employee can belong to one designation at a time.
It means at a time an employee can either be Software engineer or team lead or project manager but not software engineer as well team lead at a same time.
Also the projects can work on different technologies like .Net, SQL Server, Oracle, HTML5 etc. Every project has a start data and end date. A project can work can include many technologies like .net, SQL Server , Java script, HTML5 etc. Most of the time every project work include a front end server technology like JAVA. Asp.net, uses Java script, HTML, CSS as client side technologies and SQL Server, oracle as back end database server. So In this ways a project work can include many technologies as in above example, suppose a project can use Asp.net as server end front end technology, java script, HTML, CSS, AJAX as client side technology and SQL server as back end database server.
What should be the design the database schema (tables, their foreign keys, primary keys etc).
32 thoughts on “Question of the Week – 2/1/2014 – Question 1”
I think this question raises more questions than answers. I could interpret "an employee can belong to one role at a time" a couple different ways, at a time across the company, or at a time on a given project. There is a duplicated line about projects with many technologies, and it would seem this is supposed to be employees and proejcts, as it would be helpful to know what the employees are knowledgeable in.
Hi Thanks for your valuable comment. I have update the question statement to further explain the Database design requirement.
Following will be database schema:
Employees(pk_employee_id, employee_name, fk_designation_id)
Project(pk_project_id, project_name, start_date, end_date)
Allocation(serial_number, fk_employee_id, fk_project_id)
EmployeesDetails(fk_employee_id, fk_designation_id, start_date, end_date)
Good Answer. All the master table and the child tables are very well designed. One more child table can make the solution even more better employee_technology table which store the technology known by each employee
i.e Employee_technology( emptechid , employeeid, technologyid)
Thanks for your valuable comments…