MySQL

Started by
16 comments, last by BeanDog 16 years, 5 months ago
I'm reaching out for help with MySQL. I'm just going to come right out and say, I'm a noob when it comes to databases in general and MySQL more specifically. I'm trying to learn though, my goal at the moment is to be able to create a MySQL database to be used in a MUD that i am making. I am writing the MUD in C# and at the moment i am having a lot of trouble with MySQL basics. If anyone has any pearls of wisdom on how i can start on my path towards this goal i'd appreciate it. I've been surfing the web and most things are either assuming i know basic consepts that i don't yet or just don't seem to answer my question. Thanks
Advertisement
w3c school is about as basic as it gets.
I appreciate that website it has a lot of great information, here is my follow up question though. Once i know how to create, delete, and manipulate my databases using the console commands how do i begin using C# to read and manipulate my databases?
there is a .net connector so that you can access it from C#. just look at the mysql website for info and the download.
A good place where I once started on is Tizag's MySQL Tutorial. It will get you started on the basic functions like updating and inserting data. It also goes more advanced into joins (which I still have trouble getting myself), subqueries and grouping. The tutorials use PHP along with it, but for you all that matters is the SQL commands.

Also learn about things such as indexing and database normalization. They will help you create effective data structures in relational DB systems like MySQL.
Electronic Meteor - My experiences with XNA and game development
Why have you opted for MySQL, btw? If you're using Visual C# you might find it easier to use SQL Server Express.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

To be honest i opted for MySQL because i knew very little about the different versions of SQL and MySQL is what i heard of. What are the benefits of SQL Server Express and how is it different?
Quote:Original post by dhammer
To be honest i opted for MySQL because i knew very little about the different versions of SQL and MySQL is what i heard of. What are the benefits of SQL Server Express and how is it different?


MySQL is free. MS SQL Server is not.

MS SQL server is basically a proprietary storage engine. You are only limited to the Sybase-derived engine. Where as MySQL is an open-storage engine giving you multiple choices such as MyISAM, BerkleyDB and InnoDb and a few others.

The SQL Syntax is essentially the same with just a few differences.

As far as application development, you probably don't want to connect to any database directly. Use SOAP or some form of secure messaging to communicate over a network.

MS SQL does have the advantage for developing in the .NET environment because it does have a built in OLE container/connection wizard to connect to your database.

mySQL IMHO has worked great for all of the small projects i've developed.
MS SQL Server Express is pretty darn near free, if not actually free. Its advantages include built-in integration with Visual Studio (if you're using that toolchain) and a very full-functionality SQL query engine.

For C# projects using under a couple hundred megs of data, I usually use SQLite through the absolutely fantastic System.Data.SQLite library, which gives SQLite the exact same integration advantages that SQL Server Express has. The advantage of SQLite is that there's no server to administer--your database is simply held in a single file or in memory. This makes administrative tasks like backups and moving the database to a new server absolutely trivial. SQLite is, in its current incarnation, extremely fast for small (less than 1GB) data sets. However, it does not perform well with multiple connections to the database--but your typical MUD will be running only one instance of the app, so that won't be a problem.
I would think it would be just as beneficial to find a wrapper around something lightwheight if you are using a database for game info storage.

A while ago, when I was working with wxWidgets, I used SQLite for storage. It was fast, and quite easy with the wrapper I had found.

Good luck!
FlyingIsFun1217

This topic is closed to new replies.

Advertisement