[katello-devel] Candlepin ER diagram, foreign keys in katello db

Lukas Zapletal lzap at redhat.com
Wed Jan 18 08:00:45 UTC 2012


Hey,

1) http://lzap.fedorapeople.org/temp/ERD.pdf - generated this morning
for you using http://rails-erd.rubyforge.org

2) Theres a long term discussion in the Rails community to use or not to
use foreign keys. On the one side they are useless and they can only
make error reporting worse, since everything is already defined in Rails
models. Constraints, cascade rules, everything you need. On the other
hand database could possible be inconsistent if we make a mistake.

I think it could be good idea to try one of those plugins and try to
enable them before any release. It's easier to remove them then to add
them with production data.

LZ

On Tue, Jan 17, 2012 at 11:46:19PM +0100, Martin Bacovsky wrote:
> Hi,
> 
> I wanted better to understand relations among entities in Candlepin
> and Katello and I thought ERD would help me.
> 
> I created one for Candlepin (preview in here [1]) feel free to use it.
> 
> When I tried to do the same for katello DB I found out that the DB
> does not have any Foreign keys set at all. I know it is RoR's
> default, but I was curious if it is really intentional in Katello
> project. As I'm relatively new to RoR I looked for some info. I
> liked [2] and it seems there are some projects with bad experience
> with keeping data integrity just in Rails.
> 
> So I just wanted to know if this is known issue and if it an issue at all.
> 
> Cheers,
> Martin
> 
> 
> [1] http://mbacovsk.fedorapeople.org/candlepin.png
> [2] http://blog.weiskotten.com/2008/01/you-should-use-foreign-key-constraints-in-rails.html
> 
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel

-- 
Later,

 Lukas Zapletal | E32E400A
 RHN Satellite Engineering
 Red Hat Czech s.r.o. Brno




More information about the katello-devel mailing list