Opasnet Base: Difference between revisions
m (→All tables) |
|||
Line 45: | Line 45: | ||
|type||ENUM('initial','replace','append')||NO|||| | |type||ENUM('initial','replace','append')||NO|||| | ||
|- | |- | ||
|who||varchar( | |who||varchar(255)||NO|||| | ||
|- | |- | ||
|when||timestamp||NO|||| | |when||timestamp||NO|||| | ||
|- | |- | ||
|comments||varchar( | |comments||varchar(255)||YES|||| | ||
|- | |- | ||
|lang||char(3)||NO||ISO 639-2, default:'eng'|| | |lang||char(3)||NO||ISO 639-2, default:'eng'|| | ||
Line 85: | Line 85: | ||
|id||int(10) unsigned||NO||auto_increment||PRI | |id||int(10) unsigned||NO||auto_increment||PRI | ||
|- | |- | ||
|ident||varchar( | |ident||varchar(64)||NO||||UNI | ||
|- | |- | ||
|name||varchar( | |name||varchar(255)||NO|||| | ||
|- | |- | ||
|type||ENUM('variable','study','method','assessment','class','nugget','encyclopedia')||NO|||| | |type||ENUM('variable','study','method','assessment','class','nugget','encyclopedia')||NO|||| | ||
Line 153: | Line 153: | ||
|url||varchar(255)||NO|||| | |url||varchar(255)||NO|||| | ||
|- | |- | ||
|wname||varchar( | |wname||varchar(255)||NO|||| | ||
|} | |} | ||
|} | |} |
Revision as of 11:08, 9 February 2012
Moderator:Jouni (see all) |
|
Upload data
|
This page is about the Opasnet Base 2 -database.
Question
How to improve the existing Opasnet Base? Following issues of Opasnet Base 1 must be resolved:
- Opasnet Base 1 structure makes filtering by location very slow on big data
- Opasnet Base 1 structure is perhaps unnecessarily complex = queries are hard to adapt and read
- MySQL is not ideal for storing huge amounts of data, or at least this is how we assume?
- MySQL tables have fixed column types = difficult to store data objects with varying types of indices into one data table
- Multiple languages (localization) not supported
Answer
MySQL is good on relations but weak on dynamic big data. Let's keep the basic "scaffold" in MySQL and store the big data (locations and results) into noSQL-base. After few days of research the best candidate for noSQL-base seems to be MongoDB. Combining relational MySQL and non-relational MongoDB will be the foundation for the new Opasnet Base 2.
Table structure in the database
All tables
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
MongoDB
Tables to store all locations and results
db.<obj.ident>.dat
act_id (indexed), <ind.id>, <ind.id>, ..., <ind.id>, res
Tables to store real location values for entity type indices ?
db.<obj.ident>.locs
ind_id(indexed), key, value