C
C#11mo ago
Xray

❔ searching for a database easy to use

googd morning, First of all I am actually making my first mobile application and I need to stock my datas (like the accounts and all) on a server but I don't know where to find or what to use so I count on you guys
10 Replies
Xray
Xray11mo ago
P.S: Like I said it's my first project so I don't have any experience
cap5lut
cap5lut11mo ago
this is usually done by wiring together a front end and a back end. the front end is basically just what the user interacts with, this then delegates what to do to the back end and displays the response this can be a small CLI tool, a website, etc. in ur case its the moble app. the backend is the actual business logic that processes certain actions and gives a response. simplified example: if ur app needs registration, the front end would have 2 text fields for username and password and a button to submit the registration data. the backend then would process it by either creating the user and storing it in the database following by giving the response it succeeded, or gives an error why not, which the front end then displays in some way. so because u want a server, this backend is running there. in these cases, its usually done using HTTP requests to an REST API in the dotnet ecosystem is aspnet core the defacto standard for http related servers. in aspnet core this is called web api this is a nice little tutorial on how web api generally works, this has no database integration yet, but its one of the first stepping stones https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-7.0&tabs=visual-studio
Angius
Angius11mo ago
Don't connect directly to an online database Always have something in front The easiest option would probably be to use something existing, like what Supabase or Firebase offer
cap5lut
cap5lut11mo ago
as to database integration, u have to decide first what kind of database fits your needs. relational databases: if u have entities that have uniform structures, which you could easily write a table for to display all data of this one entity, these are the way to go. these usually use some kind of SQL dialect MSSQL, MariaDB, PostgreSQL to name some popular database servers which are fit for such tasks (just to name it there is also SQLite, this is an in-process database - meaning there is no other process - which is quite nice if u do not work concurrent, but u do) if u use plainly them, u will need to learn the respective SQL dialect and do the mapping of the data u request to ur objects urself. but there are ORM (object relation mapping) systems out there, which will do this for u. there is Entity Framework Core, which is one of the widest known, which abstracts the whole SQL stuff away, so u can just write c# code and it will translate everything to SQL. it can also take care of creating the actual database structure and updating as ur entities change it has also a great integration with aspnet core https://learn.microsoft.com/en-us/aspnet/core/data/ef-mvc/intro?view=aspnetcore-7.0 there is also Dapper fairly widely known but i never touched it yet. document based databases: these are used if ur entities do differ a lot in structure, just like documents do, i think the defacto standard here is mongodb, and there is also a tutorial on how to use it with aspnet core's web api: https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mongo-app?view=aspnetcore-7.0&tabs=visual-studio so the user creation process (simplified) would be mobile app ---http request ---> rest api (business logic) ----> database -----> business logic ---http response---> mobile app
Becquerel
Becquerel11mo ago
simple answer: use sqlite
Angius
Angius11mo ago
That's only for local data
I need to stock my datas (like the accounts and all) on a server
Joreyk ( IXLLEGACYIXL )
use litedb, alot easier than any other sql solutions
Xray
Xray11mo ago
thank you for your Super clean answer that really helped me thanks everyone I'm really grateful
cap5lut
cap5lut11mo ago
glad i could help o7
Accord
Accord11mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts