Permalink
Browse files

Progress in DB definition

  • Loading branch information...
1 parent e67f0e8 commit 631c49da9d752a4f6bb7730beadc262edc9fc8ef Guillaume Aubert committed Jun 23, 2010
Showing with 30 additions and 9 deletions.
  1. +4 −0 Questions.txt
  2. +19 −6 sql/create_rodd_mysql.sql
  3. +7 −3 sql/t.sql
View
@@ -1,3 +1,7 @@
1) Products and Formats
In the table product a product can have multiple formats. This will result in having multiple files of the same product in different format being disseminated. Maybe the same product with 2 different format should be described as 2 different products (easier to distinguish for the dissemination).
+
+2) filesizes
+
+What does it mean 700KB, 700KB (repetition of twice the same info)
View
@@ -4,6 +4,9 @@ CREATE SCHEMA IF NOT EXISTS rodd;
USE RODD;
+-- GRANT ALL PRIVILEGES on rodd.* to 'rodd@localhost' IDENTIFIED BY 'ddor';
+-- GRANT ALL PRIVILEGES on rodd.* to 'rodd@localhost.localdomain' IDENTIFIED BY 'ddor';
+
-- Drop all tables
DROP TABLE if EXISTS products;
@@ -33,13 +36,12 @@ CREATE TABLE IF NOT EXISTS products (
hrpt_dir BOOLEAN DEFAULT FALSE,
filesize VARCHAR(1024),
oicd VARCHAR(256),
- formats VARCHAR(512),
frequency VARCHAR(256),
instrument VARCHAR(512),
link VARCHAR(1024),
regularExpr VARCHAR(1024),
namingConvention VARCHAR(1024),
- orbitType VARCHAR(256),
+ orbitType INTEGER,
parameter VARCHAR(256),
provider VARCHAR(256),
referenceFile VARCHAR(512),
@@ -49,16 +51,17 @@ CREATE TABLE IF NOT EXISTS products (
status VARCHAR(256)
);
--- products formats
+-- products formats to link the formats and the products
CREATE TABLE IF NOT EXISTS products_formats (
roddID INTEGER PRIMARY KEY,
formatTypeID INTEGER
);
+-- format type
CREATE TABLE IF NOT EXISTS format_type (
formatTypeID INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(256),
- description VARCHAR(1024),
+ description VARCHAR(1024)
);
-- insert the different format types
@@ -84,7 +87,17 @@ INSERT into format_type (name) values("NetCDF");
INSERT into format_type (name) values("PFS");
INSERT into format_type (name) values("PNG");
INSERT into format_type (name) values("Shape");
-INSERT into format_type (name) values("WMO GTS in LRIT");
+INSERT into format_type (name,description) values("LRIT-WMO","WMO GTS in LRIT");
+
+-- orbit type
+CREATE TABLE IF NOT EXISTS orbit_type (
+ orbitID INTEGER AUTO_INCREMENT PRIMARY KEY,
+ name VARCHAR(256),
+);
+
+INSERT into orbit_type (name) values("LEO");
+INSERT into orbit_type (name) values("GEO");
--- orbitType, status, instrument, frequency, formats should be expressed differently
+-- status, instrument, frequency, should be expressed differently
+-- for frequency, it will be very difficult
View
@@ -1,12 +1,16 @@
use rodd;
DROP TABLE IF EXISTS format_type;
+DROP TABLE IF EXISTS products_formats;
+CREATE TABLE IF NOT EXISTS products_formats (
+ roddID INTEGER PRIMARY KEY,
+ formatTypeID INTEGER
+);
+
CREATE TABLE IF NOT EXISTS format_type (
- formatTypeID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ formatTypeID INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(256),
description VARCHAR(1024)
--- PRIMARY KEY(formatTypeID)
);
-

0 comments on commit 631c49d

Please sign in to comment.