545200dd22
As the events API gets fleshed out and more robust, it will become increasingly necessary to ensure that the database schema modeling events has the ability to quickly retrieve a list of event types. With the current schema having a foreign key from event to unique_name (the monolithic generic string key lookup table), in order to get a simple list of event types, one needs to do the following: SELECT DISTINCT e.unique_name FROM event; Not only is this inefficient, but the readability of the model and database schema suffers from the generalization of the unique name field relationship. With this patch, a new event_type table is added to the schema to allow for quick and easy lookups of event types like so: SELECT id, desc FROM event_type; This will lead to future ability to categorize event types with ease. Instead of adding columns to the monolithic unique_name table, we would only need to add a foreign key relationship to the new event_type table tying the event_type to a future event_type_class table... This patch also renames "event_name" to "event_type" everywhere to avoid confusion. Change-Id: I6e630ec534f16ba1bb9370d1859ae7640fc6b05b Partial-Bug: 1211015 |
||
---|---|---|
.. | ||
sqlalchemy | ||
__init__.py | ||
test_base.py | ||
test_get_engine.py | ||
test_impl_hbase.py | ||
test_impl_log.py | ||
test_impl_mongodb.py | ||
test_impl_sqlalchemy.py | ||
test_models.py | ||
test_storage_scenarios.py |