robert,
June 19, 2002 at 11:02:00 AM CEST
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:
as a result the following prototypes should be renamed:
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
tobi,
June 19, 2002 at 5:35:11 PM CEST
half the way thanks robert for your suggestions. i can follow half the way, until the foreign keys rush in (ie +1 for table and column abbreviations so far). concerning the foreign keys i don't have a better proposal but it makes me feel dizzy to read bafflegab like TXT_F_TXT_STORY (does this really mean that this is a foreign key pointing from the TEXT table to the TEXT table? well, probably for a comment, right? i also don't understand TXT_F_SIT... where's the third part here, the meaning?) probably worth a discussion. or maybe i must get some more lessons in abstract thinking...
robert,
June 19, 2002 at 6:46:04 PM CEST
i know it's confusing (that's why i wanted to discuss this here ;-), although it's less confusing for me because i already have to deal with such naming conventions. to explain: yes, TXT_F_TXT_STORY is a foreign key pointing to the same table (for comments), and the "meaning" is optional: we need to distinguish what was formerly named CREATOR and MODIFIER which both point to the USER-table, so we can't use simply TXT_F_USER. so: no "meaning"-suffix if there's no need to distinguish two columns pointing to the same foreign table.
stefanp,
June 19, 2002 at 7:18:21 PM CEST
what about the abbrev.? having spent a day on another database definition that follows the above conventions, I can clearly see the advantages of the foreign-key-rule, and, too, the per-table-prefixes help the brain a lot. but what about leaving away the techie table-abbreviations and use the most verbose db-scheme instead? especially for antville it's not that much more writing as most tablenames only consist of 4 or 5 letters.
hns,
June 19, 2002 at 10:28:32 PM CEST
+2 (considering my previous +1) on using the whole table name as prefix (if I got that right).
robert,
June 19, 2002 at 11:48:51 PM CEST
not so sure MEMBERSHIP_F_USER_CREATOR or IMAGE_F_IMAGE_THUMB for sure is readable, but imho it's much too verbose (i know that i renamed the table MEMBER to MEMBERSHIP, but i did because it contains membership-records ;-). the abbreviations might be confusing at first, but i think that anyone who needs to use them in a hand-typed sql-statement has already digged deep into antville, and this means that this person should have at least a basic knowledge about the db-schema (which in this case also means "learning" the abbreviations). everybody else must not care about them.
tobi,
June 20, 2002 at 9:38:44 AM CEST
verbose is good at least for me, so +1 for the whole table names. because i don't have to deal with how a table is abbreviated, then. ... comment
hns,
June 19, 2002 at 6:27:11 PM CEST
I think it's very important that we fix the db schema so it works on all databases. (Btw, I think it would be a good idea to try to add all the columns we know we'll need in the same swoosh, like for instance the per-story comment flag in the text table.) I must say that I don't like the per-table prefixes very much, it results in a very techie looking schema that's not very easy to memorize. If it's possible I'd prefer to just find names that aren't reserved in any system (like, for example, STORY instead of TEXT), but on the other hand, you don't have to deal with column names very often when programming in antville, so this is no vote against it, just a slight personal preference. Similar with the foreign keys naming conventions. I actually think it's clear from the type properties files what key relates to what column, so I don't really feel the need for such a formal convention (but I don't have a big problem with it either). +1 on the new names for the table names themselves (e.g. SITE instead of WEBLOG).
robert,
June 19, 2002 at 6:38:34 PM CEST
yes we should definetly add all columns that we know will be needed in the near future (i'd add also the columns that are needed by your story-extension, hns). not just to reduce the number of upcoming db-patches, but also because changing a db-schema in oracle is really a pain. regarding column-names: i'm not very happy with table-prefixes either, but i think it's the safest way to go. i thought of renaming i.e. USER to MEMBER, but that would just create another inconsistency (we would have to map the prototype user to MEMBER ...), and then there is FILE ... and thanks to helma one doesn't have to do much with SQL-statements ;-) ... comment
|
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 Youre not logged in ... Login
... home
... topics ... galleries ... Home
... Tags
... Galleries
... about antville ... download ... macros.antville.org ... help.antville.org ... translate antville! ... antville home
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)
clock not that it's particularly
earthshattering but the antclock is running slow by about 15...
by kohlehydrat (7/23/03, 8:25 PM)
How to log skin names
I accessed to console?? Hi, I would like to know...
by winson (7/23/03, 4:12 PM)
|