Archived

This topic is now archived and is closed to further replies.

WebsiteWill

Database server question

Recommended Posts

Completely noob when it comes to DB programming though I know the basic fundamentals. For a multi player game where clients will be requesting info from a database at random times, I''m wondering how to set this up. Physically, the client will send packets to the login server. The login server will request the info to or from the database which will be on another pc behind the best firewall I can find. However, for the PC holding the database, does it need any code other than the database program and the data itself? Meaning, does the database server need any custom code for networking supplied for integrity checking (password, legal computer, etc)? Or is it simply a database server than another computer that has an account can make queries from (the login server)? I''m just wondering if I need a code module that operated the actual database? Or do I simply need the login server to be coded so that it queries the database with the commands needed and simply reads the output from the queries? I bet I should go get a database programming book. But gosh darn it, I''ve already hit my book budget for the month and it''s what... the 5th? Thanks for any responses, Webby

Share this post


Link to post
Share on other sites
{Assuming MySQL as the database server}

The DB PC will not need code, but a lot of database tweaking; except maybe some script code for the {WINK-WINK} backup procedure? MySQL provides the tools for login/password and secure connection, but in its default configuration it is fully opened and you will need to add a few layers of restraints to make it secure for your application. For example, you can create a user account that only responds to a specific machine by its IP and this account can only make specific queries to the DB (say, cannot modify the DB topology or write in a specific table); this is the recommended way to get the most secure environment.

You will need to write code on the client side for the login and game servers. MySQL comes with a C library and an OBDC driver you can choose from; those are used to encode the SQL commands to be sent to the DB.

-cb

Share this post


Link to post
Share on other sites
Thanks cb. That''s what I was hoping to hear
I''ll be investing in some database books as soon as my book budget recuperates from my last bout of spending hehe.

Share this post


Link to post
Share on other sites