Difference between revisions of "Metrics/Data Catalog"
(Created page with '<pre> mysql> desc simple; +-----------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default …') |
|||
Line 13: | Line 13: | ||
| license_version | varchar(16) | YES | | NULL | | | | license_version | varchar(16) | YES | | NULL | | | ||
+-----------------+--------------+------+-----+---------------------+----------------+ | +-----------------+--------------+------+-----+---------------------+----------------+ | ||
+ | |||
+ | CREATE TABLE `simple` ( | ||
+ | `id` int(11) NOT NULL auto_increment, | ||
+ | `license_uri` varchar(255) NOT NULL default '', | ||
+ | `search_engine` varchar(255) NOT NULL default '', | ||
+ | `count` int(11) NOT NULL default '0', | ||
+ | `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', | ||
+ | `jurisdiction` varchar(255) default NULL, | ||
+ | `license_type` varchar(16) default NULL, | ||
+ | `license_version` varchar(16) default NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `timestamp_index` (`timestamp`) | ||
+ | ); | ||
</pre> | </pre> | ||
Line 29: | Line 42: | ||
| language | varchar(255) | YES | | NULL | | | | language | varchar(255) | YES | | NULL | | | ||
+-------------------+--------------+------+-----+---------------------+----------------+ | +-------------------+--------------+------+-----+---------------------+----------------+ | ||
+ | |||
+ | CREATE TABLE `complex` ( | ||
+ | `id` int(11) NOT NULL auto_increment, | ||
+ | `license_specifier` varchar(255) NOT NULL default '', | ||
+ | `search_engine` varchar(255) NOT NULL default '', | ||
+ | `count` int(11) NOT NULL default '0', | ||
+ | `query` varchar(255) default NULL, | ||
+ | `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', | ||
+ | `country` varchar(255) default NULL, | ||
+ | `language` varchar(255) default NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | KEY `complex_timestamp_index` (`timestamp`) | ||
+ | ); | ||
+ | |||
</pre> | </pre> | ||
Line 44: | Line 71: | ||
| utc_time_stamp | datetime | NO | MUL | NULL | | | | utc_time_stamp | datetime | NO | MUL | NULL | | | ||
+----------------+--------------+------+-----+---------+----------------+ | +----------------+--------------+------+-----+---------+----------------+ | ||
+ | |||
+ | CREATE TABLE `site_specific` ( | ||
+ | `id` int(11) NOT NULL auto_increment, | ||
+ | `license_uri` varchar(255) NOT NULL, | ||
+ | `site` varchar(255) NOT NULL, | ||
+ | `count` int(11) NOT NULL, | ||
+ | `utc_time_stamp` datetime NOT NULL, | ||
+ | PRIMARY KEY (`id`), | ||
+ | UNIQUE KEY `utc_time_stamp` (`utc_time_stamp`,`license_uri`,`site`), | ||
+ | KEY `site_specific_timestamp_index` (`utc_time_stamp`) | ||
+ | ); | ||
</pre> | </pre> |
Revision as of 19:14, 9 March 2010
mysql> desc simple; +-----------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------------------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | license_uri | varchar(255) | NO | | | | | search_engine | varchar(255) | NO | | | | | count | int(11) | NO | | 0 | | | timestamp | datetime | NO | MUL | 0000-00-00 00:00:00 | | | jurisdiction | varchar(255) | YES | | NULL | | | license_type | varchar(16) | YES | | NULL | | | license_version | varchar(16) | YES | | NULL | | +-----------------+--------------+------+-----+---------------------+----------------+ CREATE TABLE `simple` ( `id` int(11) NOT NULL auto_increment, `license_uri` varchar(255) NOT NULL default '', `search_engine` varchar(255) NOT NULL default '', `count` int(11) NOT NULL default '0', `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', `jurisdiction` varchar(255) default NULL, `license_type` varchar(16) default NULL, `license_version` varchar(16) default NULL, PRIMARY KEY (`id`), KEY `timestamp_index` (`timestamp`) );
mysql> desc complex; +-------------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------+--------------+------+-----+---------------------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | license_specifier | varchar(255) | NO | | | | | search_engine | varchar(255) | NO | | | | | count | int(11) | NO | | 0 | | | query | varchar(255) | YES | | NULL | | | timestamp | datetime | NO | MUL | 0000-00-00 00:00:00 | | | country | varchar(255) | YES | | NULL | | | language | varchar(255) | YES | | NULL | | +-------------------+--------------+------+-----+---------------------+----------------+ CREATE TABLE `complex` ( `id` int(11) NOT NULL auto_increment, `license_specifier` varchar(255) NOT NULL default '', `search_engine` varchar(255) NOT NULL default '', `count` int(11) NOT NULL default '0', `query` varchar(255) default NULL, `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', `country` varchar(255) default NULL, `language` varchar(255) default NULL, PRIMARY KEY (`id`), KEY `complex_timestamp_index` (`timestamp`) );
mysql> desc site_specific; +----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | license_uri | varchar(255) | NO | | NULL | | | site | varchar(255) | NO | | NULL | | | count | int(11) | NO | | NULL | | | utc_time_stamp | datetime | NO | MUL | NULL | | +----------------+--------------+------+-----+---------+----------------+ CREATE TABLE `site_specific` ( `id` int(11) NOT NULL auto_increment, `license_uri` varchar(255) NOT NULL, `site` varchar(255) NOT NULL, `count` int(11) NOT NULL, `utc_time_stamp` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `utc_time_stamp` (`utc_time_stamp`,`license_uri`,`site`), KEY `site_specific_timestamp_index` (`utc_time_stamp`) );