Comment 2 for bug 734877

Ok, but you will have to fix all the widgets too. I think this is a
bit unnecessary because we have hijacked the cchost dataqbase with
aiki, part of the power of aiki, to make the site operational.

It would be great to add capability to ccHost to change db and then
change aiki widget queries globally...might be a better use of time to
do that in aiki vs. do this all by hand.

bassel, do you concur? is this an area of the code for aiki bot code ?

jon

On Mon, Mar 14, 2011 at 10:49 AM, chovynz <email address hidden> wrote:
> You are doing things that are beyond me, so, onwards!
> I'll follow things you come up with.
>
> On Tue, Mar 15, 2011 at 4:07 AM, Jakub Jankiewicz <<email address hidden>
>> wrote:
>
>> Public bug reported:
>>
>> There is lots of redundant data in the database
>>
>> examples:
>>
>> ocal_files have username and upload_user where upload_user is id of the
>> user so username can be obtained from aiki_users by joining with this
>> id.
>>
>> here is a query which displays two columns with the same name from
>> different tables:
>>
>> select ocal_files.user_name, aiki_users.username from ocal_files,
>> aiki_users where aiki_users.userid = ocal_files.upload_user
>>
>> set_list_contents and set_list_title both have username which can be
>> taken from aiki_users with join
>>
>> There must be some kind of  naming convention:
>>
>> for example: all tables that are crucial for openclipart functionality
>> should begin with ocal_, tables should be normalized.
>>
>> for example cc_tbl_contests should be renamed to ocal_contents
>>
>> This will help distinguish testing tables.
>>
>> I can create fixed database structure for this, but if we update
>> database, all SQL queries in the whole site will need updates and fixes.
>>
>> I can also write manual with guidelines about naming.
>>
>> ** Affects: openclipart
>>     Importance: Undecided
>>         Status: New
>>
>> --
>> You received this bug notification because you are a member of
>> openclipart.devel, which is subscribed to openclipart.
>> https://bugs.launchpad.net/bugs/734877
>>
>> Title:
>>  Tables in database need normalization
>>
>> Status in openclipart:
>>  New
>>
>> Bug description:
>>  There is lots of redundant data in the database
>>
>>  examples:
>>
>>  ocal_files have username and upload_user where upload_user is id of
>>  the user so username can be obtained from aiki_users by joining with
>>  this id.
>>
>>  here is a query which displays two columns with the same name from
>>  different tables:
>>
>>  select ocal_files.user_name, aiki_users.username from ocal_files,
>>  aiki_users where aiki_users.userid = ocal_files.upload_user
>>
>>  set_list_contents and set_list_title both have username which can be
>>  taken from aiki_users with join
>>
>>  There must be some kind of  naming convention:
>>
>>  for example: all tables that are crucial for openclipart functionality
>>  should begin with ocal_, tables should be normalized.
>>
>>  for example cc_tbl_contests should be renamed to ocal_contents
>>
>>  This will help distinguish testing tables.
>>
>>  I can create fixed database structure for this, but if we update
>>  database, all SQL queries in the whole site will need updates and
>>  fixes.
>>
>>  I can also write manual with guidelines about naming.
>>
>
>
> --
> Cheers
> Chovynz
>
> --
> You received this bug notification because you are a member of
> openclipart.devel, which is subscribed to openclipart.
> https://bugs.launchpad.net/bugs/734877
>
> Title:
>  Tables in database need normalization
>

--
Jon Phillips
http://rejon.org/ | http://fabricatorz.com/
chat/skype: kidproto | irc: rejon
+1.415.830.3884 (global) | +1-510-499-0894 (sf)