Database Documentation
Added by Diego Felipe over 13 years ago
Is there any document about the database?
I am thinking about build a data warehouse over the Redmine DB.
I gave a rapid look at the tables and columns and although most of them are clearly understandable, there some columns and tables that are meaningless to me. Most part because of their names (abbreviations in general).
Thanks.
Replies (17)
RE: Database Documentation
-
Added by Diego Felipe over 13 years ago
I will post all my doubts here, hoping someone can answer me.
First:
For what does the project_id column and parent_id column at the enumerations table serve?
For every value there, this columns are always null.
RE: Database Documentation
-
Added by Diego Felipe over 13 years ago
Second:
where does the group_id column, at the table groups_users, come from?
There is no such groups table.
RE: Database Documentation
-
Added by Holger Just over 13 years ago
Diego Felipe wrote:
For what does the project_id column and parent_id column at the enumerations table serve?
For every value there, this columns are always null.
They are not used currently.
where does the group_id column, at the table groups_users, come from?
This table connects users and groups (which are both types of principals and thus saved inside this table). The table is referenced in the group model in the has_and_belongs_to_many
relation
To understand Redmine's datamodel, you should probably better look at the model classes in app/models
. These correspond to the database tables. Also, you should read about how Rails handles model references (and the assumed defaults) as well as about the concept of Single Table Inheritance (STI).
RE: Database Documentation
-
Added by Diego Felipe over 13 years ago
Thanks Holger, I will follow your advice.
I took a small look in what you advised and, as far as I understood, the models which inherit ActiveRecords have their attributes from the correspondent table in the database.
So to understand attributes, I still have to look at the database.
Other questions:
What does the columns 'rft' and 'rgt' in the tables projects and issues mean?
What does the column 'tls' in the table auth_sources mean?
RE: Database Documentation
-
Added by Marco Gutsche over 13 years ago
Diego Felipe wrote:
What does the columns 'rft' and 'rgt' in the tables projects and issues mean?
They are order in a nested set through these columns (http://dev.mysql.com/tech-resources/articles/hierarchical-data.html).
RE: Database Documentation
-
Added by Diego Felipe over 13 years ago
I made the diagram.
But someone could please tell how to edit the wiki page so i can display a thumnail instead of the full image?
Take a look
RE: Database Documentation
-
Added by Mischa The Evil over 13 years ago
See also this outdated but valueable document: http://theadmin.org/articles/2008/11/24/redmine-railroaded-model-and-controller-diagrams/.
RE: Database Documentation
-
Added by Mischa The Evil over 13 years ago
Diego Felipe wrote:
But someone could please tell how to edit the wiki page so i can display a thumnail instead of the full image?
Take a look
Thanks for adding DatabaseModel...
I have updated the page according to your request (and some more :). You can take a look at the source of version 2 of DatabaseModel to see how I've " thumbnailed " the large image using the formatter-native options... Redmine doesn't provide such functionality yet.
RE: Database Documentation
-
Added by Jean-Philippe Lang over 13 years ago
I have replaced the png with lightweight ones (256 colors should be enough).
The diagram is not up to date, please specify the stable version (and revision) it is based on and rename the file accordingly (eg. model-1.0.x.png
).
Thanks.
RE: Database Documentation
-
Added by nancyd589 nancyd589 over 13 years ago
...Spam removed by Mischa The Evil...
RE: Database Documentation
-
Added by Diego Felipe over 13 years ago
Jean-Philippe Lang wrote:
I have replaced the png with lightweight ones (256 colors should be enough).
The diagram is not up to date, please specify the stable version (and revision) it is based on and rename the file accordingly (eg.model-1.0.x.png
).Thanks.
I updated the wiki with your request, but I don't know how to remove the old png files.
Mischa The Evil wrote:
See also this outdated but valueable document: http://theadmin.org/articles/2008/11/24/redmine-railroaded-model-and-controller-diagrams/.
This will be very helpful, thanks.
And thanks again for the wiki revision.
RE: Database Documentation
-
Added by Mischa The Evil over 13 years ago
Diego Felipe wrote:
[...] but I don't know how to remove the old png files.
Done... (I've also fixed the link to the full image in version 6 of the page)
RE: Database Documentation
-
Added by Mischa The Evil almost 13 years ago
To whom it may concern: I recently tested some IDE's including a trial of Jetbrains RubyMine (I admit: I really like that name ;). One of the features included is an option to fully-automatically create Entity Relationship Diagrams of a Rails app. In RubyMine that's called a model dependency diagram.
I was able to create a semi-usable png of the current Redmine trunk at r7639. Semi-usable because its size is overwhelming. You'll need to zoom-in, and thus scroll, a lot to navigate through the diagram.
For those interested, I've uploaded it to my MediaFire-account: http://www.mediafire.com/?s0tv1m68h866884.
RE: Database Documentation
-
Added by Ryan Parker almost 13 years ago
<spam removed by Mischa The Evil>
RE: Database Documentation
-
Added by Hugo da Silva da Silva almost 4 years ago
hi guys,
Could anybody help me map the values of status
column from projects
table? That column has only values and I could't find any domain table having the status names.
Thanks in advance for you attention.
RE: Database Documentation
-
Added by Bernhard Rohloff almost 4 years ago
Hugo da Silva da Silva wrote:
hi guys,
Could anybody help me map the values of
status
column fromprojects
table? That column has only values and I could't find any domain table having the status names.Thanks in advance for you attention.
They aren't stored in the database. You can find the values in ./app/helpers/admin_helper.rb