** Description changed:

  There should be separate login history
  
        aiki_login (id INTEGER auto_increment,  userid, time datetime, ip
  BIGINT)
  
  best way to store IP adresses is user Integer and INET_ATON INET_NTOA
  functions.
  
  Optimized aiki_users
  
- 1     userid  int(9) unsigned NO      PRI     auto_increment
+ 1     userid  int(9) unsigned NO      PRI             auto_increment
  2     username        varchar(100)    NO      MUL
  3     full_name       varchar(255)    NO
  7     password        varchar(100)    NO
  8     usergroup       int(10) NO              0
  9     email   varchar(100)    NO
  10    avatar  varchar(255)    NO
  11    homepage        varchar(100)    NO
  17    maillist        int(1)  NO
  19    randkey varchar(255)    NO
  20    is_active       int(5)  NO
  23    exclude_tags    varchar(255)    NO
  24    nsfwfilter      int(1)  NO
  
  logins_number
  
        select count(*) from aiki_logins, aiki_users where
  aiki_logins.userid = aiki_users.userid
  
  users_permistions is redundant there is
  
         select group_permissions from aiki_users_groups, aiki_users where
  aiki_users.usergroup = aiki_users_group.id
  
  num_upload — redundant
  
  I don't how about the core but in openclipart.org you can do this:
  
          select count(*) from aiki_users, ocal_files whre
  aiki_users.userid = ocal_files.upload_user
  
  exclude_tags — (What is this used for?) if aiki need file tags:
  
         aiki_tags (id INTEGER auto_increment, name VARCHAR(100))
  
         aiki_file_tags (id INTEGER auto_increment, fileid INTEGER, tagid
  INTEGER REFERENCES aiki_tags(id) )
- 
-     +--------------+                     +------------------+
-     |  aiki_users  | 1-----------------M | aiki_user_fileds |
-     +--------------+                     +------------------+
-                                                   M
-                                                   |
-                                                   |
-                                                   |
-                                                   |
-                                                   1
-                                          +------------------+
-                                          |    aiki_fileds   |
-                                          +------------------+

-- 
You received this bug notification because you are a member of Aiki
Framework Admins, which is subscribed to aikiframework.
https://bugs.launchpad.net/bugs/735373

Title:
  Database optimization and normalization

Status in Aiki Framework:
  New

Bug description:
  There should be separate login history

        aiki_login (id INTEGER auto_increment,  userid, time datetime,
  ip BIGINT)

  best way to store IP adresses is user Integer and INET_ATON INET_NTOA
  functions.

  Optimized aiki_users

  1     userid  int(9) unsigned NO      PRI             auto_increment
  2     username        varchar(100)    NO      MUL
  3     full_name       varchar(255)    NO
  7     password        varchar(100)    NO
  8     usergroup       int(10) NO              0
  9     email   varchar(100)    NO
  10    avatar  varchar(255)    NO
  11    homepage        varchar(100)    NO
  17    maillist        int(1)  NO
  19    randkey varchar(255)    NO
  20    is_active       int(5)  NO
  23    exclude_tags    varchar(255)    NO
  24    nsfwfilter      int(1)  NO

  logins_number

        select count(*) from aiki_logins, aiki_users where
  aiki_logins.userid = aiki_users.userid

  users_permistions is redundant there is

         select group_permissions from aiki_users_groups, aiki_users
  where aiki_users.usergroup = aiki_users_group.id

  num_upload — redundant

  I don't how about the core but in openclipart.org you can do this:

          select count(*) from aiki_users, ocal_files whre
  aiki_users.userid = ocal_files.upload_user

  exclude_tags — (What is this used for?) if aiki need file tags:

         aiki_tags (id INTEGER auto_increment, name VARCHAR(100))

         aiki_file_tags (id INTEGER auto_increment, fileid INTEGER,
  tagid INTEGER REFERENCES aiki_tags(id) )

_______________________________________________
Mailing list: https://launchpad.net/~aikiframework.admins
Post to     : aikiframework.admins@lists.launchpad.net
Unsubscribe : https://launchpad.net/~aikiframework.admins
More help   : https://help.launchpad.net/ListHelp

Reply via email to