[katello-devel] key-value pairs for objects in katello db
Ohad Levy
ohadlevy at redhat.com
Wed Aug 15 13:32:24 UTC 2012
On 08/15/2012 04:26 PM, Tom McKay wrote:
>
> One of the design tasks for this sprint is to come up with a way to associate key-value pairs to systems and subscriptions. This would be similar to the system facts that exist. It would be nice to allow these pairs to exist on other objects now or in the future as well (eg. activation keys).
>
> Question: What is the best way to model this in the katello db? Joins or something?
in foreman, we have 3 tables
hosts
fact name
fact value
and fact value is basically the join
fact_value
id, host_id, fact_name_id, value
you could easily turn this into a polymorphic relationship (so instead
of host_id you have obj_id and obj_type)
however, I think that fact_name table might have created a performance
degradation and if I'll do it again, i might just put the key next to
the value.
Ohad
>
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
>
More information about the katello-devel
mailing list