I am trying to do a one to many relationship practice. Where by one project can have many personnel working under it.
I made a custom entity attribute ID "Project Name" of type Text.
How do I go about adding additional employee under the same Project Name by increasing the number of rows of project personnel but not adding rows of Description and Project_Name.
This is the updated output I am looking for in the DataBaseOne
Thank you.
Hello Isaiah Chan,
You can achieve your possible outcome with below entity diagram also,
and here you can learn basic things about entity relationship
Please go through below document.
https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Data_Modeling/Entity_Relationships
Hope it helps you.
Regards,
Ajit Kurane.
Add a DataBaseOne id (in your case DataBaseOne.ProjectName ) to your Project_Personnel entityAs Many Project_Personnel can have the same DataBaseOne record.
In your database model, you can assign multiple DataBaseOne records to the same employee rather than multiple employees to the same DataBaseOne For readability I would not change the name of the id of the table. Just leave it as id and if you need a name for your projects just add an attribute name.
Hi Isaiah,
you are saying you are practicing 1-to-many relationships, but i suspect what you are really looking at here is a many-to-many.
So for that, you would need an extra junction entity holding all project-employee combinations.
so you'd have
Entity DatabaseOne
Id | Name
108 | Project name 1
44 | Project name 2
Entity Employee
11 | Tom
12 | John
13 | Dick
14 | Harry
Entity DatabaseOneEmployee
DabaseOneId | EmployeeId
108 | 11
108 | 13
108 | 14
44 | 12
44 | 13
above means you have Tom, Dick and Harry working on project 1, and John and Dick on project 2
Thank you for the response guys, I tried all the different solutions that were provided and I am able to achieve the desired results.