Review and Rename Table Names in CORE

18 views
Skip to first unread message

Dmitry A.

unread,
Feb 28, 2011, 2:08:27 PM2/28/11
to in-por...@googlegroups.com
Hi everyone,


As part of currently Minimize In-Portal Core with ability to download/update Modules online discussion where we started to break In-Portal CORE on a smaller pieces reviewing it's Table Structure.

In this discussion I propose we finally Review and Rename all incorrectly named Tables:


Agents => SystemEventSchedules, used in CORE, propose to rename to "SystemEventSchedules" as part of 981: Rename Agents section to "Event Scheduler" task http://tracker.in-portal.org/view.php?id=981 

BanRules => UserBanRules, user ban rules (rarely used), might move from CORE to UserBans in the future.

Cache => SystemCache, used in CORE, propose to rename so it's more self-exlainatory

Category => Categories, used in CORE

CategoryCustomData - category custom field values CORE? Need to Rename?

CustomField => CustomFields, currently used in CORE, but may not be part of default install CORE in the future (after minimized)

Drafts => FormSubmissionReplyDrafts, currently used in CORE, but may not be part of default install CORE in the future (after minimized), proposed module - form submission drafts - Forms

Events => EmailEvents, used in CORE, propose to rename so it's more self-exlainatory

Favorites => CategoryItemFavorites - favorite category items and friend list (in in-bulletin) - CategoryItems

Images => CategoryItemImages, used for user/category/category item images – CORE? propose to rename so it's more self-exlainatory

ItemFiles => CategoryItemFiles, propose to rename so it's more self-exlainatory

ItemRating => CategoryItemRating, propose to rename so it's more self-exlainatory - category item ratings - CategoryItems

ItemReview => CategoryItemsReviews, propose to rename so it's more self-exlainatory- category item review - CategoryItems

Language => Languages, proper naming

PermCache => CategoryPermissionCache, used in CORE, category-based permission caching (because of inheritance)

PermissionConfig => CategoryPermissionConfig, used in CORE - list of all possible category-based permissions – CORE?

Permissions => CategoryPermissions, used in CORE - what permissions were set

Phrase => LanguagePhrases, used in CORE, list of labels - CORE

PhraseCache => LanguagePhrasesCache, used in CORE - way of caching label and phrase data based on visited template - CORE

PortalGroup => UserGroups, used in CORE, list of all groups

PortalUser => Users, used in CORE, list of users

PortalUserCustomData => UsersCustomData, used in CORE, list of users custom fields, data

RelatedSearches => CategoryRelatedSearches, used in CORE, but might be moved into separate Module in the future

Relationship => CategoryItemRelationships, used in CORE, category/category item relations – CategoryItems or Relationships

SearchConfig - front-end search configuration settings – CORE or Search

SearchLog => SearchLogs, used in CORE - list of search queries, used on Front-end - Logs

SessionData => UserSessionData, used in CORE - user session-specific data - CORE
SessionLogs => UserSessionLogs, used in CORE - session usage log - Logs

Skins => AdminSkins - admin skinning support - CORE

SubmissionLog => FormSubmissionReplies, used in CORE - list of messages, associated with a form submissions - Forms

Theme => Themes, used in CORE - list of front-end themes - CORE

UserGroup => UserGroupRelations, used in CORE - what user is in what group - CORE

UserSession => UserSessions, used in CORE - list of active user sessions - CORE

Visits => UserVisits, used in CORE - attempt to create simplified google analytics, but isn't used - Logs


It's only the CORE for now.


DA

Dmitry A.

unread,
Mar 4, 2011, 12:10:30 PM3/4/11
to in-por...@googlegroups.com
Any feedback on new proposed names?


DA

Alexander Obuhovich

unread,
Mar 5, 2011, 5:00:29 AM3/5/11
to in-por...@googlegroups.com
Agents => SystemEventSchedules, used in CORE, propose to rename to "SystemEventSchedules" as part of 981: Rename Agents section to "Event Scheduler" task http://tracker.in-portal.org/view.php?id=981 

Maybe "ScheduledEvents" will be better.


Images => CategoryItemImages, used for user/category/category item images – CORE? propose to rename so it's more self-exlainatory

Not sure, since it's also used to store category and user images.


ItemReview => CategoryItemsReviews, propose to rename so it's more self-exlainatory- category item review - CategoryItems

Maybe you've meant "CategoryItemReviews" (Items changed to Item).


Permissions => CategoryPermissions, used in CORE - what permissions were set

Absolutely no, since both category-based and non-category based permissions are located there.


Phrase => LanguagePhrases, used in CORE, list of labels - CORE

Maybe LanguageLabels will be more appropriate, since we are trying to use Label instead of Phrase even on editing forms. Not sure about it though.


PhraseCache => LanguagePhrasesCache, used in CORE - way of caching label and phrase data based on visited template - CORE

It does cache phrase and configuration variable ids on template basis, so better name could be TemplateUsageCache or something like that.


Relationship => CategoryItemRelationships, used in CORE, category/category item relations – CategoryItems or Relationships

It also holds category relationships, maybe other name would be more suitable.


UserGroup => UserGroupRelations, used in CORE - what user is in what group - CORE

I like this especially.



Also table PersistantSessionData isn't has a typo error in it (according to google translate). It should be called PersistentSessionData or UserPersistentSessionData.


Also you tried to append "System" in front of some table names, but clearly not in front of all that should have it. That's why I'm proposing not to add "System" just yet.




On Fri, Mar 4, 2011 at 7:10 PM, Dmitry A. <dand...@gmail.com> wrote:
Any feedback on new proposed names?


DA



Dmitry A.

unread,
Mar 6, 2011, 10:52:34 PM3/6/11
to in-por...@googlegroups.com
Thanks for review and feedback Alex.

I'll be making changes and post a 2nd version of this list shortly!


DA

Dmitry A.

unread,
Mar 7, 2011, 7:21:45 PM3/7/11
to in-por...@googlegroups.com
Hi,


Please see below:



Images => CategoryItemImages, used for user/category/category item images – CORE? propose to rename so it's more self-exlainatory

Not sure, since it's also used to store category and user images.

A: what about CatalogImages - it's more general, but it fall out for other "CategoryItemReviews" and so on



ItemReview => CategoryItemReviews, propose to rename so it's more self-exlainatory- category item review - CategoryItems

Maybe you've meant "CategoryItemReviews" (Items changed to Item).

A: Yes



Permissions => CategoryPermissions, used in CORE - what permissions were set

Absolutely no, since both category-based and non-category based permissions are located there.

A: What about UserPermissions then?


Phrase => LanguageLabels, used in CORE, list of labels - CORE

A: Updated.


PhraseCache => LanguageLabelsCache, used in CORE - way of caching label and phrase data based on visited template - CORE

It does cache phrase and configuration variable ids on template basis, so better name could be TemplateUsageCache or something like that.

A: TemplateUsageCache - too confusing! LanguageLabelsCache tell us that we are Caching LanguageLabels and it's enough I think. We are not caching too many thing anyway.


Relationship => CatalogRelationships, used in CORE, category/category item relations – CategoryItems or Relationships

It also holds category relationships, maybe other name would be more suitable

A: what about CatalogRelationships



Also table PersistantSessionData isn't has a typo error in it (according to google translate). It should be called PersistentSessionData or UserPersistentSessionData.

A: name should be UserPersistentSessionData



Also, what if we add "k" to all Tables that are in the CORE module?


DA

Alexander Obuhovich

unread,
Mar 8, 2011, 3:03:06 AM3/8/11
to in-por...@googlegroups.com
Adding "k" will be possible only after we complete moving out tables from "core" module discussion.

Of about all other.

Only *CustomData tables should be properly renamed too, e.g. "UsersCustomData" becomes "UserCustomData" ("s" removed) and so on.

Dmitry A.

unread,
Mar 8, 2011, 12:53:08 PM3/8/11
to in-por...@googlegroups.com
Yes, I agree with "k" prefix - it going to wait for CORE Minimization.

About removing "s" at the end - may be we should keep it as is in order to keep the listing order of the tables when the Main (ie. Users) table listed first and then comes UsersCustomData. If we doing like you suggested (remove "s") we'll have UserCustomData listed before Users which is kind of odd. Same for Products and ProductCustomData.

May be we can do an exception here, plus table actually named correctly from the language point of view - it holds Custom Data of Users and not a single User.


DA 

Alexander Obuhovich

unread,
Mar 8, 2011, 1:07:01 PM3/8/11
to in-por...@googlegroups.com
So what's the difference between UserCustomData and UsersCustomData from translation view point?

Dmitry A.

unread,
Mar 8, 2011, 2:58:08 PM3/8/11
to in-por...@googlegroups.com
It's okay with me to have "UserCustomData" and NOT "UsersCustomData".

Do you want me to re-publish the entire list for Final review?


DA

Alexander Obuhovich

unread,
Mar 8, 2011, 4:15:20 PM3/8/11
to in-por...@googlegroups.com
Yes, please.

Dmitry A.

unread,
Mar 8, 2011, 7:01:27 PM3/8/11
to in-por...@googlegroups.com
Here is it and a few more name options provided:

Agents => ScheduledEvents or ScheduledSystemEvents
BanRules => UserBanRules
Cache => SystemCache
Category => Categories
CategoryCustomData (no change)
CustomField => CustomFields
Drafts => FormSubmissionReplyDrafts
Events => EmailEvents
Favorites => CategoryItemFavorites or CatalogFavorites
Images => CategoryItemImages or CatalogImages (I think one day we can remove Users from here!)
ItemFiles => CategoryItemFiles or CatalogFiles
ItemRating => CategoryItemRatings or CatalogRatings
ItemReview => CategoryItemReviews or CatalogReviews
Language => Languages
PermCache => CategoryPermissionCache or CategoryPermissionsCache
PermissionConfig => PermissionConfig (no change) or PermissionsConfig (includes all sorts of configurations)
Permissions => Permissions (no changes) or PermissionSettings (includes all sorts of permission settings)
Phrase => LanguageLabels
PhraseCache => LanguageLabelsCache
PortalGroup => UserGroups
PersistantSessionData = UserPersistentSessionData
PortalUser => Users
PortalUserCustomData => UserCustomData
RelatedSearches => CategoryRelatedSearches or CatalogRelatedSearches
Relationship => CatalogRelationships
SearchLog => SearchLogs
SessionData => UserSessionData
SessionLogs => UserSessionLogs
Skins => AdminSkins
SubmissionLog => FormSubmissionReplies
Theme => Themes
UserGroup => UserGroupRelations
UserSession => UserSessions
Visits => UserVisits


DA

Alexander Obuhovich

unread,
Mar 9, 2011, 3:07:07 AM3/9/11
to in-por...@googlegroups.com
Cache => SystemCache

What I told about adding "System" in front of a tables? You must be adding "k" instead, but we both agreed about adding on later stages (after core minimization is completed).
Also I suppose there is already a table called SysCache or SystemCache. Maybe you can list tables to delete here too so we can see a whole picture?


Images => CategoryItemImages or CatalogImages (I think one day we can remove Users from here!)

We can remove users from there, since only image they have is their avatar which is always uploaded directly by user in In-Bulletin.


PermissionConfig => PermissionConfig (no change) or PermissionsConfig (includes all sorts of configurations)

Maybe it will be CategoryPermissionConfig, since only category permissions are listed there.


PhraseCache => LanguageLabelsCache

As I've already told, then it cached configuration variables and labels on per template basis. So it's more TemplateConfigLabelCache or TemplateLabelConfigCache or TemplateCache.

Here general rule how to remove "or" in your list:
  • when table has something to do with category items only, like links or products, then it will have "CategoryItem" prefix
  • when table is related to a category/user and to category items, that it will have "Catalog" prefix

Ok about all other renamings.

Dmitry Andrejev

unread,
Mar 10, 2011, 11:46:50 AM3/10/11
to in-por...@googlegroups.com
Another revision, please see below:


Cache => SystemCache

A: I would leave it as SystemCache - it's more intuitive. Later we might add "k" for all CORE tables, but just Cache table it's too General in mi opinion. Also, SysCache will be deleted in this task ( http://tracker.in-portal.org/view.php?id=1006 ) which needs testing by the way!


Images => CategoryItemImages

A: I agree on this



PermissionConfig => CategoryPermissionsConfig (it's more proper name for it in English)

A: I have checked and this table HOLDs some old permissions like - ADMIN, LOGIN, DEBUG.* PROFILE.MODIFY i and some others? I guess we are deleting them?



PhraseCache => LanguageLabelsCache

A: I like LanguageLabelsCache more, but we can use LanguageLabelsTemplateCache (correct in English), but in my opinion it's too long and in the future we should optimize and have 1 table (UrlsCache) to store it all.


DA

--


Best regards,

Dmitry A.

Alexander Obuhovich

unread,
Mar 10, 2011, 2:26:53 PM3/10/11
to in-por...@googlegroups.com
A: I have checked and this table HOLDs some old permissions like - ADMIN, LOGIN, DEBUG.* PROFILE.MODIFY i and some others? I guess we are deleting them?

Yes. We should check for them being used at all and then we can surely delete them.

Ok about other.

Dmitry Andrejev

unread,
Mar 10, 2011, 2:58:14 PM3/10/11
to in-por...@googlegroups.com
Another final draft (before creating a task), please reivew:

Agents => ScheduledSystemEvents
BanRules => UserBanRules
Cache => SystemCache
Category => Categories
CustomField => CustomFields
Drafts => FormSubmissionReplyDrafts
Events => EmailEvents
Favorites => UserFavorites (new change)
Images => CatalogImages  (better name for a future)
ItemFiles => CatalogFiles (better name for a future)
ItemRating => CatalogRatings  (better name for a future)
ItemReview => CatalogReviews  (better name for a future)
Language => Languages
PermCache => CategoryPermissionsCache
PermissionConfig => CategoryPermissionsConfig
Permissions => Permissions (NO CHANGE)
Phrase => LanguageLabels
PhraseCache (NO CHANGE)
PortalGroup => UserGroups
PersistantSessionData = UserPersistentSessionData
PortalUser => Users
PortalUserCustomData => UserCustomData
RelatedSearches => CategoryRelatedSearches
Relationship => CatalogRelationships
SearchLog => SearchLogs
SessionData => UserSessionData
SessionLogs => UserSessionLogs
Skins => AdminSkins
SubmissionLog => FormSubmissionReplies
Theme => Themes
UserGroup => UserGroupRelations
UserSession => UserSessions
Visits => UserVisits


Thanks.

Alexander Obuhovich

unread,
Mar 11, 2011, 2:21:28 AM3/11/11
to in-por...@googlegroups.com
Ok.

Dmitry A.

unread,
Mar 11, 2011, 11:59:09 AM3/11/11
to in-por...@googlegroups.com
New task created for this:

1011: Review and Rename Table Names in CORE



DA

Alexander Obuhovich

unread,
Mar 13, 2011, 5:48:26 AM3/13/11
to in-por...@googlegroups.com
Another idea here. Maybe we can rename "ConfigurationValues" table to a "Settings" table, since it not only contains configuration variable values as before, but also rules to display them on configuration templates, like phrase name.

This data was moved from ConfigurationAdmin table, that was deleted before.


The more simple table name is, the more chances that it can be understood by others.

Phil -- wbtc.fr --

unread,
Mar 13, 2011, 7:42:33 AM3/13/11
to in-por...@googlegroups.com
I agree :)

2011/3/13 Alexander Obuhovich <aik....@gmail.com>

Dmitry A.

unread,
Mar 13, 2011, 6:09:20 PM3/13/11
to in-por...@googlegroups.com
What about SystemSettings name for it?

Settings might be too wide - don't you think? I can live with both names - it's just we have similar approach when named Events table to store Events which are actually Email Events and now we are renaming it. Based on that I like idea of having it called SystemSettings.

What are your thoughts?


DA

Alexander Obuhovich

unread,
Mar 14, 2011, 2:53:40 AM3/14/11
to in-por...@googlegroups.com
Both adding "k" prefix and adding "System" makes the same effect to me.

Dmitry A.

unread,
Mar 14, 2011, 2:59:43 PM3/14/11
to in-por...@googlegroups.com
Yes, I agree that to you it will have the same effect, but I still believe that we should call it correctly from English language, Programming and Logical points of you which is why I proposing to make it system

SystemCache
SystemSettings


so the leave next to each other and totally make sense to everyone!

"k" will be marking them as CORE module tables nothing more.

DA






Alexander Obuhovich

unread,
Mar 14, 2011, 3:50:48 PM3/14/11
to in-por...@googlegroups.com
Ok, let's proceed with System then.

Dmitry A.

unread,
Mar 14, 2011, 3:55:16 PM3/14/11
to in-por...@googlegroups.com
Great!

Task has been updated.

Dmitry A.

unread,
Jan 6, 2012, 6:15:13 PM1/6/12
to in-por...@googlegroups.com
This task has been completed and changed committed into 5.2.x branch to be tested (both new and upgrades)

So I have successfully tested a few different new installations.

DA
Reply all
Reply to author
Forward
0 new messages