Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Recommended Database?

 
Post new topic   Reply to topic Printable version
 View previous topic  adding modules Post :: Post Changing LinkedList to a Target  View next topic  
Author Message
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Wed Apr 04, 2007 11:54 pm    Post subject: Recommended Database? Reply to topic Reply with quote

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 biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Thu Apr 05, 2007 2:18 am    Post subject: Re: Recommended Database? Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Thu Apr 05, 2007 2:40 am    Post subject: Re: Recommended Database? Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
k0zy
Server Help Squatter


Gender:Gender:Male
Joined: Jan 11 2003
Posts: 571
Location: Germany
Offline

PostPosted: Thu Apr 05, 2007 4:30 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Thu Apr 05, 2007 7:48 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Thu Apr 05, 2007 11:45 am    Post subject: Reply to topic Reply with quote

GUI for mysql http://www.heidisql.com/
_________________
Rediscover online gaming. Get Subspace | STF The future...prehaps
Back to top
View users profile Send private message Add User to Ignore List
steigerwald
Novice


Joined: Mar 27 2006
Posts: 34
Offline

PostPosted: Thu Apr 05, 2007 12:04 pm    Post subject: Reply to topic Reply with quote

try phpmyadmin
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Thu Apr 05, 2007 2:11 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website
k0zy
Server Help Squatter


Gender:Gender:Male
Joined: Jan 11 2003
Posts: 571
Location: Germany
Offline

PostPosted: Thu Apr 05, 2007 4:22 pm    Post subject: Reply to topic Reply with quote

There's an official MySQL gui.

http://www.mysql.com/products/tools/administrator/
http://dev.mysql.com/downloads/gui-tools/5.0.html
Back to top
View users profile Send private message Add User to Ignore List
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Thu Apr 05, 2007 5:01 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Thu Apr 05, 2007 5:22 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:37
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Thu Apr 05, 2007 5:26 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Thu Apr 05, 2007 7:02 pm    Post subject: Reply to topic Reply with quote

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.

Code: Show/Hide

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.


Code: Show/Hide

// 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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Muskrat
Server Help Squatter


Age:38
Joined: Aug 24 2004
Posts: 829
Location: Swamp
Offline

PostPosted: Fri Apr 06, 2007 2:52 am    Post subject: Reply to topic Reply with quote

Ugh I HATE MySQL and Normalization! Taking Database Theory and Practice was probably the worst mistake of my life...
Back to top
View users profile Send private message Add User to Ignore List AIM Address
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Sat Apr 07, 2007 6:28 am    Post subject: Reply to topic Reply with quote

Doc Flabby wrote:
GUI for mysql http://www.heidisql.com/


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 icon_smile.gif

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
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sat Apr 07, 2007 9:03 am    Post subject: Reply to topic Reply with quote

Uh, have you looked at the built in one I talked about in my post? Database:mysql?
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Sat Apr 07, 2007 3:36 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Sat Apr 07, 2007 4:12 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Sat Apr 07, 2007 4:29 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Sat Apr 07, 2007 8:19 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
corvey
Novice


Joined: Apr 02 2007
Posts: 40
Offline

PostPosted: Mon Apr 09, 2007 7:43 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Mon Apr 09, 2007 6:38 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 46 page(s) served in previous 5 minutes.

phpBB Created this page in 0.479490 seconds : 46 queries executed (92.2%): GZIP compression disabled