Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You did not mention anything about performance or use requirements, so I'm going to answer in a generic way and I'll update my answer if you need more specific information. For the DB tables, I suggest a common normalized approach along these lines.</p> <pre><code>tblProject ProjectID ProjectDescription etc. tblTask TaskID TaskDescription etc. tblEmployee EmployeeID Name etc. tblProjectTasks ProjectTasksID ProjectID TaskID tblTaskAssignments TaskAssignmentsID TaskID EmployeeID </code></pre> <p>Another valid approach would be to create a table defining a project and a different table to define a list of projects. The same would be true for the tasks and the employees. In a real-world application, it would be common for these entities to be well defined in more generic tables, just as you may design a class that contains other well defined objects. For example, you did not mention project resources other than an employee. Those resources could be represented in a schema that defines the type of resource, resource properties, etc. and then joins the resource to a project and/or task.</p> <p>You could also create a table representing Project Employees, but the data in it would be redundant since you could find the employees assigned to a project by joining the other tables. IMHO, this kind of duplication would only be warranted if the tables are huge and this particular type of query is used very frequently. But I'd still consider other approaches first.</p> <p>You also asked about the classes. It's hard to be too specific without a better understanding of your goals. In a typical OO design, the classes should represent the Project, Task, and Employee distinctly. But you'll need to tailor that to fit your specific needs. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload