|
You last visited: Today at 22:06
Advertisement
1 Question
Discussion on 1 Question within the CO2 Private Server forum part of the Conquer Online 2 category.
07/01/2011, 19:21
|
#1
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
1 Question
Why does nobody use MSSQL in their sources? It's far easier to use in C#.
|
|
|
07/01/2011, 20:28
|
#2
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
I do in all my sources, both of my released sources use it >_>
|
|
|
07/01/2011, 20:54
|
#3
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by Korvacs
I do in all my sources, both of my released sources use it >_>
|
Yea, but 99% of all sources uses MySQL.
|
|
|
07/01/2011, 20:57
|
#4
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
The reason I chose INI over MySQL and MsSql is because I find INI easier to use.
|
|
|
07/01/2011, 21:16
|
#5
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,191
|
I chose MySql because I personally loathe using Visual Studio to manage databases. Ini is really useful for loading the server quickly but I wouldn't use it on dynamic variables... that's a really bad idea (in my opinion).
|
|
|
07/01/2011, 21:34
|
#6
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
a mixture of Ini and Binary cant be too much of a bad idea :L
|
|
|
07/01/2011, 21:44
|
#7
|
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
|
i'm actually testing with SqLite like a flatfile...
its rlly fast if you know how to use it ;D... also no problems with pools or anything like... you can manage a single connection open for a long time if needed ^^
|
|
|
07/01/2011, 21:45
|
#8
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by _DreadNought_
The reason I chose INI over MySQL and MsSql is because I find INI easier to use.
|
How is this much harder to use?
Note: Just a quick wrapper.
Code:
public class SQLWrapper
{
SqlConnection Connection;
public List<string> Exceptions;
public SQLWrapper(string connectionString)
{
Connection = new SqlConnection(connectionString);
Exceptions = new List<string>();
}
public int SQL_COMMAND(string SQLCommand)
{
SqlCommand Command = new SqlCommand(SQLCommand, Connection);
int BACK_VAL = 0;
try
{
Connection.Open();
BACK_VAL = Command.ExecuteNonQuery();
}
catch (Exception exc)
{
Exceptions.Add(exc.ToString());
BACK_VAL = 0;
}
finally
{
Connection.Close();
}
return BACK_VAL;
}
public List<string> SQL_READ(string[] Select, string From)
{
List<string> read = new List<string>();
string _Select = "";
for (int i = 0; i < Select.Length; i++)
{
if (i == Select.Length - 1)
_Select += Select[i];
else
_Select += Select[i] + ", ";
}
string Command = "SELECT " + _Select + " FROM " + From;
SqlCommand SQLCommand = new SqlCommand(Command, Connection);
SqlDataReader SQLReader;
try
{
Connection.Open();
SQLReader = SQLCommand.ExecuteReader();
int i = 0;
while (SQLReader.Read())
{
read.Add(SQLReader[read[i]].ToString());
i++;
}
SQLReader.Close();
}
catch (Exception exc)
{
Exceptions.Add(exc.ToString());
}
finally
{
Connection.Close();
}
return read;
}
}
Quote:
Originally Posted by Fаng
I chose MySql because I personally loathe using Visual Studio to manage databases. Ini is really useful for loading the server quickly but I wouldn't use it on dynamic variables... that's a really bad idea (in my opinion).
|
MSSQL is already supported by Visual Studio. That made no sense.
|
|
|
07/02/2011, 00:42
|
#9
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
Well, I guess between all the databases, It's all down to what the developer wants to use.
|
|
|
07/02/2011, 06:37
|
#10
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,191
|
Quote:
Originally Posted by BaussHacker
MSSQL is already supported by Visual Studio. That made no sense.
|
Re-read what I said and it will make sense.
Loathe: to feel disgust or intense aversion for; abhor.
Quote:
Originally Posted by Y u k i
@Jacob: ".....Exceptions = new List<string>();" No thanks
I love FlatFile database´s <3 I got a INI Class in 100% Managed Code without those "slow" API Calls  D And its acctually faster than the one yall are using at LOTF,NCO and shit like that.
I store Items at INI Files. Using the Common Class i need 652ms (thats the midpoint)
Using the managed INI class its just 433 (midpoint) to load all of em
MySQL Needs 387ms. Sounds Fair.
|
Idk what kind of mysql you're using, but mine registers between 0 and 1 millisecond.
I don't think your info on mysql is right...
Really, it all boils down to what you're comfortable with and what you can handle the best. For some people that's mssql, and for others it's mysql or flat-binary. There's a reason why people call it flat though... so I'd watch out for dynamically changing variables. If you can handle that, great. Power to you- that's what makes it your work.
|
|
|
07/02/2011, 10:23
|
#11
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
Hybrids Binary class ftw <3
|
|
|
07/02/2011, 13:52
|
#12
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,191
|
Quote:
Originally Posted by Y u k i
Register != Load.
Also this was tested on my "NETBOOK" (1.6ghz Atom CPU and a pretty slow 5400rpm HDD)
Ofc, on my gaming machine or on a Dedicated (possibly even on a vps) it would be near the 20-50 ms. I like to code on my netbook, as its slow.
If it runs efficently and fast on my netbook, im stastified. IMO great to learn efficent programming. Try to keep down the delay´s and CPU Usage on that Hardware
EDIT:
Gaming Machine: (i7 at 4,3 GHZ)
Items loaded in 13ms from mysql and in 55 from my managed ini class
97 using the common ini class with api calls.
EDIT2:
Cheap VPS (shared xenon 2.8ghz quadcore)
Item Load:
MySQL: 8ms - 44ms depending on the load as its shared ofc.
My INI Class: 22 - 43 ms.
Commom INI Class: for some reason always above 200ms -> Need info on that why its that slow here.
|
Oh well yah, loading the data I do binary and ini too. Who in their right mind would try doing that in MySql? o.O Huge amounts of static data should be loaded using ini and Binary.
|
|
|
All times are GMT +1. The time now is 22:07.
|
|