logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Players have personal tables?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Fri Jun 08, 2007 20:44    Post subject: Players have personal tables? Reply with quote

I was considering giving every player their own personal table in my database. That way I can know exactly what is stored on them and so on. Plus it's a lot more organized.

Are there any downsides to this? Will the database eventually get so big that it'll cause lag?

Thanks.
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Fri Jun 08, 2007 21:28    Post subject: Reply with quote

I think the main advantage of this is that you can delete the table with the character. Downsides, might increase read speeds a little, but I doubt by much, and I REALLY doubt it'd be noticable. Also makes getting data across characters much more intensive. For this reason we only use a few databases. Here's our table list:

fkymessageboard -stores messages on messageboards
loggedin - tracks players online, used for antieploits and cross-server playerlists
market - tracks the player market items
messages - tracks cross-server messaging system
objdata - tracks the player vaults and transfer chests
pwdata - holds nonquest player data, used for tracking things like quasiclass status, account-cd key linking, etc
qs_quests - holds quest completion data for players
qs_status - tracks cross-server quest statuses on servers for listing
9 different crafting tables (not used yet)


Our setup has evolved with the server, no doubt yours will as well. Deciding to do a table per player is laying the framework for a very differetn setup, but the beauty of sql is you can transfer data fairly easily between tables, so go with what works for you now.

Funky
Back to top
View user's profile Send private message
xaltos



Joined: 03 Jun 2006
Posts: 31
Location: Germany

PostPosted: Sat Jun 09, 2007 9:58    Post subject: Reply with quote

I don't think so many tables with work out well.

Once 1000 or more have visited your world will you soon lose the overview very fast.

Just add a save way to id your players.
e.g. a passport item with a unique ID for all players and you find this id duringh loghin and store it for a faster access as well on the PC object.
So you only need one extra column for your DB tables for the ID and don't end up with so many tables.
_________________
xaltos

NWN2_Audolo
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sun Jun 10, 2007 10:57    Post subject: Reply with quote

What the others said. Plus, there is another problem with having one table per player: If you ever want to add a column to your data structures, you would have to update thousands of tables... not very funny, even if you can script it.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Sun Jun 10, 2007 22:35    Post subject: Reply with quote

Good points. Thanks everyone.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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


Powered by phpBB © 2001, 2005 phpBB Group