Schema - Recent changes to Schema
http://wiclear.free.fr/feed.php?feed_type=rss_1&full_content=1&title=Schema&lang=en
Schema historySchema
http://wiclear.free.fr/index.php?title=Schema&mode=history_view&lang=en&id=48
<h3>Wiclear database schema</h3>
<p>
<img alt="schema" src="http://wiclear.free.fr/images/wiclear-schema.png" />
</p>
<p>
Here's the current schema.
</p>
<p>
I'll call a 'master content' a content written in the main language of the wiki.<br />
Those nodes are special as they are the one which define the parent relationship in the wiki.<br />
They are also referenced in the translation table.
</p>
<h4>table wc_lang</h4>
<p>
Contains lang declared in the wiki.
</p>
<h4>table wc_user</h4>
<p>
Contains users that have registered in the wiki.<br />
User id '1' is a special user. This is the anonymous user.
</p>
<h4>table wc_groups</h4>
<p>
Contains the group created by administrators via admin panel.<br />
Groups enables the creation of ACL.
</p>
<h4>table wc_user_group</h4>
<p>
Contains the list of user per group
</p>
<h4>table wc_content</h4>
<p>
Contains the content of the wiki.<br />
Content id '1' is a special node. this is the root of the wiki.
</p>
<h4>table wc_content_group</h4>
<p>
Contains the group authorized to edit a particular content.<br />
This is the ACL table.
</p>
<h4>table wc_content_user_email</h4>
<p>
Contains the user that watch a content.<br />
This is the notification table.
</p>
<h4>table wc_comment</h4>
<p>
contains the comment associated to a content.
</p>
<h4>table wc_history</h4>
<p>
Contains the history
</p>
<h4>table wc_content_hierarchy</h4>
<p>
Defines the relationship between the content.<br />
Only 'master content' get an entry there. Translations do not get one because they are linked to the translation.<br />
</p>
<p>
parent_content_fk/content_fk creates a parent relationship.<br />
(left_n/right_n) forms the nested set model. They get computed from the parent relationship and are here only to speed up recursive operations.
Basically, if you draw a tree like structure and perform a depth first tree exploration, with initially an integer n set to zero, then :
</p>
<ul>
<li> left_n is set to 'n' before performing the depth first tree exploration, n is incremented
</li><li> each time you reach a leaf you set left_n=n, you increment n, you set right_n=n and you increment n
</li><li> right_n is set to n after having performed depth first tree exploration, n is incremented
</li></ul>
<h4>table wc_content_lang</h4>
<p>
Defines that content_fk is related to related_content_fk.<br />
It defines the translation available.<br />
A 'master content' get an entry as well with content_fk=related_content_fk.<br />
</p>2005-02-09T22:27:08+01:00David JobetSchema
http://wiclear.free.fr/index.php?title=Schema&mode=history_view&lang=en&id=189
<h3>Wiclear database schema</h3>
<p>
<img alt="schema" src="http://wiclear.free.fr/images/wiclear-schema.png" />
</p>
<p>
Here's the current schema.
</p>
<ul>
<li> In black, the foreign keys lang_fk in relation with wc_lang.id
</li><li> In blue, the foreign keys user_fk in relation with wc_user.id
</li><li> In red, the foreign keys group_fk in relation with wc_groups.id
</li><li> In green, the foreign keys content_fk in relation with wc_content.id
</li></ul>
<p>
I'll call a 'master content' a content written in the main language of the wiki.<br />
Those nodes are special as they are the one which define the parent relationship in the wiki.<br />
They are also referenced in the translation table.
</p>
<h4>table wc_lang</h4>
<p>
Contains lang declared in the wiki.
</p>
<h4>table wc_user</h4>
<p>
Contains users that have registered in the wiki.<br />
User id '1' is a special user. This is the anonymous user.
</p>
<h4>table wc_groups</h4>
<p>
Contains the group created by administrators via admin panel.<br />
Groups enables the creation of ACL.
</p>
<h4>table wc_user_group</h4>
<p>
Contains the list of user per group
</p>
<h4>table wc_content</h4>
<p>
Contains the content of the wiki.<br />
Content id '1' is a special node. this is the root of the wiki.
</p>
<h4>table wc_content_group</h4>
<p>
Contains the group authorized to edit a particular content.<br />
This is the ACL table.
</p>
<h4>table wc_content_user_email</h4>
<p>
Contains the user that watch a content.<br />
This is the notification table.
</p>
<h4>table wc_comment</h4>
<p>
contains the comment associated to a content.
</p>
<h4>table wc_history</h4>
<p>
Contains the history
</p>
<h4>table wc_content_hierarchy</h4>
<p>
Defines the relationship between the content.<br />
Only 'master content' get an entry there. Translations do not get one because they are linked to the translation.<br />
</p>
<p>
parent_content_fk/content_fk creates a parent relationship.<br />
(left_n/right_n) forms the nested set model. They get computed from the parent relationship and are here only to speed up recursive operations.
Basically, if you draw a tree like structure and perform a depth first tree exploration, with initially an integer n set to zero, then :
</p>
<ul>
<li> left_n is set to 'n' before performing the depth first tree exploration, n is incremented
</li><li> each time you reach a leaf you set left_n=n, you increment n, you set right_n=n and you increment n
</li><li> right_n is set to n after having performed depth first tree exploration, n is incremented
</li></ul>
<h4>table wc_content_lang</h4>
<p>
Defines that content_fk is related to related_content_fk.<br />
It defines the translation available.<br />
A 'master content' get an entry as well with content_fk=related_content_fk.<br />
</p>2005-02-07T23:19:10+01:00David Jobet