Category:Cumulus MX: Difference between revisions

2,144 bytes added ,  21:25, 16 May 2020
m
Line 699: Line 699:


=== MySQL settings ===
=== MySQL settings ===
Cumulus MX includes functionality not in Cumulus 1, and this is one example of a new feature. It was developed from [[ImportCumulusFile|this script]] for Cumulus 1. It is designed to automate updating of MySQL databases whose schema has each table based on one of the Cumulus log files. The optional settings described below, allow you to choose which log file to use for such automatic updates and what to call the table uploaded to (uploads will not work before the required table has been created). Alternatively, you can devise your own schema, create that table, and then write the SQL to update your table using web tags to supply all the values. You need to turn on enhanced debug logging to see any confirmation that the SQL has run.
Cumulus MX includes functionality not in Cumulus 1, and this is one example of a new feature. It is designed to automate updating of MySQL databases whose schema has each table based on one of the Cumulus log files. This MX feature was developed from [[ImportCumulusFile|this script]] for Cumulus 1. 
<pre>2020-04-09 10:00:01.047 MySQL: 2 rows were affected.</pre>
 
It was IBM who first invented the concept of Relational Databases in the 1970s and they needed a language for all aspects of interaction with the new database and they called it Structured (English) Query Language. The brackets indicate the word was later removed. You may find when SQL is talked about, it is either pronounced "sequel" (as if there is still a "E" after the "S") or the 3 letters are simply spelt out. SQL is not '''Structured''' in the modern usage of that word in programming languages. SQL is not just for running '''Queries''', it can give and revoke access permissions, create and drop tables, and do many more tasks than just query a database to get results. SQL is a '''Language''' as it does have a set vocabulary, a defined sequence in which key words must appear, and it is used for describing tasks to a database.


If you want to insert historic data (i.e. from before you first use this feature in MX), the Cumulus 1 script just referenced can be used, or you can write your own SQL to do this one-off task.
Like video recorders and browsers, there was a relational database war in the 1980s between 2 big players IBM's SQL and Ingres' QUEL, each gaining popularity in different ways, but the latter lost out, with Oracle taking over the former as it became dominant and very widely adopted. There were a number of minor players who implemented their own relational databases, and initially their own languages, but SQL obtained a ISO definition and was then widely adopted, surviving the invention of the internet, and the move from mainframes to small devices. MySQL is one of the rivals, but all versions of SQL are related and the dialect differences are comparatively minor compared to the commonality of the majority of the language.  


Mono and .Net implement SQL capability, and this is utilised by Cumulus MX. However, to use SQL on your web site, you need to have a relational database available on your web server that accepts the MySQL that MX generates, this does not restrict you to a MySQL database, as other products will understand the SQL (because of the dialect and commonality point I have just made).


'''Mandatory section'''
====Mandatory section====
* Server Details - expand this drop down as it is used for essential information for any access to database
* Server Details - expand this drop down as it is used for essential information for any access to the database on your web server:
*# Enter your host name or a IPv4 address for your web server. If you host your own server, it might be something like 127.0.0.1. It is the same as you enter for host in the "internet settings" screen.
*# Enter your host name or a IPv4 address for your web server. If you host your own server, it might be something like 127.0.0.1. It will be the same as you enter for host in the "internet settings" screen.
*# Enter the port for communicating with database server e.g. 33106.
*# Enter the port for communicating with database server e.g. 33106. (Your web server provider should tell you whether the port is this or another number)
*# Enter the User Name for updating your database.
*# Enter the User Name for updating your database. (You may be able to set up user names on your database with different permissions, you need to state here one with updating permissions)
*# Enter the password for updating your database.
*# Enter the password for updating your database. (This will be set up for each user name)
*# Enter the name of the database that holds the tables you wish to update
*# Enter the name of the database that holds the tables you wish to update. (You probably have set this up, ask your provider if you need help)


'''Optional Sections'''
====Optional Sections====


The remaining 6 drop-down sections are optional, you choose which you want to use, they appear on the screen in a different order to how I explain them below.
The remaining 6 drop-down sections are optional, you choose which you want to use, they appear on the screen in a different order to how I explain them below.
The optional settings described below, allow you to choose which log file to use for such automatic updates and what to call the table uploaded to (uploads will not work before the required table has been created). Alternatively, you can devise your own schema, create that table, and then write the SQL to update your table using web tags to supply all the values. You need to turn on enhanced debug logging to see any confirmation that the SQL has run.
<pre>2020-04-09 10:00:01.047 MySQL: 2 rows were affected.</pre>




5,838

edits