r/learnprogramming • u/GigioBigio777 • 20h ago
My first web app
Hello recently I finished building my first ever webapp. I delecoped a front end and a backend with a database. As of now I only tested it locally on my computer. I would like to buy a hosting service on azure for example which has a student 100$ credit. When I try to get a resource I get stuck on the database choice. I built the backend in c# and Sql server but at the moment of choosing the correct database there is not an option for sql server but there is azure sal, postgre and MySQL. What can I do?
1
u/kindredsocial 16h ago
SQL server and postgres will have some differences in the supported SQL syntax but for basic queries, they work the same.
Try downloading postgresql locally on your computer. If you're using an ORM in your app, most ORMs come with different database drivers that can connect to different databases without you changing your code. See if you can swap your app locally to connect to the local postgres. There's a good chance, it will just work without any other code changes but test it just in case.
Once you've tested with postgres locally, you can use the hosted postgres on azure.
1
u/LordCupcakeIX 16h ago
In the Azure Portal when creating the resource, be sure to check "Azure services only." It'll return 30ish options if you search for 'sql', two of which are Azure SQL and SQL Database.
Azure SQL
is a fully managed instance by Azure and would be easier to work with.
SQL database
will have you also create a dedicated SQL server to host the database on. If you want more control over the actual server you can use that one.
Both of these are Azure SQL Server (the dbms software) under the hood.
There's some slight compatibility differences between Azure SQL Server and SQL Server but it probably won't affect you at all in a small scale app. They both use the same TSQL language.
1
u/Illustrious-Deal9505 12h ago
There is a lot of options at your disposal for finding a database - I also like to use SQL mostly. For deployment on azure specificaly can get wildly complicated due to all the options and random crap at first. C# itself is very much a microsoft ecosystem based language that would love you to use the .net architecture. Is this how you developed the app?
1
u/grantrules 20h ago
Pretty sure AzureSQL is the cloud version of SQL Server