I am very new to databases and Web design, but I understand enough to know that designing a good database is crucial, so I would like to prepare for that conceptually. However, I was unable to find any answers on my level on the web/in tutorials.
I am working towards a developing a database (MariaDB, to be exact) that will be accessed by my website (written in Django). I want the website to serve as an API for several people to work on the database. Naturally, I want to set some use- or group-specific privileges.
What are the possible ways of doing that, and what are their upsides and downsides?
I can only think of two generals approaches:
- Connecting the website to the database as root, and letting the website API limit user capacity to edit certain tables.
- Using some sort of server-side user system directly in a web API.
This is important to me both in the context of limited access to certain tables within a database and syncing multiple people editing the same table. Is there an approach generally considered as a good practice?