Advertisement

What are SQL Programming Basics? (Industrial Automation)

What are SQL Programming Basics? (Industrial Automation) ▶ C'mon over to where you can learn PLC programming faster and easier than you ever thought possible!

=============================

▶ Check out the full blog post over at


=============================

If you would like to follow along with us, please review the RealPars lesson, "How to install MySQL and import a sample database", on how to download and setup MySQL database on your computer. You can watch the video here:

The world of data is constantly changing and evolving every second. This has, in turn, created new growth and challenges for companies around the world.

Manufacturing sites and large facilities can generate a large amount of process data that is stored in databases, which are used as data sources for reports.

At some point in time in your Automation career, sooner than later, you will be required to develop, manage and/or interface to a database of some type.

In this video, you will learn about relational databases and about the language of SQL.
In subsequent videos we will apply what we have learned in this training video, to view a sample database and program a few SQL queries to read and write to the database that will provide specific organized data.

There are many types of database structures. One of the most popular database management systems is called Relational Database Management System or RDBMS, because of the simplicity of operation and ease of use.

Data is generally stored in tables and they are usually manipulated through the use of Structured Query Language or SQL.

Some systems that use relational database management includes
– Oracle
– IBM
– Microsoft SQL Server
– MySQL
among many others.

An important tool for automation is to historically log data to a historian database, often a SQL database.

The process or manufacturing historian software will collect data using several sample methods that are based on
– Time-interval
– Event-based
– On-scan or based on an expression algorithm.

Typically in a historian, tag names identify the source of numerical or string type data derived from process automation controllers.

Whether you choose to analyze a tank level, tank temperature, tank pressure or even a control valve, the user can evaluate its operation, efficiency, profitability, and setbacks of production.

One example of what might be recorded in a data historian include:
Analog values such as
– Temperature
– Pressure
– Flow rates
– Levels
– Weights

Within a relational database, there are tables.
Each table will be identified by a unique name and the name will be used by the database to find the table behind the scenes.
All you need to know as a user is the table name in order to use it.

This ease of interaction is what placed the relational database model to gain wide acceptance.
The most common SQL databases in manufacturing are Microsoft SQL Server and MySQL.

In our example we will be using MySQL, it’s an open and free database that many OEMs are using.

SQL is used to communicate with a database. It is the standard language for relational database management systems.

We create SQL statements to perform tasks such as update data on a database or retrieve data from a database.

The standard SQL statements such as
– Select
– Insert
– Update
– Delete
– Create
– Drop
can be used to accomplish just about everything that you’ll need to do with a database.

The select statement is used to query the database and retrieve selected data that match the criteria that you specify.

The column names that follow the SELECT keyword, determine which columns will be returned in the results.

The table name, that follows the keyword “FROM”, specifies the table that will be queried to retrieve the desired results.

It is worth mentioning that we can select as many column names that we'd like, or we can use a "*", to select all columns.

=============================

Review the MySQL minimum hardware requirement web page here:


Download the MySQL Installer:


Download the sample database SQL file from here:


=============================

Missed our most recent videos? Watch them here:







=============================

To stay up to date with our last videos and more lessons, make sure to subscribe to this YouTube channel:



=============================

TWEET THIS VIDEO


=============================

Follow us on Facebook

Follow us on Twitter

Follow us on LinkedIn

Follow us on Instagram

#RealPars #SQL #MySQL

SQL programming basics,SQL basics,Microsoft SQL,MySQL,SQL,Structured Query Language,RDBMS,databases,database structures,Relational Database Management System,relational SQL database,SQL statements,SELECT statement,database management system,relational database management,Microsoft SQL Server,automation historical trending,Entity Relationship Diagram,ERD,Real-time data collection,SQL database,MS SQLServer,IBM,relational SQL databases,Microsoft’s SQL Server,

Post a Comment

0 Comments