Skip to content

Commit

Permalink
Progress in DB definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Aubert committed Jun 23, 2010
1 parent e67f0e8 commit 631c49d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Questions.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,7 @@
1) Products and Formats 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). 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)
25 changes: 19 additions & 6 deletions sql/create_rodd_mysql.sql
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ CREATE SCHEMA IF NOT EXISTS rodd;


USE 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 all tables


DROP TABLE if EXISTS products; DROP TABLE if EXISTS products;
Expand Down Expand Up @@ -33,13 +36,12 @@ CREATE TABLE IF NOT EXISTS products (
hrpt_dir BOOLEAN DEFAULT FALSE, hrpt_dir BOOLEAN DEFAULT FALSE,
filesize VARCHAR(1024), filesize VARCHAR(1024),
oicd VARCHAR(256), oicd VARCHAR(256),
formats VARCHAR(512),
frequency VARCHAR(256), frequency VARCHAR(256),
instrument VARCHAR(512), instrument VARCHAR(512),
link VARCHAR(1024), link VARCHAR(1024),
regularExpr VARCHAR(1024), regularExpr VARCHAR(1024),
namingConvention VARCHAR(1024), namingConvention VARCHAR(1024),
orbitType VARCHAR(256), orbitType INTEGER,
parameter VARCHAR(256), parameter VARCHAR(256),
provider VARCHAR(256), provider VARCHAR(256),
referenceFile VARCHAR(512), referenceFile VARCHAR(512),
Expand All @@ -49,16 +51,17 @@ CREATE TABLE IF NOT EXISTS products (
status VARCHAR(256) status VARCHAR(256)
); );


-- products formats -- products formats to link the formats and the products
CREATE TABLE IF NOT EXISTS products_formats ( CREATE TABLE IF NOT EXISTS products_formats (
roddID INTEGER PRIMARY KEY, roddID INTEGER PRIMARY KEY,
formatTypeID INTEGER formatTypeID INTEGER
); );


-- format type
CREATE TABLE IF NOT EXISTS format_type ( CREATE TABLE IF NOT EXISTS format_type (
formatTypeID INTEGER AUTO_INCREMENT PRIMARY KEY, formatTypeID INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(256), name VARCHAR(256),
description VARCHAR(1024), description VARCHAR(1024)
); );


-- insert the different format types -- insert the different format types
Expand All @@ -84,7 +87,17 @@ INSERT into format_type (name) values("NetCDF");
INSERT into format_type (name) values("PFS"); INSERT into format_type (name) values("PFS");
INSERT into format_type (name) values("PNG"); INSERT into format_type (name) values("PNG");
INSERT into format_type (name) values("Shape"); 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


10 changes: 7 additions & 3 deletions sql/t.sql
Original file line number Original file line Diff line number Diff line change
@@ -1,12 +1,16 @@
use rodd; use rodd;


DROP TABLE IF EXISTS format_type; 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 ( CREATE TABLE IF NOT EXISTS format_type (
formatTypeID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, formatTypeID INTEGER AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(256), name VARCHAR(256),
description VARCHAR(1024) description VARCHAR(1024)
-- PRIMARY KEY(formatTypeID)
); );

0 comments on commit 631c49d

Please sign in to comment.