Skip to content

Commit

Permalink
Maddavo data
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Dec 31, 2014
1 parent 314a383 commit b521578
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 19 deletions.
51 changes: 51 additions & 0 deletions data/Station.csv
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,13 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Arexe','Janes Horizons',0,'?','?'
'Ariameni','Landsteiner City',0,'?','?'
'Ariameni','Patrick Enterprise',0,'?','?'
'Arigens','Dummer Orbital',0,'?','?'
'Arigens','Ordway Ring',0,'?','?'
'Aritimi','Armstrong Dock',2100,'?','?'
'Aritimi','Griggs Hub',0,'?','?'
'Aritimi','Huygens Port',2100,'?','?'
'Aritimi','Padalka Orbital',2100,'?','?'
'Arngin','Elst Port',0,'?','?'
'Arouca','Shipton Orbital',0,'?','?'
'Arro Naga','Gillekens Gateway',0,'?','?'
'Aruagea','Hornby Colony',14482,'?','?'
Expand Down Expand Up @@ -259,6 +262,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Ayethi','Brislingholm',379,'Y','L'
'Ayethi','Muninn''s Nest',280,'N','L'
'Ayethi','Pacheco City',665,'Y','M'
'AZ Cancri','Fisher Station',0,'?','?'
'Azaladshu','Goddard Outpost',0,'?','?'
'Aztlan','Tannhauser Gate',0,'?','?'
'b2 Carinae','Dixon Ring',38136,'?','L'
Expand Down Expand Up @@ -362,6 +366,8 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Bhil Mina','Thuot Port',0,'?','?'
'Bhil Mina','Zholobov Terminal',0,'?','?'
'bhodha','Harawi Terminal',0,'?','L'
'Bhotega','Savitskaya Ring',0,'?','?'
'Bhotega','Voss Ring',0,'?','?'
'Bhritzameno','Dalton City',1920,'?','M'
'Bhritzameno','Feynman Terminal',1382,'Y','L'
'Biamoana','Artyukhin Port',0,'?','M'
Expand All @@ -377,6 +383,8 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Bobadzihozo','Bolkow Colony',0,'?','?'
'Bodb Dearg','Qushji Landing',0,'?','?'
'Bolg','Moxon''s Mojo',0,'?','?'
'Bonitou','Hughes-Fulford Terminal',0,'?','?'
'Bonitou','Lyakhov City',0,'?','?'
'Borasetani','Hodgson Vision',0,'?','?'
'Borasetani','Katzenstein Terminal',0,'?','?'
'Borr','Armstrong City',0,'?','?'
Expand Down Expand Up @@ -405,6 +413,8 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Bunda','Walz Dock',617,'N','M'
'Bunuvivia','Ellison Enterprise',1028,'Y','L'
'Bunuvivia','Greenland City',1444,'Y','M'
'Caelinus','Moorcock Co-Operative',0,'?','?'
'Caelinus','Tokubei Port',0,'?','?'
'Caerus','Whymper City',0,'?','?'
'Calor','Cleave Refinery',28,'Y','M'
'Calor','Julian Hub',21,'Y','L'
Expand Down Expand Up @@ -479,6 +489,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Chimba','Hurley Port',0,'?','?'
'Chimba','Nikolayev Hub',0,'?','?'
'Chimba','Thornton Hub',0,'?','?'
'Chnouk','Van Scyoc Horizons',0,'?','?'
'Chnumandr','Weston Relay',0,'?','?'
'Chongquan','Eisele Park',0,'?','?'
'Chotec','Davis Dock',0,'?','?'
Expand Down Expand Up @@ -631,6 +642,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Eravate','Russell Ring',99,'N','L'
'Eravate','Sylvester City',495,'N','M'
'Erlik','Reynolds Terminal',0,'?','M'
'Eshu','Shajn Terminal',0,'?','?'
'Eta Cassiopeiae','Angus Manwaring',813,'?','L'
'Eta Cassiopeiae','J.F.Kennedy',923,'?','L'
'Eta Cassiopeiae','Morgue''s Mortuary',2528,'?','L'
Expand Down Expand Up @@ -709,6 +721,8 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Gabraceni','Ahern Ring',335,'N','L'
'Gabraceni','Hughes Market',195,'Y','L'
'Gabraceni','Stanley Station',195,'N','L'
'Gamma Coronae Austrinae','Linteris Port',0,'?','?'
'Gamma Coronae Austrinae','Shuttleworth Hub',0,'?','?'
'Gamma Doradus','Wang City',40000,'?','?'
'Gamma Mensae','Koch Installation',0,'?','M'
'GAT 2','Thompson Vision',19498,'N','?'
Expand Down Expand Up @@ -753,6 +767,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Groombridge 1618','Gernsback Terminal',0,'?','?'
'Groombridge 1618','Martinez Market',0,'?','?'
'Groombridge 34','Ford City',0,'?','?'
'Groombridge 34','Jones Estate',0,'?','?'
'Guangul','Laue''s Claim',0,'?','?'
'Guaras','Doi Colony',0,'?','?'
'Guaras','Hawley Port',0,'?','?'
Expand Down Expand Up @@ -806,6 +821,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Hemaki','Coriolis',0,'?','?'
'Hemaki','Kizim',0,'?','?'
'Herengul','Shapley Horizons',0,'?','?'
'Herthans','Lavochkin Station',0,'?','?'
'Heru','Caselberg''s Claim',1303,'?','M'
'Heveri','Birdseye Enterprise',0,'?','?'
'Heveri','Davy Terminal',0,'?','?'
Expand Down Expand Up @@ -980,6 +996,9 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Katuri','Shiras Port',240,'N','L'
'Katuri','Stjepan Seljan Port',391,'N','L'
'Kaurawish','Kooi Hub',0,'?','?'
'Kaus Borealis','Blalock Terminal',0,'?','?'
'Kaus Borealis','Libby Port',0,'?','?'
'Kaus Borealis','Manakov Enterprise',0,'?','?'
'Kebel Yeh','Ohm Orbital',0,'?','?'
'Keiadjara','Brown Hub',0,'?','?'
'Keian Gu','Zhigang Platform',0,'?','?'
Expand Down Expand Up @@ -1007,6 +1026,12 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Komovoy','Gentle Dock',0,'?','?'
'Koraj','England Terminal',513,'N','M'
'Koraj','Leonov Terminal',392,'Y','M'
'Korovii','Aleksandrov Orbital',0,'?','?'
'Korovii','Casper Ring',0,'?','?'
'Korovii','Clervoy Gateway',0,'?','?'
'Korovii','England Terminal',0,'?','?'
'Korovii','Moore Gateway',0,'?','?'
'Korovii','Redi Gateway',0,'?','?'
'Korubu','Markov Gateway',0,'?','?'
'Kosena','Gwynn Enterprise',0,'?','?'
'Kotaition','Bykovsky Vision',0,'?','?'
Expand Down Expand Up @@ -1059,6 +1084,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Lave','Castellan Station',45,'?','?'
'Lave','Lave Station',303,'?','?'
'Lave','Warinus',863,'?','?'
'LAWD 52','Coles Gateway',0,'?','?'
'LAWD 52','Guerrero Horizons',0,'?','?'
'LAWD 52','Leichhardt Enterprise',0,'?','?'
'LDS 2314','McDonald Colony',0,'?','?'
Expand Down Expand Up @@ -1455,6 +1481,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Lugh','Seega Port',0,'?','?'
'Luhman 16','Heisenberg Colony',14,'N','M'
'Luhman 16','Jenner Orbital',10,'Y','M'
'Lumanata','Matthaus Olbers Colony',0,'?','?'
'Luyten 674-15','Sinclair Relay',0,'?','?'
'Luyten''s Star','Ashby City',0,'?','?'
'Luyten''s Star','Still Outpost',0,'?','?'
Expand Down Expand Up @@ -1503,6 +1530,14 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Mebekre','West Mines',0,'?','?'
'Medusa','Kopra City',0,'?','?'
'Mehua','Bennett Port',0,'?','?'
'Meidubi','Arkwright City',0,'?','?'
'Meidubi','Carson Orbital',0,'?','?'
'Meidubi','Dzhanibekov Ring',0,'?','?'
'Meidubi','Frimout Port',0,'?','?'
'Meidubi','Jenner Orbital',0,'?','?'
'Meidubi','Leavitt Hub',0,'?','?'
'Meidubi','Metcalf City',0,'?','?'
'Meidubi','Sullivan Dock',0,'?','?'
'Melcior','Goddard Dock',0,'?','?'
'Meliae','Shawl Beacon',0,'?','?'
'Meliae','Whitson Hub',0,'?','?'
Expand Down Expand Up @@ -1541,6 +1576,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Mopanyane','Pangborn Dock',0,'?','?'
'Morgor','Romanek''s Folly',0,'?','?'
'Moroecani','La Cosa Dock',0,'?','?'
'Moros','Dana Port',0,'?','?'
'Moros','Ellis Port',0,'?','?'
'Moros','Tesla Depot',0,'?','?'
'Mu Nora','Virts Port',0,'?','?'
Expand All @@ -1567,10 +1603,12 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Nandjalato','Tereshkova Colony',759,'N','M'
'Nang Ta-khian','Hay Point',0,'?','?'
'Nangkano','Sarafanov Hub',0,'?','?'
'Narasimha','Mendel Survey',0,'?','?'
'Narim','Hamuy Colony',0,'?','?'
'Narim','Pond Vision',0,'?','?'
'Neganhot','Gardner Settlement',0,'?','?'
'Neganhot','He Landing',0,'?','?'
'Neritus','Toll Ring',0,'?','?'
'Neto','Citroen Hub',0,'?','?'
'Neto','Ising Vision',666,'N','L'
'Nevermore','Borel Enterprise',0,'?','L'
Expand Down Expand Up @@ -1723,6 +1761,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Percunceni','Reid Vision',310,'N','M'
'Perendi','Shepherd Installation',0,'?','?'
'Phi Eridani','Hill Survey',0,'?','?'
'Phiagre','Greeboski''s Outpost',0,'?','?'
'Pi Piscis Austrini','Al-Kashi Terminal',96000,'?','?'
'Pi Piscis Austrini','Farghani Hub',96000,'?','?'
'Pi Piscis Austrini','Farghanihub',96000,'?','?'
Expand Down Expand Up @@ -1771,6 +1810,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Rakapila','Stone Enterprise',0,'?','?'
'Rangchan','Boole Ring',0,'?','?'
'Rangchan','Bradbury Station',0,'?','?'
'Rapa Bao','Flagg Gateway',0,'?','?'
'Rasalhague','Galvani Station',0,'?','M'
'Rasalhague','Kidman Terminal',0,'?','M'
'Rasalhague','Vasyutin Dock',291,'Y','L'
Expand Down Expand Up @@ -1894,6 +1934,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Shouvul','Dutton Enterprise',0,'?','?'
'Sibil','Salpeter Vision',0,'?','?'
'Sibil','Very Station',0,'?','?'
'Sicuncheim','Draper Market',0,'?','?'
'Sigma Bootis','Meikle Platform',0,'?','?'
'Sinann','Jones Point',0,'?','?'
'Sinann','Phillips Arena',0,'?','?'
Expand Down Expand Up @@ -1980,6 +2021,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Taotiges','Yano Terminal',1892,'?','?'
'Tarach Tor','Carters Haven',1314,'N','L'
'Tarach Tor','Tranquillity',359,'Y','L'
'Taranis','Janszoon Depot',0,'?','?'
'Tatil','Lloyd Terminal',0,'?','?'
'Tatil','Roddenberry Dock',0,'?','?'
'Tatil','Shepard Ring',0,'?','?'
Expand Down Expand Up @@ -2117,12 +2159,18 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Vequess','Cuffey Orbital',0,'?','?'
'Verbigeni','Archambault Plant',0,'?','?'
'Vertumnus','Rawn City',0,'?','?'
'VESPER-M4','Rothfuss Holdings',0,'?','?'
'VESPER-M4','Slough Orbital',0,'?','?'
'Vetr','Aristotle Horizons',0,'?','?'
'Vetr','Ehrlich City',0,'?','?'
'Vetr','Wisoff Depot',0,'?','?'
'Vindumbiva','Polyakov''s Claim',37817,'?','M'
'Virud','Beadle Hanger',429,'?','M'
'Volungu','Jemison Refinery',0,'?','?'
'Wally Bei','Boas Terminal',0,'?','?'
'Wally Bei','Malerba Orbital',0,'?','?'
'Wally Bei','Swanson Port',0,'?','?'
'Wally Bei','Volk Dock',0,'?','?'
'Wang Ku','Mastracchio Dock',0,'?','?'
'Wanggu','Besonders Port',0,'?','?'
'Wanggu','Qureshi Colony',0,'?','?'
Expand Down Expand Up @@ -2225,6 +2273,9 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size
'Yen Di','Brown Dock',0,'?','?'
'Yen K''uie','Siddha Gateway',1099,'?','L'
'Yggdrajang','Schade Platform',0,'?','?'
'Yorua','Blackwell Hub',0,'?','?'
'Yorua','Forrester Station',0,'?','?'
'Yorua','Rennie Hub',0,'?','?'
'Yoruba','Carpenters Terminal',0,'?','?'
'Yota','Baturin Vision',554,'?','M'
'Yota','Favier Settlement',0,'?','M'
Expand Down
39 changes: 20 additions & 19 deletions data/TradeDangerous.sql
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ CREATE TABLE System
UNIQUE (name),

FOREIGN KEY (added_id) REFERENCES Added(added_id)
ON UPDATE CASCADE
ON DELETE CASCADE
ON UPDATE CASCADE
ON DELETE CASCADE
);
CREATE INDEX idx_system_by_pos ON System (pos_x, pos_y, pos_z, system_id);

Expand All @@ -72,8 +72,8 @@ CREATE TABLE Station
UNIQUE (system_id, name),

FOREIGN KEY (system_id) REFERENCES System(system_id)
ON UPDATE CASCADE
ON DELETE CASCADE
ON UPDATE CASCADE
ON DELETE CASCADE
);
CREATE INDEX idx_station_by_system ON Station (system_id, station_id);
CREATE INDEX idx_station_by_name ON Station (name);
Expand All @@ -97,11 +97,11 @@ CREATE TABLE ShipVendor
PRIMARY KEY (ship_id, station_id),

FOREIGN KEY (ship_id) REFERENCES Ship(ship_id)
ON UPDATE CASCADE
ON DELETE CASCADE,
ON UPDATE CASCADE
ON DELETE CASCADE,
FOREIGN KEY (station_id) REFERENCES Station(station_id)
ON UPDATE CASCADE
ON DELETE CASCADE
ON UPDATE CASCADE
ON DELETE CASCADE
) WITHOUT ROWID
;

Expand All @@ -125,11 +125,11 @@ CREATE TABLE UpgradeVendor
PRIMARY KEY (upgrade_id, station_id),

FOREIGN KEY (upgrade_id) REFERENCES Upgrade(upgrade_id)
ON UPDATE CASCADE
ON DELETE CASCADE,
ON UPDATE CASCADE
ON DELETE CASCADE,
FOREIGN KEY (station_id) REFERENCES Station(station_id)
ON UPDATE CASCADE
ON DELETE CASCADE
ON UPDATE CASCADE
ON DELETE CASCADE
) WITHOUT ROWID
;

Expand All @@ -153,8 +153,8 @@ CREATE TABLE Item
UNIQUE (category_id, name),

FOREIGN KEY (category_id) REFERENCES Category(category_id)
ON UPDATE CASCADE
ON DELETE CASCADE
ON UPDATE CASCADE
ON DELETE CASCADE
);


Expand Down Expand Up @@ -229,6 +229,7 @@ CREATE TABLE StationSelling
ON UPDATE CASCADE ON DELETE CASCADE
)
;
CREATE INDEX idx_selling_price ON StationSelling (item_id, price);

CREATE TABLE StationBuying
(
Expand All @@ -251,11 +252,11 @@ CREATE TABLE StationBuying
CREATE INDEX idx_buying_price ON StationBuying (item_id, price);

CREATE VIEW vPrice AS
SELECT si.station_id AS station_id,
si.item_id AS item_id,
IFNULL(sb.price, 0) AS sell_to,
IFNULL(ss.price, 0) AS buy_from,
si.modified AS modified,
SELECT si.station_id AS station_id,
si.item_id AS item_id,
IFNULL(sb.price, 0) AS sell_to,
IFNULL(ss.price, 0) AS buy_from,
si.modified AS modified,
IFNULL(sb.units, 0) AS demand,
IFNULL(sb.level, 0) AS demand_level,
IFNULL(ss.units, 0) AS stock,
Expand Down

0 comments on commit b521578

Please sign in to comment.