I have to use SQL Server with Flutter and I don't have another database option because my client has it. I was looking for packages but I only found a package that doesn't run on mobile. Is there any option to do that without web services or api?
The first thing that you need to consider is that there is no immediate and extremely effective solution and you have to decide what frameworks and tools to be used. And as mentioned in the comment that the market for this scenario is very small. But there are some ways that you can handle this.
Remote storage sample solution:
Here is a basic example of how you should implement this. It was also cited in this SO post:
Client application
The client application can be any application the user typically uses. Some examples:
- Mobile app (written in native, Dart, Xamarin, ...)
- Desktop app (Electron, WPF, ...)
- Website app (Angular, React, Vue, ...)
API
The API is there to retrieve data, and change data. But It will also handle authentication, authorization, logging, doing business logic
Database
Your API will then execute queries, inserts, updates, deletes, execute stored procedures on the Database of your choice. In your example SQL Server.
There are many possibilities on how to set this up, depending on your skills, knowledge of frameworks, how you want to deploy things.
How you want to deploy this will limit your choices as well. For your API:
- Serverless API (Via Azure Functions, AWS Lambda)
- Cloud Website (Azure Web Apps)
- Website hosted on premise
- Docker container
In real life scenarios this often gets more complex with Firewalls, Application Gateways, Virtual networks, clusters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With