The following is an Entity-Relationship Diagram of a possible implementation of the previously detailed project.
This assumes the following:
- Once a company adds a subprocessor, all other companies are able to add them to their own list of subprocessors.
- If any company updates a subprocessor entry, the update will be reflected on all other tables where said subprocessor is included. (Following the
"Single source of truth"that was required). - The only fields that were considered to be unique are each table's ID's.
- Subprocessors can have same names in this instance. If it were desired for all subprocessor names to be unique, further parameters (casing, whitespace consideration, special characters, etc) and string checking could be implemented.
Some standard processes with this data model would be :
-
A
companyis created. (Company A) for this example.- An entry is added to the
companiestable. - If the company was marked as a subprocessor when created, an entry to the
subprocessorstable is added, including all the corresponding field values (name,location,purpose). - The ID of said entry is set to the
subprocessor_idfield of the initialcompaniesentry.
- An entry is added to the
-
Company Aadds a new subprocessor to their list- An entry to the
subprocessorstable is added, containing all values. - An entry to the
companies_subprocessorstable is added, containing thecompany_idvalue and the newsubprocessor_idvalues.
- An entry to the
-
Field
locationinside thesubprocessorstable will use a defined enum, which could be defined as such:enum Location { canada = "Canada", mexico = "Mexico", usa = "USA", england = "England", // ... }
-
Similarly, field
purposeinside thesubprocessorstable will use a defined enum:enum Purpose { cdn = "CDN", hosting = "Hosting", emailDeliverability = "Email Deliverability", // ... }
