3¡£Êý¾Ý¿âÉè¼Æ
¡¡¡¡¹Ø¼ü»¹ÊÇmysqlµÄЧÂÊÎÊÌ⣬ºÏÀí·ÖÅämysqlµÄÄڴ棬ÌرðÊÇtable cacheµÄ
´óС¡£ÁíÍ⣬µ±ÏµÍ³Í»È»µôµçÄØ£¿mysqlÊÇ·ñrobust£¿
¡¡¡¡tableµÄÃû×ÖÉè¼Æ£¬²ÉÓÃһλǰ׺±íÃ÷ÀàÐÍ£¬È«²¿ÓÃСд±íʾ£¨£¿£©£¬ÀýÈ磺
ϵͳµÄÊý¾Ý¿â£¬ÒÔsΪǰµ¼£¬ÈçÓû§±í£ºsuser£¨sUSER ÄØ£¿£©£¬¾ßÌåÈçÏ£º
s £ºÏµÍ³±í£¬suser£¬sclass
m £ºÓû§Ðżþ±í£¬msysop£¬mdrangon
w £ºÓû§ÏûÏ¢±í£¬wsysop£¬wdrangon
a £º°æÃæË÷Òý±í£¬alinux£¬acampus
b £º°æÃæÎÄÕÂ±í£¬blinux£¬bcampus
c £ºÌØÊâ·ÖÀà°æÃæ±í£¬cnewboard
i £º¾«»ªÇøË÷Òý±í£¬ilinux£¬ilinux01£¬icampus£¬icampus04
j £º¾«»ªÇøÎÄÕÂ±í£¬jlinux£¬jcampus£¬
¡¡¡¡ÁíÍ⣬ÊÇʹÓÃ×Ö´®»¹ÊÇÊý×Ö×÷Ϊ±êʶÄØ£¿ÀýÈ磬һ¸ö½ÐsysopµÄÕʺţ¬Æä
idÊÇ1£¬ËûµÄÐŵıíÊÇmsysop»¹ÊÇm00001ÄØ£¿Í¬Ñù£¬Ò»¸ö½ÐcampusµÄ°æ£¬¶ÔÓ¦µÄ
´úÂëÊÇ5£¬ÔòÕâ¸ö°æµÄÎÄÕµıíÃûÊÇbcampus»¹ÊÇb00005ÄØ£¿¿ÉÄÜÓÃ×Ö´®»áÈÝÒ×
Àí½â£¬²é´í°É¡£
Óû§ÐÅÏ¢±í£ºsuser
usernum int unique, // Ψһ±êʶ·û£¬×î¶à30000¸öÕʺţ¬»á²»»áÌ«ÉÙÁË£¿
userid char[20] primary key, // ÅÅÐòµÄ¹Ø¼ü×Ö£¬id£¬È«Ð¡Ð´¡£
passwd char[20], // ÃÜÂ룬´æ·Å¼ÓÃܺóµÄÃÜÎÄ¡£
realid char[20], // ʵ¼Êid£¬´óСд»ìºÏ¡£
username char[24], // Óû§µÄÄà³Æ
userlevel longint, // 64ÖÖȨÏÞ£¿
numlogins int,
numposts int,
firstlogin time,
lastlogin time,
staytime time, /* ×ܹ²Í£Áôʱ¼ä */
lasthost char[32],
email varchar[100],
address varchar[100],
// »¹ÐèÒªÆäËûÊý¾ÝÂð£¿ÊÇ·ñÐèÒªÁô³öÒ»¶¨µÄ±£ÁôÖµ£¬ÒÔºóalter tableÀ´
// Ôö¼ÓеÄ×Ö¶Îʱ£¬Ð§ÂÊÈçºÎ£¿
°æÃæ·ÖÀà±í£ºsclass
classnum int unique, // ·ÖÀà±êʶ
classid char[20], // ·ÖÀàµÄÓ¢ÎÄid£ºcomputer
classname varchar[100],// ·ÖÀàµÄÖÐÎÄÃèÊö£ºµçÄÔÊÀ½ç
classtable char[20], // ÌØÊâ·ÖÀà¶ÔÓ¦µÄ°æÃæ±í
// Ò»°ãÀ´Ëµ£¬Ã¿¸ö°æÃæÖ»ÊôÓÚÒ»¸ö·ÖÀ࣬¶ÔÓÚÌØÊâ·ÖÀ࣬ÀýÈçÈÍ·°æ¿é£¬
// аæÃ棬¿ÉÒÔÓÃרÃŵıíÀ´ÃèÊö
°æÃæ±í£ºsboard
boardnum int unique, // °æÃæµÄ±êʶ£¨ÐèÒªÂ𣿣©
boardid char[20], // °æÃæµÄÓ¢ÎÄÃû
boardname varchar[100], // °æÃæµÄÖÐÎÄÃû
boardclass char[20], // °æÃæËùÊô·ÖÀà
boardsysop varchar[100], // °ßÖñÃûµ¥
boardposts int, // °æÃæµÄÎÄÕÂÊý
boardlevel int, // °æÃæµÄ¶ÁдȨÏÞ
indextable char[20], // °æÃæ¶ÔÓ¦µÄË÷Òý±íµÄÃû³Æ£ºaboardid£¿
texttable char[20], // °æÃæ¶ÔÓ¦µÄÎÄÕ±íÃû³Æ£º bboardid£¿
// ×îºóÁ½ÏîÓÐûÓбØÒª³öÏÖ£¬ÊÇ·ñ¿ÉÒÔ×÷Ϊ±ØÈ»¶ÔÓ¦¹Øϵ£¬»¹ÊÇÔÊÐí
// ³öÏÖ¸ü´óµÄÁé»îÐÔ£¿ÁíÍâ°æÃæµÄ´óСдÎÊÌâÊÇ·ñ¿ÉÒÔÖ±½ÓĬÈÏ
// Ö»¿ªÍ·×Öĸ´óд£¬
ÌØÊâ·ÖÀà°æÃæ±í£ºsnewboard£¬ sstarboard
boardid char[20], // °æÃæµÄid
// ÕâÑùµÄ±íÓбØÒªÂð£¿
°æÃæË÷Òý±í£ºacampus£¬alinux£¬afootball¡£¡£¡£¡£¡£¡£
id int, // ÎÄÕÂÐòÊý£¬ÒªÊÖ¶¯µ÷Õû£¿£¿£¿£¿
mark char[1], // ÎÄÕ±ê¼Ç£¬m£¬g£¬b£¬d¡£¡£¡£¡£
title varchar[100], // ÎÄÕ±êÌâ
writer char[20], // ÎÄÕÂ×÷Õßid
posttime time, // ·¢±íʱ¼ä
textnum longint, // ¶ÔÓ¦µÄ±àºÅ£¿£¿£¿²»µ÷Õû
°æÃæÎÄÕ±í
textnum longint, // ÎÄÕ±àºÅ£¿
textword text, // ÎÄÕÂÄÚÈÝ£¿
// ÓбØÒª½«Ë÷ÒýºÍÎÄÕÂÄÚÈÝ·Ö¿ªÂ𣿴ÓЧÂÊÉÏ¿´£¬¿öÇÒlazy flush
// ÊDZØÈ»µÄ¡£É¾³ýÒ²ÊÇÏÈ×ö¸ö±ê¼Ç¡£
// Óû§ÖеİæÃæÎÄÕÂÊÇ·ñδ¶ÁµÄÊý¾Ý±È½Ï·±£¬ÊÇ·ñÓ¦¸ÃÔÙ½¨Ò»¶ÑµÄ±í
// ²ÅÄÜʵÏÖÄØ£¿
// ͶƱ¹¦ÄÜÔݲ»¿¼ÂÇ¡£¡£¡£¡£