0% found this document useful (0 votes)
12 views8 pages

SQL The Midas Touch

Uploaded by

Dobri Cundev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views8 pages

SQL The Midas Touch

Uploaded by

Dobri Cundev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

White Paper

SQL The Midas Touch


Turning Time-Series Data Into Enterprise Gold

Combining the power of SQL with your SCADA system


facilitates more people asking more questions about
your data. The answers can result in immediate,
impactful, potentially revolutionary insights into
what’s happening in your company – right now.

800.266.7798
www.inductiveautomation.com
SQL: The Midas Touch

Turning Time-Series Data


Into Enterprise Gold

Old King Midas could turn anything he touched into gold with the simple
touch of his hand, or so the old story goes. The tale dates back to Greek
mythology, and reflects a human aspiration that dates back even further –
the desire to change the value of one’s fortune.

Although Midas’ golden touch might only be the


Time-Series Data
makings of a legend, the ability to transform the
valueless into the valuable is very real. One such ex- Time-series data is the lifeblood of any SCADA
ample of modern day alchemy exists in the field of system. It is a sequence of data points, measured at
industrial automation. It is the ability to transform successive time instants, and spaced out at uniform
mundane time-series data into an indispensable intervals. Time-series data is created when a data
asset through the use of SQL relational databases. point from a PLC is read and time-stamped by a
SCADA system.
To succeed in business it is important to pursue
every advantage possible. This includes acquiring Time-series data is used to monitor machines and
more assets as well as fully capitalizing on untapped processes connected to a SCADA system, usually
assets that a company already possesses. In the through a PLC. An example of time-series data
manufacturing industry one of the most underval- would be the weight data coming from a scale on a
ued and underutilized assets that companies pos- production line. As product is weighed on the scale
sess is the time-series data residing in their SCADA each weight reading receives a timestamp from the
(supervisory control and data acquisition) systems. SCADA system. In the pairing of a piece of data with
a date and time, a time-series data point is created.
Many manufacturing companies view time-series
data as a simple byproduct of using a SCADA system.
The Evolution of Controls Data
They see time-series data as being useful for telling
the status of specific data points at specific times,
tracking simple trends ... and little else. Most compa- PLC SCADA DATABASE
nies don’t see any value for it beyond that point.
Raw Data Time-Series Historical
The usefulness of time-series data explodes expo- Data Data
nentially when it is put into context with data from
the rest of the enterprise. Time-series data that is
easily accessible and relatable comes alive, offer- Time-series data can be displayed in real time, as
ing deep insights into interrelationships between well as logged as historical data. To be logged as
the plant floor and the rest of the enterprise that historical data, time-series data needs to be saved in
can potentially change the fortunes of the entire some kind of repository. This is where SQL databases
company for the better. come into play.

800.266.7798 SQL: The Midas Touch | 2 of 7


www.inductiveautomation.com © 2012 Inductive Automation
SQL: The Midas Touch

SQL: Better for Storing Data This makes the notion that “time-series data is not
relational data” simply false. In spite of this, many
Traditionally, time-series data has been stored in a
companies opt to use a much more expensive
process historian, but relational SQL databases offer
method of storing time-series data than SQL; they
a compelling alternative. SQL databases compare
use process historians.
favorably to process historians and even offer the
major advantage of making historical data more Process Historians: Proprietary and Detached
accessible to other enterprise systems. A process historian is an application specifically
created to deal with time-series data. A historian is
Before getting into a comparison of how to choose
made for the storage and analysis of time-series data
between process historians and SQL relational
and as such is designed with an emphasis on the
databases for storing your data, it is important to
compression and speedy retrieval of large amounts
understand some basics about SQL databases
of data.
and historians.
Most historians use proprietary technology to com-
SQL Databases: Simple and Accessible
press and store data, which can make it difficult for
SQL-compatible databases are the most popular da-
other systems to easily communicate with them. As a
tabases in the world, used to store information of all
result, time-series data is often kept totally separate
types in every industry you can imagine. SQL is not
and detached from the rest of the enterprise data;
a type or brand of database; SQL is a standardized
not because it has to be, but because historians
structured query language for databases. SQL data-
make it difficult for other systems to work with it.
bases are relational databases, which are structured
like a large spreadsheet with rows, columns and cells, The outcome of this has been a misperception in the
but are much more robust and powerful. manufacturing industry that somehow time-series
data is special, and can only be handled by a process
SQL databases are popular for their simplicity, ease of
historian. In truth, there is nothing special about
connectivity, flexibility and most of all their ability to
time-series data, it’s just data. A SQL database will
quickly query related data. SQL was created with the
more than suffice for the logging of time-series data.
specific intent to make it easy to ask questions of data.
To explore how SQL can be a golden alternative to
The primary function of SQL is to create a query (or
process historians, let’s take a look at the selling
question) and run it against your data to retrieve an
points of process historians and how SQL relational
answer. Simply put, SQL was built to quickly answer
databases stack up to them.
complex questions about large amounts of data.
A SQL database makes a great repository for time-
series data, but despite this, SQL databases are often
ignored. One reason for this is a perception in the
manufacturing industry that time-series data is not
relational data, so therefore it doesn’t belong in a
SQL relational database. Regardless of how perva-
sive this idea is, it’s not true.
Relational data is data that can be related to other
data, and in order to relate things together there
needs to be something in common. In this sense
time-series data is actually inherently relatable
because all time-series data has something in com-
mon – a timestamp. The timestamp on all time-series
data means that it can be easily related to any piece
of data that is also associated with a time.

800.266.7798 SQL: The Midas Touch | 3 of 7


www.inductiveautomation.com © 2012 Inductive Automation
SQL: The Midas Touch

SQL Databases vs. Process Historians Cost


The advantages of cost go squarely to SQL. The price
There are advantages and disadvantages for using
for process historians can be outrageously priced at
process historians and SQL relational databases. Un-
10 to 30 times the cost of a SQL relational database. It
derstanding the strengths and weaknesses of process
can cost upwards of $60,000 to get everything work-
historians will help you make an informed decision
ing. Getting a SCADA system set up to log historical
about using SQL to help your company make the
data to a SQL database is a fraction of the cost, and
most of its time-series data. SQL databases coupled
offers more advantages.
with modern SQL-friendly SCADA systems can mea-
sure up and even outdo traditional process historians. Analysis
SQL was designed to make it easy to ask questions
Speed
of data in whichever way you want by constructing
Historians can log data very quickly, but this comes
simple SQL queries. SQL puts the user in the driver’s
at the cost of putting data into a proprietary, flat
seat when asking questions.
file format that other enterprise systems will have
trouble accessing. On the other hand historians were designed to store
data and return quick analysis of pre-built questions.
On the other hand SQL has gotten a bad rap for not
Historians offer answers to questions quickly, but
being fast enough to log time-series data effectively.
the questions are the ones the historians were built
While at one point this may have been the case,
to answer, which are not always the questions that
modern SQL databases coupled with state-of-the-
need to be answered.
art SCADA systems have no trouble logging 100,000
tags per second and more. This is more than enough Interoperability
speed to handle most cases. This last one is where SQL really shines. SQL was
made to be easy to connect to, and because SQL
Size
relational databases are the most widely used in the
In the area of file compression, process historians
world, most enterprise systems are already using
have a clear advantage over SQL databases. Histori-
them. If your time-series data is logged in a SQL
ans do a good job of compressing data to maximize
database, it is a breeze to connect it to other systems,
storage space because that is what they were de-
which means easy interoperability, enterprise-wide.
signed to do. However this compression once again
comes at the cost of having to save data in a propri- Since historians save data in a proprietary format
etary, difficult-to-read file format. it can be a real challenge to achieve true interoper-
ability with the rest of the data in the enterprise. It
While SQL can’t achieve the same compression ratios
requires the use of a proprietary decoder to con-
that historians can, a SQL database is easily scalable
vert data into a palatable format, which costs more
to accommodate the largest storage needs. Also, with
money. Standardized interfaces have been devised
the cost of memory getting cheaper and cheaper the
using OPC HDA (historical data access), but support
space that data takes up is less and less important.
and functionality is limited when compared to SQL.
Support
This one is no contest. SQL is clearly more widely
used and well supported than even the most popular
process historians. SQL is used in virtually every in-
If your time-series data is logged
dustry on the planet, and as a result, IT professionals in a SQL database, it is a breeze
are very comfortable supporting SQL on a daily basis.
All you have to do is go to the bookstore to confirm
to connect it to other systems,
this; there are hundreds of books about using SQL which means easy interoperability
in all kinds of ways. You will be hard pressed to find
even a few – if any – books that support of the pro- enterprise-wide.
prietary languages that process historians use.

800.266.7798 SQL: The Midas Touch | 4 of 7


www.inductiveautomation.com © 2012 Inductive Automation
SQL: The Midas Touch

A Penny Saved is a Penny Earned In order to get time-series to work with other data,
After a side-by-side comparison of SQL and process they have someone manually export and decode the
historians, the advantages of using a SQL relational data and then import it into another system – this
database to log historical data are pretty clear. SQL unlucky fellow is called the man-in-the-middle. SQL
databases are designed to empower users to quickly databases remove this step, making your data avail-
get answers to questions while historians are de- able in real time.
signed to efficiently store highly-compressed data.
Out of the Middle, Into the Lead
Both are good at what they do, but when you factor in Not only is the man-in-the-middle approach really
the much lower cost of using a SQL database, the value slow, but the ineffectiveness of the approach is com-
of using SQL is easy to see. The money saved using SQL pounded when data has to be shared across multiple
could be put toward other more pressing needs, which systems. This is because the data has to be separately
can increase the value of the enterprise overall. imported into each system, and this has to be done
every time the company wants to compare real-time
SQL: Better for Real-Time Data data – although after all the exporting and importing,
calling it “real-time” data is a stretch. All this can be
One of the biggest ways SQL can add value to a com-
avoided simply by using SQL for time-series data.
pany is making information available in real-time. It
accomplishes this by taking out the man-in-the-middle The other systems in your enterprise understand SQL,
and putting him to work somewhere else. The-man-in- so just give them time-series data in a way they can
the-middle is in reference to the old way of achieving understand it. Using SQL for time-series data means
some semblance of interoperability with time-series that it’s possible to achieve easy interoperability with
data and the data from other systems in the enterprise. the systems in the rest of the enterprise – in real time.
To relate real-time time-series data with data from SQL totally eliminates the need for the-man-in-
other enterprise systems there are few options for us- the-middle, which can free up that employee to
ers who have SCADA systems that don’t take advan- deal with other work that requires attention. It also
tage of SQL. They have to export data into a flat file means that you can get answers to important ques-
that must be decoded, and buy an expensive decoder tions about real-time data in milliseconds, not hours
to make sense of the proprietary file format, or they or days. More effective use of manpower means
can try to hack a connection, which offers uncertain a greater profit margin, and a less stressed-out,
results. Because of these limited options, many com- former man-in-the-middle who can be in the lead
panies are still doing things the old-fashioned way. driving the data.

SCADA MES ERP SCADA MES ERP

da da
ta ta
SQL
da
ta

da
ta
The Man-in-the-Middle The Man-in-the-Lead

Manually importing data across multiple A SQL database cuts out the man-in-the-middle
enterprise systems can get tiring. and gets data to where it needs to be – quickly.

800.266.7798 SQL: The Midas Touch | 5 of 7


www.inductiveautomation.com © 2012 Inductive Automation
SQL: The Midas Touch

SQL: Total Enterprise Connectivity is to get everything connected. Using a SQL database
for time-series data facilitates easy connection to
There is no question that as technology has pro-
other enterprise systems because most of them have
gressed the world has become more and more
used SQL for years.
connected; and that connectivity has become ever
more important to the profitability of today’s busi- The time-series data from your SCADA system may
nesses. Not that long ago having a company website have volumes to say about your company. It may
was seen as a luxury, whereas today it is virtually a hold the key to unlocking the true potential of your
requirement to doing business. company’s productivity; it may even be that com-
petitive advantage your company has been seeking.
As the business world has become more connected,
It may be a lot of things, but if your time-series data
companies have also increasingly grown interde-
isn’t connected to the rest of your enterprise it is
pendent on one another. This has been mirrored in
definitely underutilized.
the manufacturing industry, where companies have
become more specialized and processes have grown In order to tap the potential gold mine of informa-
more and more complex. tion contained within your SCADA system, you have
to give the data context. The only way you can put
With so much going on at a modern manufacturing
time-series data into context is to make it relatable to
company every day, it has become imperative to stay
the data from the rest of your enterprise. Here are a
connected with the entire enterprise at all times.
few examples to help illustrate the potential profit-
Each system in the enterprise could be affecting the increasing benefits of putting time-series data into
others for better or worse, and the only way to know context with the rest of your enterprise.

Total Enterprise Connection (use this diagram to reference examples 1 through 3 on the next page)

SCADA
MES
Raw Materials
ERP
Lot 1A Lot 1B Lot 2A Lot 2B
Inventory
System

Processing
Line 1 Line 2 Downtime
System

Quality
Checkpoint
Lab Quality
System

Final Product
Warehouse 1 Warehouse 2 Warehouse
System
Truck 1

Truck 2

Shipping
Shipment
System

Delivery Store 1 Store 2 Store 3 Store 4

800.266.7798 SQL: The Midas Touch | 6 of 7


www.inductiveautomation.com © 2012 Inductive Automation
SQL: The Midas Touch

Example 1: Inventory + OEE + SCADA product has begun to spoil by sitting in the ware-
After cross-referencing the time-series data in the house too long. By discovering the problem quickly,
SCADA system with OEE (overall equipment effec- it can be addressed before more bad product goes
tiveness) software – via a SQL database connection out, minimizing the damage done.
– it is apparent that line 1 is producing more product
than line 2. The OEE software points to the fact that More Valuable in the
more downtime is occurring on line 2, which is result- Present, Past and Future
ing in decreased production. The two lines appear
Using SQL relational databases to deal with time-
to be functioning properly, yet line 2 is clearly not as
series data makes it accessible to the entire enter-
efficient as line 1.
prise. The bottom line is that combining the power
However, since the inventory system is also connected of SQL with your SCADA system facilitates more
to the SQL database it is discovered that line 2 uses people to ask more important questions about your
raw materials from a different vendor than line 1. data. The answers to those questions in real time can
After making a switch of raw material vendors the result in immediate, impactful, potentially revolution-
productivity of line 2 is increased and the problem ary insights into what’s happening in your company
is solved. Solving the problem swiftly – because of – right now.
enterprise-wide connectivity – results in decreased
SQL can also help shed new light on past data.
downtime and increased productivity, which means
Time-series data that has been collecting dust can
increased value for the company on the whole.
be given new life by putting it into a SQL database.
Example 2: Quality + SCADA Putting the data into a relational format will make
All products pass through a quality checkpoint old data easy to put into context with the data from
before moving on to packaging; in this process the across the enterprise. It’s possible that in the light of
quality system is alerted to the fact that numerous this new context you may discover trends that you
products are falling below acceptable control limits. have never seen before, trends that could hold the
Thanks to the SQL connection that the quality and key to increasing the company’s productivity.
SCADA systems share, the offending products can be
In the Information Age in which we live, the value
traced back through the process to their source.
of accurate, real-time information cannot be over-
After tracking several low-quality products back to stated. As we move into the future, the speed of
the source, it is discovered that the raw materials all business will continue to accelerate and only the
originated from lot 1B. Once the bad lot is discovered companies that stay quick and agile will be able to
and shut down, the quality of all the products is again keep up. Using SQL puts a company in a good posi-
within acceptable levels. Thanks to cross-enterprise tion to keep pace.
data accessibility, the quality problem was identified
Using SQL allows companies to answer important
and fixed before any damage was done, saving the
questions about their data in milliseconds, and in
company time, money and bad publicity.
a competitive industry where every second counts,
Example 3: Invoicing + WMS + SCADA that is a game-changer. Pairing SQL and SCADA can
An abnormal amount of complaints are coming in help you turn your time-series data into one of your
from a localized area about the freshness of the prod- company’s more useful and valuable assets.
uct. By using the invoice system, the shipment made
to the area in question is identified and traced back Maybe the Midas
to originating from warehouse 2. After searching
through the data of the quality and SCADA systems, touch isn’t a
no problem is discovered.
legend after all.
However the WMS (warehouse management system)
reveals an unusually large gap in time between
when the product was packaged and shipped – the

800.266.7798 SQL: The Midas Touch | 7 of 7


www.inductiveautomation.com © 2012 Inductive Automation
SQL: The Midas Touch

Connecting to SQL databases ...


1. Open Ignition
2. Click “create new database connection”
3. Authenticate connection
4. Connect to as many databases as you want

... that’s simple!

That’s
Unlock the full power of your SCADA system. Ignition
speaks SQL so you don’t have to. You can easily connect
to as many databases as you need, at no extra cost.

Download today at www.TryIgnition.com


HMI • SCADA • MES Software

800.266.7798
www.inductiveautomation.com

You might also like