Difference between revisions of "This Is Your Brain On Informatics: MariaDB"

From Pathology Education Instructional Resource
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<p>
+
MariaDB is an opensource project that is an offshoot of MySQL Oracle.  The developers of this database actually came from Oracle, and created MariaDB in response to what they considered Oracle's poor management of MySQL.  Because this database was built to be a better managed version of MySQL, many of the resources on the internet for MySQL will be applicable for MariaDB.  Below are several topics on MariaDB in the context of running on an NGINX server.
MariaDB is an opensource project that is an offshoot of MySQL because the developers felt that Oracle was doing a poor job managing MySQL (actually, the developers came from Oracle).  Because MariaDB was built to be a better managed version of MySQL, many of the resources on the internet for MySQL will be applicable for MariaDB.  Below are several topics on MariaDB to make it operate in the context of an NGINX server.
 
  
 
* [[This Is Your Brain On Informatics: User Interfaces|User Interfaces]]
 
* [[This Is Your Brain On Informatics: User Interfaces|User Interfaces]]
Line 6: Line 5:
 
* [[This Is Your Brain On Informatics: Q&A|In-Class Questions and Answers]]
 
* [[This Is Your Brain On Informatics: Q&A|In-Class Questions and Answers]]
  
</p>
 
  
==MariaDB Examples==
+
{{This Is Your Brain On Informatics}}
 
 
===In-Class Example of Manually Creating a Table===
 
<p>This data table was uploaded as a TSV (tab separated values) file.</p>
 
<p>LOAD DATA INFILE '[data table pathname]' INTO TABLE `test` FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINE</p>
 
 
 
===Answer to In-Class Question===
 
 
 
<p>Q:  Find the maximums in column 2 of quintiles based on column 1 </p>
 
  
<p>
+
[[Category:This Is Your Brain On Informatics]]
The following will create a temporary table that will order [var1], hold [var2] and also create a column with a counter variable named "id".
 
<br /><br />
 
A: CREATE TEMPORARY TABLE `rank` (id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY) SELECT [var1],[var2] FROM `test` WHERE [var3] = "string" AND [var1] <10000000 ORDER BY [var1];
 
<br /><br />
 
Then the use of the next command will need to be repeated for each quintile to find the maximum for each one.
 
<br /><br />
 
A:  SELECT MAX([var2]) FROM `rank` WHERE id BETWEEN [calculated lower bound of quintile] AND [calculated upper bound of quintile];
 
</p>
 
 
 
{{This Is Your Brain On Informatics}}
 

Latest revision as of 02:31, 19 March 2014

MariaDB is an opensource project that is an offshoot of MySQL Oracle. The developers of this database actually came from Oracle, and created MariaDB in response to what they considered Oracle's poor management of MySQL. Because this database was built to be a better managed version of MySQL, many of the resources on the internet for MySQL will be applicable for MariaDB. Below are several topics on MariaDB in the context of running on an NGINX server.