Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old August 18th, 2005, 08:34 AM
r_palkovic r_palkovic is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: San Diego, CA USA
Posts: 129 r_palkovic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to r_palkovic Send a message via AIM to r_palkovic Send a message via Yahoo to r_palkovic
A Better Table Structure

Here's what I've got a for a basic table structure for a game I'm developing.

Would anyone reccomend a different structure? If so, why?

Code:

-- 
-- Table structure for table `tblBanlist`
-- 

CREATE TABLE `tblBanlist` (
  `fldBL_id` int(11) NOT NULL auto_increment,
  `fldBL_type` enum('0','1') NOT NULL default '0',
  `fldBL_ban` varchar(20) NOT NULL default '',
  `fldBL_began` float NOT NULL default '0',
  `fldBL_ends` float NOT NULL default '0',
  `fldBL_permanent` enum('0','1') NOT NULL default '0',
  `fldBL_banner` bigint(20) NOT NULL default '0',
  `fldBL_info` text NOT NULL,
  PRIMARY KEY  (`fldBL_id`),
  UNIQUE KEY `fldBL_ban` (`fldBL_ban`),
  FULLTEXT KEY `fldBL_info` (`fldBL_info`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `tblLog`
-- 

CREATE TABLE `tblLog` (
  `fldL_id` bigint(20) NOT NULL auto_increment,
  `fldL_user` int(11) NOT NULL default '0',
  `fldL_ip` varchar(15) NOT NULL default '',
  `fldL_dump` text NOT NULL,
  `fldL_date` float NOT NULL default '0',
  PRIMARY KEY  (`fldL_id`),
  FULLTEXT KEY `fldL_dump` (`fldL_dump`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `tblStats`
-- 

CREATE TABLE `tblStats` (
  `fldS_id` bigint(20) NOT NULL auto_increment,
  `fldS_xp` int(11) NOT NULL default '0',
  `fldS_cash` bigint(20) NOT NULL default '0',
  `fldS_cheques` int(11) NOT NULL default '0',
  `fldS_bank` bigint(20) NOT NULL default '0',
  `fldS_deposited` float NOT NULL default '0',
  PRIMARY KEY  (`fldS_id`)
) TYPE=InnoDB AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `tblUsers`
-- 

CREATE TABLE `tblUsers` (
  `fldU_id` bigint(20) NOT NULL auto_increment,
  `fldU_email` varchar(255) NOT NULL default '',
  `fldU_password` varchar(32) NOT NULL default '',
  `fldU_alias` varchar(20) NOT NULL default '',
  `fldU_type` enum('0','1','2','3') NOT NULL default '0',
  `fldU_status` enum('0','1','2') NOT NULL default '0',
  `fldU_joined` float NOT NULL default '0',
  `fldU_lastlogin` float NOT NULL default '0',
  PRIMARY KEY  (`fldU_id`),
  UNIQUE KEY `fldU_email` (`fldU_email`),
  UNIQUE KEY `fldU_alias` (`fldU_alias`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

Reply With Quote
  #2  
Old September 25th, 2005, 10:57 AM
By_a_ By_a_ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Australia
Posts: 60 By_a_ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: A Better Table Structure

Is this for a StarKingdoms type game?

If so. Give us a run through of it? And perhaps what each field is for?

Reply With Quote
  #3  
Old September 27th, 2005, 12:49 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,729 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 1 h 32 m 7 sec
Reputation Power: 6
RE: A Better Table Structure

Any chance we could get an ERD (Entity Relationship Design) from you? I tend to work better with pictures.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > A Better Table Structure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT