User Tools

Site Tools


guides:reference:relations:relations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
guides:reference:relations:relations [2020/01/02 14:26]
yspeerte
guides:reference:relations:relations [2021/10/21 09:50] (current)
pgels ↷ Links adapted because of a move operation
Line 1: Line 1:
 +====== Relations ======
  
 +Relations allows the user to extend the standard node '​context'​ with information relevant to his design or use-case by means of SQL queries.
 +
 +Relations are in essence MySQL queries that allows the builder to create temporary datasets based on NetYCE database tables and conditions. These datasets are generated on the fly during Template or Job execution where their data can be used as variables.
 +
 +Basic knowledge on writing a SQL SELECT query is mandatory as is some experience with the NetYCE data model. The NetYCE entity-relationshp-diagram or ERD is a useful starting point here. The tables and their current data is accessible using the “Admin - Custom data” tool. Where the ERD includes the mostly the tables for all the objects involved with the “Build” view of the network, the Custom data offers access to ALL tables in the various databases, including any custom tables.
 +
 +Since NetYCE uses a MariaDB database (the open source version of MySQL), the supported SQL syntax has to conform to MySQL 5.x / MariaDB 10.x. Relations will ONLY allow you to use SELECT SQL queries. ​
 +
 +The NetYCE ''​TRANSFORM''​ extension to MySQL can convert data values found in one column into new columns with values of another. See [[guides:​reference:​relations:​transform|Transform columns]]
 +
 +Many examples of (re)useable SQL statements for custom reports can be found in the [[menu:​build:​relations:​relation_edit|Design - Relations]] form.
 +
 +Details on using Relations in Templates re found in the [[guides:​reference:​templates:​relations|Templates - Relations]] guide