Resolved need some advice on SQL database system

sock1992

Well-known member
Joined
May 20, 2020
Messages
107
Programming Experience
Beginner
I'm currently a student and ill be working on a project where I will have to create an online booking system.

I've looked up tutorials online and I'm just confused about a few things (I'm a beginner with SQL, never used it before and currently learning).

Would it be best to use MySQL? and import the databases into visual studio from there? there's something else i came across called dapper?

I apologise if I'm asking really stupid questions i just need some clarification on what would be the best process of creating relational databases and then using them in visual studio. Any feedback would be greatly appreciated.
 
Would it be best to use MySQL?
This would be my preference. I'd use MySQL personally.
and import the databases into visual studio from there?
You can set up a remote user to allow you to login to the MySQL server from your work station, while developing the application. No need to download, import or export any databases.

Just be sure to give the booking system localhost credentials when you're putting the app into production state. Only use the remote login while developing it.
there's something else i came across called dapper?
Yes, its like Entity Framework. It's an ORM (object relational mapper). I'd advise against using a mapper personally. But if you want to use one, or if you must, then dapper would be my choice above all the other alternatives out there. I prefer to write my own MySQL wrappers instead of using ORM's.
 
For setting up phpmyadmin, you can follow the steps here : Manage Remote MySQL Databases via phpMyAdmin on Ubuntu 17.04 | 17.10

But I would recommend logging into phpmyadmin with the root password and configure a new user and grant them only the permissions the user of your application will require to perform certain queries, and from within there, you can enable remote access, and this way is easier than the steps outlined in that link above this line.
 
There are various factors to consider when selecting a database. MySQL is widely used and is free, so it's certainly a good option. For a real application, many web hosts provide MySQL as an option specifically because they don't have to pay license fees. If this is just a school project though, installing MySQL may be an unnecessary complication. The LocalDB version of SQL Server is installed with Visual Studio so it's already available on your development machine. Any code you against that will just work with any other edition of SQL Server (Express, Standard, Enterprise) with just a change to the connection string.

Generally speaking, the code you write will be the same no matter the database. If you use ADO.NET directly, you would use Connector/Net for MySQL, which is a dedicated third-party provider, or you would use the inbuilt SqlClient provider for SQL Server. In that case, you would use different sets of classes but they all have a one-to-one correspondence, e.g. MySqlConnection or SqlConnection, MySqlDataAdapter or SqlDataAdapter, etc. The connection strings would be different and there may be some minor differences in the SQL code but the structure of the code would be exactly the same either way. If you use an ORM then the code may be 100% identical regardless of the database, because they abstract away the actual data layer.
 
Take note that the OP stated : online booking system - so I assume this will be stored on a computer server provided by the school. Which is why I suggested the recommendation to use MySQL, and for the reasons you also mentioned above.

If the OP has the choice to use a local DB, then MySQL would be more a hassle to set-up in comparison to using a local DB.
 
Take note that the OP stated : online booking system - so I assume this will be stored on a computer server provided by the school..
I could be wrong but, when I hear someone say that they are a student and they are creating an online application, they just mean that they are creating a web app for a class project. It's generally not an application that will actually be used in the wild. That said, in such cases, they would normally be told what database system to use because the marker needs to be able to run it on their own system. Mind you, if this is a real application for the school or anyone else, the OP probably ought to find out or work out where the app will be hosted and what database(s) are already or possibly could be supported in that environment. If the school already has SQL Server set up then they won't be impressed if you tell them they need to install MySQL and vice versa.
 
Hi guys thank you so much for your replies I really appreciate it. I will be making this application on my own PC from home and then submitting it online. So this would need to run on my teachers computer as well as mine.

For that reason I'm guessing it would be more appropriate for me to us the LocalDB version of SQL sever that comes with visual studio?
 
For that reason I'm guessing it would be more appropriate for me to us the LocalDB version of SQL sever that comes with visual studio?
Probably, but you ought to ask your teacher to make sure. LocalDB is the easiest option for everyone as it doesn't need anything else installed beyond what's already there with VS. If your teacher has MySQL and is a dedicated fan though, they may want everyone to use MySQL. Mind you, if you're doing a programming course then expecting you to install MySQL from scratch seems a bit outside of the scope of that course. Best to be sure before going down and specific road though. It's also possible that they would want you to use SQLite or even Access, neither of which you would generally use with a real online system but both of which are easy to use because they don't require any server at all. Access would require you to have the Access application to create the database to begin with but SQLite can all be done in code.
 
What are the database requirements for your project? I assume you were told this already?

If your teacher will need to run the application locally, then you would be best using a local DB - SQLite Home Page.
 
Back
Top Bottom