Antville Project

Wednesday, 19. June 2002

proposal: new database schema

to ensure that antville works with other databases than mysql in the backend we must change table- and column-names to avoid the use of reserved words (eg. "USER" is a reserved word in oracle and PostgreSQL). therefor i'd like to propose the following naming-convention:

  • every table's name is prefixed with "AV_" (for "Antville").
  • every column-name is prefixed with a three-character abbreviation of the table-name this column belongs to (plus some of the tables are renamed too): ACC_ in table AV_ACCESSLOG CHO_ in table AV_CHOICE FIL_ in table AV_FILE (the former GOODIE-table) IMG_ in table AV_IMAGE MBS_ in table AV_MEMBERSHIP (the former MEMBER-table) PLL_ in table AV_POLL SKN_ in table AV_SKIN SLG_ in table AV_SYSLOG TXT_ in table AV_TXT USR_ in table AV_USER VTE_ in table AV_VOTE SIT_ in table AV_SITE (the former WEBLOG-table)
  • primary keys are named [table-abbreviation]_ID
  • foreign keys are named [table-abbreviation]_F_[foreign table][_meaning], eg. IMG_F_USR_CREATOR, TXT_F_SIT, TXT_F_TXT_STORY, IMG_F_IMG_THUMB etc. (as an alternative, foreign keys could also be named as they're now (plus the abbreviation-prefix), but i personally think it's less consistent: think of TXT_CREATOR which actually references a record in the usertable). anyway, this is imo one of the points we should discuss

as a result the following prototypes should be renamed:

  • weblog -> site
  • goodie -> file (although this could easily be confused with File i agree with hns that it's easier to understand for users)
  • member -> membership
  • membership -> membermgr (the mountpoint "members" stays the same)

and for consistency-reasons the column AUTHOR in AV_TEXT should be renamed to TXT_F_USR_CREATOR (this is the only occurrence of AUTHOR in the whole db-structure).

please let me know what you think about it.

links: Oracle Reserved Words (v.9i) SQL Key Words (PostgreSQL) MySQL Reserved words

link (10 comments
 

The Antville Server Fund has been a great success. Thanks to everybody who contributed!
online for 8550 Days
last updated: 1/4/11, 10:22 AM
status
Youre not logged in ... Login
menu
June 2002
SunMonTueWedThuFriSat
1
2345678
9101112131415
16171819202122
23242526272829
30
MayJuly
recent
zfuture's house here is zfuture's
house
by zfuture (7/31/03, 2:59 AM)
i understand your concerns however,
i hardly can think of a solution. certainly, if the...
by tobi (7/29/03, 9:47 AM)
Found several more similar sites
listed This is getting to be quite a concern to...
by cobalt123 (7/27/03, 7:56 PM)
Second Post Alert on Referrer
bug livecatz I put this into "help" and now here:...
by cobalt123 (7/26/03, 7:14 PM)
well it's not easy to
find from here, anyway. think we should include a link,...
by tobi (7/24/03, 11:25 AM)
So finally I found
the helma Bugzilla - stupid me.
by mdornseif (7/24/03, 10:28 AM)
clock not that it's particularly
earthshattering but the antclock is running slow by about 15...
by kohlehydrat (7/23/03, 8:25 PM)
but blogosphere.us isn't can't really
be rated as spam can it?
by kohlehydrat (7/23/03, 8:08 PM)
More referrer spam www.webfrost.com
by Irene (7/23/03, 7:55 PM)
How to log skin names
I accessed to console?? Hi, I would like to know...
by winson (7/23/03, 4:12 PM)

Click here to get an XML version of this weblog.

Made with Antville
powered by
Helma Object Publisher