#ERD database

12 messages · Page 1 of 1 (latest)

vivid shell
#

I have an school project where i need to create an ERD using a one to one relation. But i dont realy understand what i need too do, if there is anyone that has the time to help me please respond. Greetings Stijn. Here is my task ➡️ All common data for the user is recorded in the users table. It was decided to record the specific data for each role in a separate table. Each user can only have one of these roles.

An ID, first name, prefixes, last name, gender, email, username and password are recorded for each user, as well as the street, house number, zip code, city, country, telephone number and mobile number. For the administrator, it is still recorded when the person is employed. The manager's department and the number of people in that department are kept separately for the manager. For the regular it is recorded as of when (date) the regular user has become.

Explanation functionality 2:
All addresses are recorded in one table. This is one table with all addresses used in the organization. The addresses of the users themselves are also stored in this table (so not in the users table). Only one address of each user is recorded and each address can only belong to one user. If an address does not belong to a user, then it concerns an address of someone outside the organization (not a user).

For an address, a description, street, house number, zip code, city, country, telephone number, mobile number, note and an addition date are recorded.

Explanation functionality 3 and 4:
Both overview pages must have a search and sort functionality. Users can search for addresses based on description, phone number or other relevant information. In addition, they can sort their addresses by description or date added. On the overview page with users, all data of a user is shown per user, including the specific data. On the overview page with addresses, an administrator and manager can see all addresses, but a regular can only see the addresses without those of the users.

thorny scrollBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)

proud zodiac
#

So you have to create to "tables" (collections as it is named within Directus) one for "user" one for "role" and the user-table has a field e.g. "user_role" that saves the primary key of an element of the "role" table. having this you can extend the database model to fit all the other needs, but this would be a good starting point

vivid shell
#

i have this at the moment

#

but its prob wrong

#

its in dutch btw

#

and this is my database

proud zodiac
#

a bit hard for me to understand, but it looks not so far off from my pov

vivid shell
#

okay thanks

proud zodiac
#

there's also a Dutch Channel --> #archived-dutch , as it not related to Directus directly maybe can give you some help in your native language for a better understanding 🙂