Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature: Refactor Database management #5195

Open
2 tasks done
djiworks opened this issue Mar 6, 2023 · 2 comments
Open
2 tasks done

🚀 Feature: Refactor Database management #5195

djiworks opened this issue Mar 6, 2023 · 2 comments
Labels
product / databases Fixes and upgrades for the Appwrite Database.

Comments

@djiworks
Copy link

djiworks commented Mar 6, 2023

🔖 Feature description

Create a new database per project instead of using a unique database.

🎤 Pitch

Hi guys, first of all, congratulation for all the works ! This is an awesome project !!!

I want to know why you choose a global implementation of database. Maybe I'm wrong but I saw you database architecture like this :

  • You have a unique appwrite database
  • _console.teams table that refers to all teams created from dashboard
  • _<id_team>_databases table that refers to all databases for the team <id_team>
  • _<id_team>_database_<id_db> table that refers to all collections for the database <id_db> of the team <id_team>
  • _<id_team>_database_< id_db>_collection_<id_collection> table that refers to the collection <id_collection> for the database <id_db> of the team <id_team>

It wasn't possible to create a new purely database dedicated per projet ? And see in the mariadb instance a database for each app (or project) keeping the table name used by the developer.

Possible use cases :

  • I want to make some custom sql queries inside my table. Even if it doesn't seem possible using the SDK, I still can create a function and connect directly to my database.table. Here, we need to know the the right table name by finding relation between multiple table.
  • I need to maintain my database to check data consistency or simply import massively data using a dump file.
  • In near future (I hope), I want to connect my appwrite instance to an existing database that is already structured.

Thanks,

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@stnguyen90 stnguyen90 added the product / databases Fixes and upgrades for the Appwrite Database. label Mar 7, 2023
@eldadfux
Copy link
Member

eldadfux commented Mar 8, 2023

We actually did have a dedicated schema for each project in earlier days of the project, but that seemed to cause some issues with the Docker MariaDB image. Some developers reported issues with the DB initialization and this forced us to use root permissions which is not a great practice.

We can consider doing something like this in the future and maybe make it optional, we're already planning to work on allowing more integrations around managed databases and advanced projects segmentation features that could help achieve this goal as well.

@TorstenDittmann
Copy link
Contributor

If I remember correctly, one of the bigger issues also was that the root user was necessary to create new MariaDB Databases - which we wanted to avoid at that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product / databases Fixes and upgrades for the Appwrite Database.
Projects
None yet
Development

No branches or pull requests

4 participants