Dashboard > Maintain > Attic > Question regarding Maintain 2.4.1 database structure
Maintain Log In   View a printable version of the current page.
Question regarding Maintain 2.4.1 database structure
Added by Leslie Arvin, last edited by Frederic Wenzel on Sep 05, 2006  (view change)
Labels: 
(None)

At the request of Brandon Philips I am documenting our IRC chat discussion from the afternoon of 09/20/2004 regarding the database structure of Maintain 2.4.1. (I hope you can read it.)

The attached GIF diagram was created using Visio 2002 Professional SR-1 with the ODBC Generic Driver and MySQL ODBC 3.51 Driver. The original .vsd file is available upon request.

My goal when diagramming the database was to map the relationships between the database tables and fields. Therefore, I took my best guess at which fields would be defined as Foreign Keys if the version of MySQL the database were designed in supported foreign keys. Any suggested or recommended corrections would be appreciated.

I chose displaying the "portable data type" of fields rather than the "physical data type (ODBC Generic Driver)". Neither choice perfectly reflected the database field definitions.

I chose not to display names for the relationships between fields because the diagram gets too messy. But the relationships are defined in the Visio file (again, my best guess).

The Visio file is designed to print on 11 x 17 inch paper. The GIF file it produced was the largest possible in my version of Visio so it could be readable on a monitor or on the web. I apologize for the inconvenience.

FWIW, I am still determining what some of the files on the right with no relationships are for (object_option, object_history, does ip_blocks have a relationship to other tables or is it used only by the web for bounds checking?). And we're currently investigating the DHCP tables so those might be incompletely diagrammed.

Hope this is useful to someone.

Relevant edited excerpts from IRC chat 09/20/2004:
=-=     Topic for #maintain was set by philips on 09/07/04 16:31:02\\
        *purdue-arvin*    philips: How is domain.master_domain used? Is it a boolean value, or id of the parent domain for the given domain?\\

        *philips* purdue-arvin: master_domain is the domain aboves id. So if you are making a domain called foo.bar.com and you want it to be a subdomain of bar.com you would put in bar.coms id\\
        

        *purdue-arvin*    How is the pointer table associated with hosts? I am trying to diagram the database in Visio. Are both the ip and hostname fields "foreign keys" to the host table?\\
        *philips* purdue-arvin: the host is a "foreign key" (although not enforced by the MyISAM tables of MySQL). The IP is the ip of the forward pointer set by the user.\\
        *philips* And of course all of that is reversed for reverse pointers ;-)\\


        *purdue-arvin*    What are workgroups? Are these Microsoft workgroups or something else?\\
        *philips* purdue-arvin: DHCP groups, man dhcpd.conf for more information\\
        *philips* http://linux.com.hk/PenguinWeb/manpage.jsp?name=dhcpd.conf&section=5 \\
        *philips* basically just a collection of hosts with common DHCP options \\

        *purdue-arvin*    What is the private_users table used for?\\
        *philips* I don't know if that is a maintain table... I don't see it\\
        *philips* btw, although this schema isn't identical to the current Maintain layout it may help a bit... https://svn.osuosl.org/public/maintain/trunk/server/database/maintain3.clay\\
        *philips* It was designed using the Clay modelling tool for eclipse\\
        *purdue-arvin*    It's created in install/sql/maintain_modules.sql.\\
        *philips* http://www.azzurri.jp/en/software/clay/index.jsp\\
        *purdue-arvin*    Thanks.\\
        *philips* The one above actually is graphed out in a useful way though ;-)\\
        *purdue-arvin*    What's the difference between host_history and object_history? Did you start with host_history and decide to migrate to object_history?\\
        *philips* host_history is poorly named... it is a dumping ground for IP's that this MAC has had in the past (placed there by bin/rtr-log-extract and bin/dhcp-log-extract)\\
        *philips* object_history is like a changelog and is written too whenever an object is updated\\

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.7 Build:#524 Jul 28, 2006) - Bug/feature request - Contact Administrators