Wiki source for WikkaPhysicalDataModel


Show raw source

=====Wikka Physical Data Model=====

>>See also:
~-WikkaTableStructure
~-WikkaLogicalDataModel
~-WikkaResources
>>In order to understand how Wikka stores and retrieves its data it would be helpful to have a model of the database - so I set out to create one.

===Creating the model===
With the nice **DB Designer 4** tool from [[http://fabforce.net/ | fabFORCE.net]] one can "reverse engineer" a model directly from the data base quite easily. That worked well provided I didn't let it try to guess relationships: data names and keys just don't make this possible. So then I started to model the relationships in the tool ... and ran into some problems: not all tables have a primary key, and in some cases there is no primary key to match up with a foreign key. In other words: I could not draw all the lines. That also implies the code does some of what the database could do.

Now while older versions of MySQL don't support foreign keys, with the current physical model it's not even **possible** to store the relationships that way without actually changing the table structure. Not that it doesn't work - Wikka very obviously does work - but it's possible that with a cleaner physical data structure Wikka might be even more efficient than it is already.

So apart from documenting the current physical data model, I also spent some time creating a (half-way) **logical data model** to show what I think the structure actually should be, and which (I think) clarifies the data structure and how it functions better than the actual physical model. This (somewhat) **logical data model** can be found on its own WikkaLogicalDataModel page. You may want to look at that to better understand what the data model below //actually represents//.

===The current physical data model===
Below is a (slightly reduced) image of the physical data model. In the downloads section below you'll find a download link for the full-size image.

{{image src="images/models/physical_current_s.png" alt="physical model of Wikka's database showing the various tables and their relationships"}}

===Downloads===
You can also download a {{files download="physical_current_x.png" text="full-size version of the image"}}.

If you're interested in a more detailed look at the model, you can download {{files download="physical_current.xml" text="the XML file with the model"}} that you can load into **[[http://www.fabforce.net/dbdesigner4/ | DB Designer 4]]**: it's a free application that is available for Windows and Linux, and released under GPL: well worth a look.

--JavaWoman

----
CategoryWikkaArchitecture
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki