GMOD_MATERIALIZED_VIEW_TOOL(1p) | User Contributed Perl Documentation | GMOD_MATERIALIZED_VIEW_TOOL(1p) |
gmod_materialized_view_tool.pl - a tool for creating and mangaing materialized views for Chado.
% gmod_materialized_view_tool.pl [options]
--create_view Guides user through creating a MV --update_view viewname Refreshes data in named MV --automatic Refreshes data in all MV that are out of date --dematerialize viewname Creates a true view, removing the MV --dbprofile profilename DB profile options to use (default is 'default') --list Gives a list of MV --status Gives the status of all MV --view_name Name of the view to be created --table_name Schema qualified name of the table --refresh_time Frequency at which the view should be updated --column_def List of columns with types --sql_query Select query to define table contents --index_fields List of fields to build indexes on --special_index SQL to create special indexes --yes Assume yes to any yes/no question --help Prints this documentation and quits
Note that the options can be shortened. For example, '--de' is an acceptable shortening of --dematerialize. For options that have a unique first letter, the short (single hyphened) version of the option may be used, like '-a' for --automatic.
WARNING: This script creates a rather large security hole that could result in data loss. Users could easily enter SQL queries through this interface that could damage your database.
This tool provides several useful functions for creating and maintaining materialized views (MV) in a Chado schema. A materialized view is simple a (real) database table that has been created and contains data from a collection of other tables. It is like a view, only because it materialized, it can be indexed and searches on it will go much faster than on database views. There are at least two down sides to MVs:
When constructing the SELECT clause, the names of the columns selected must match the names of the columns in the materalized view. For example, if the names of the columns are feature_id and name, but the columns being selected are feature_id and uniquename, you must use the "AS" option to rename the resulting column, like:
SELECT feature_id, uniquename AS name ...
If you don't do this, the affected column in the resulting table will be empty.
The following options are provided to allow the creation of materialized views in a non-interactive way. If any of the below flags are omitted, you will be prompted for the appropriate values.
Chris Carpita <ccarpita at gmail dot com>, with some minor additions and GMOD specific alterations from Scott Cain <cain@cshl.edu>.
Copyright (c) 2007
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2019-12-05 | perl v5.30.0 |