Zithulele-Coding / eMbewu

MIT License
0 stars 1 forks source link

Database #3

Open johanvaneck opened 1 month ago

johanvaneck commented 1 month ago

We need to persist our data in a database.

See the reflex docs for setting it up here

MK-Mike commented 1 month ago

so my read of the docs, and the accompanying docs from sqlalchamy (link) is that the SQlite database provided used a file based db.

You can also access the db files my specifying the path in the config file. e.g. db_url="sqlite:///reflex.db"

I think this approach could work for some early prototyping but would rely on being able to pull and push the file to get the latest version. I imaging this could lead to some db conflicts if not managed well.

MK-Mike commented 1 month ago

its does seem like the reflex orm would also work with a postgress database but would need some set up in terms of writing a controller and installing the corrext python packages etc

here are some docs from neon that show how to do it

neon postgress - reflex

and an repo that uses it repo

Postgress may be better option in terms of scalability and remote hosting?

mrnvm8 commented 3 weeks ago

I think it would be ideal to have a dummy database created so that all of us can use, if someone modifies his database they can share it and document why they added a table/field