Author |
Message |
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Wed Apr 04, 2007 11:54 pm Post subject: Recommended Database? |
 |
|
|
|
I need to know which database method is prefered for my module. Would it be MYSQL, or ASSS builtin database? I need to store and retrieve hundreds of planets data for players to access and manipulate. I would prefer this be all on the server side to avoid potential cheating.
Which database would be easier to implement PLANETS, INVENTORY, PLAYERS, SHIPS, etc..
My guess is MySQL, and I will have to read up on it. How hard would it be to integrate this into ASSS for what I need?
I would also need to make an external program to be able to access planet data so that the statistics can be updated by a defined hour. Population will have to grow you know  |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Thu Apr 05, 2007 2:18 am Post subject: Re: Recommended Database? |
 |
|
|
|
corvey wrote: | I would also need to make an external program to be able to access planet data so that the statistics can be updated by a defined hour. |
If you plan on using this data in anything other than just ASSS, I'd recommend using SQL over anything else internal. Depending on the language you use, SQL can be very simple or annoying to add into your code. |
|
Back to top |
|
 |
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Thu Apr 05, 2007 2:40 am Post subject: Re: Recommended Database? |
 |
|
|
|
Mine GO BOOM wrote: | If you plan on using this data in anything other than just ASSS, I'd recommend using SQL over anything else internal. Depending on the language you use, SQL can be very simple or annoying to add into your code. |
The only thing I can think of is a program to access the collected data so it can be manipulated daily, like population and stuff on the planet. I also would like to make web stats afterwards. I will need to be able to access that data somehow. Other than that it will be an ASSS only project, and that's where this module is meant to be! I will have no use for the code in anything else, it's a one time deal. |
|
Back to top |
|
 |
k0zy Server Help Squatter

Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
Posted: Thu Apr 05, 2007 4:30 am Post subject: |
 |
|
|
|
I'd go with MySQL.
If you're planing on having web stats later this will probably be the easyiest way.
You could also look at PostgreSQL which has a better implementation of stored procedures, triggers and transactions.
It's not something you might want to use now, but it's a fine thing to look into if you plan on doing more database related stuff later on. _________________ It's a shark! Oh my god! Unbelievable! |
|
Back to top |
|
 |
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Thu Apr 05, 2007 7:48 am Post subject: |
 |
|
|
|
I already have ASSS and MySQL talking, but it doesn't have much of a GUI interface to help, yes, MySQL Administrator GUI tool is installed and it isn't much help either, it's just kinda THERE, not much to do with it, and ASSS installed it's own stuff in there to get itself going. I don't know much about MySQL, but I would like to learn a little bit to get me going.
Any suggestions on how to receive from and send to MySQL database through a homemade module for ASSS?? Please be specific and detailed. |
|
Back to top |
|
 |
Doc Flabby Server Help Squatter

Joined: Feb 26 2006 Posts: 636 Offline
|
|
Back to top |
|
 |
steigerwald Novice
Joined: Mar 27 2006 Posts: 34 Offline
|
Posted: Thu Apr 05, 2007 12:04 pm Post subject: |
 |
|
|
|
try phpmyadmin |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Thu Apr 05, 2007 2:11 pm Post subject: |
 |
|
|
|
I'd take a real client over phpMyAdmin any day. _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
Back to top |
|
 |
k0zy Server Help Squatter

Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
|
Back to top |
|
 |
BDwinsAlt Agurus's Posse

Age:34 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Thu Apr 05, 2007 5:01 pm Post subject: |
 |
|
|
|
I would also suggest MySQL. A few basic commands is all you really need to know for it anyways. I didn't know there was a GUI for it besides phpMyAdmin. |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Thu Apr 05, 2007 5:22 pm Post subject: |
 |
|
|
|
The fact that there's already a mysql module makes it a no-brainer. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
 |
Animate Dreams Gotta buy them all! (Consumer whore)

Age:37 Gender: Joined: May 01 2004 Posts: 821 Location: Middle Tennessee Offline
|
Posted: Thu Apr 05, 2007 5:26 pm Post subject: |
 |
|
|
|
Yeah, if you're going to use mysql, you probably shouldn't bother with a GUI at all. Since your program is going to have to access everything, you'll have to know how to do it manually anyway. It might be nice to play around and experiment with, but when it comes down to making the actual module, you'll have to do it all through commands, so it's probably best just to do it that way. Maybe a GUI would help you tell if you were doing it right a bit easier, though. I'm not sure, I don't really know anything about databases yet. >_> |
|
Back to top |
|
 |
BDwinsAlt Agurus's Posse

Age:34 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Thu Apr 05, 2007 7:02 pm Post subject: |
 |
|
|
|
Here are some sample commands you can try out.
If your on windows go into the start menu> programs> mysql*> and click on the admin thing.
If your on linux you can just type: mysql -p dataBaseName
then just type in the password for it.
After you get the prompt "mysql>" then go ahead and try these commands.
SHOW databases;
USE database_name; // [E.X.: Use asss]
SHOW tables;
SELECT * FROM table_name;
// Notice there will be an output of everything in that table or it will say it is empty.
// Now find the names that come up with a list of data under it.
SELECT what_you_found FROM table_name;
SELECT * FROM table_name WHERE what_you_found = 'something';
// It will return empty or show you everything about that area.
|
// Here is an example
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| TCPBiller |
| asss |
| auth |
| members |
| mysql |
| php |
| tcpbiller |
+--------------------+
8 rows in set (0.00 sec)
mysql> use auth
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+----------------+
| Tables_in_auth |
+----------------+
| user |
+----------------+
1 row in set (0.00 sec)
mysql> SELECT * FROM user;
+-----------+----------------------------------+
| name | pass |
+-----------+----------------------------------+
| brad | 958636f23559f431b8bd2e605fdbc2f5 |
| wkbmarine | 323a57bff1764b0e680478bdb006682a |
+-----------+----------------------------------+
2 rows in set (0.02 sec)
mysql> SELECT name FROM user;
+-----------+
| name |
+-----------+
| brad |
| wkbmarine |
+-----------+
2 rows in set (0.00 sec)
mysql> SELECT * FROM user where name = 'brad';
+------+----------------------------------+
| name | pass |
+------+----------------------------------+
| brad | 958636f23559f431b8bd2e605fdbc2f5 |
+------+----------------------------------+
1 row in set (0.00 sec)
mysql> SELECT * FROM user where name = 'bra33d';
Empty set (0.00 sec)
|
If you can understand how this work then you can easily update/add rows. Just google it. |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Fri Apr 06, 2007 2:52 am Post subject: |
 |
|
|
|
Ugh I HATE MySQL and Normalization! Taking Database Theory and Practice was probably the worst mistake of my life... |
|
Back to top |
|
 |
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Sat Apr 07, 2007 6:28 am Post subject: |
 |
|
|
|
Thanks man! it's great!
I also found Navicat for MySQL, and it looks sweet..
Does anyone have or know of a open source module for the ASSS server that connects to MySQL database so I can see how it enters and retrieves data through C? It would shave some time off an already long and lonely project if I can see the format
Or if you happen to know the answer and would be so kind as to explain the format, or perhaps know of a link with the precise information I'm looking for, I would appreciate it.
Thanks |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sat Apr 07, 2007 9:03 am Post subject: |
 |
|
|
|
Uh, have you looked at the built in one I talked about in my post? Database:mysql? |
|
Back to top |
|
 |
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Sat Apr 07, 2007 3:36 pm Post subject: |
 |
|
|
|
Dr Brain wrote: | The fact that there's already a mysql module makes it a no-brainer. |
Dr Brain wrote: | Uh, have you looked at the built in one I talked about in my post? Database:mysql? |
Care to make a real reference statement? If this first post is what your talking about, I am not amused. |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Sat Apr 07, 2007 4:12 pm Post subject: |
 |
|
|
|
corvey wrote: | Care to make a real reference statement? If this first post is what your talking about, I am not amused. |
Searching the ASSS source files for MySQL results in src/database/mysql.c which is the included MySQL module he is talking about. |
|
Back to top |
|
 |
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Sat Apr 07, 2007 4:29 pm Post subject: |
 |
|
|
|
ok, I'm sorry for sounding or looking ignorant to you. MySQL.C is not what I'm talking about. Please allow me to rephrase the question for the correct answer.
Does anyone have a game module coded in C for the ASSS server that uses MYSQL for it's database so that I may see for an example how they implement it into their code? |
|
Back to top |
|
 |
BDwinsAlt Agurus's Posse

Age:34 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Sat Apr 07, 2007 8:19 pm Post subject: |
 |
|
|
|
Have you tried Alias.c (located in the same folder as mysql.c)?
That is a great example of how asss uses mysql. |
|
Back to top |
|
 |
corvey Novice
Joined: Apr 02 2007 Posts: 40 Offline
|
Posted: Mon Apr 09, 2007 7:43 am Post subject: |
 |
|
|
|
BDwinsAlt wrote: | Have you tried Alias.c (located in the same folder as mysql.c)?
That is a great example of how asss uses mysql. |
I'm investigating it now. Thanks for the pointer BDwinsAlt |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Mon Apr 09, 2007 6:38 pm Post subject: |
 |
|
|
|
I didn't really read above but the best MySQL client I've found yet to date is SQLYog (it's free / community edition). Windows only, I believe. _________________ Performance is often the art of cheating carefully. - James Gosling |
|
Back to top |
|
 |
|