Zibb
Subscribe to Control Engineering
FirstLight
Email
Print
Reprint
Learn RSS

How to create practical manufacturing databases

Dennis Brandl, BR&L Consulting -- Control Engineering, 10/1/2005

Based on the response received to my "Sometimes a database is enough" column, I thought it would be helpful to delineate a practical approach to develop such databases in cases where an MES system cannot be justified.

Typical database applications involve recording an event, a person, a place, a material, and a time. For example, tracking production artifacts—such as test labels and samples—as they move across desks for review and sign-off. A database application can allow an engineer or operator to scan his badge, the location, and folder containing the artifact. This allows tracking of artifacts as they move through the sign-off process.

Here are 10 simple guidelines for database applications:

  • Keep the functionality small and stick to problems that are transactional in nature and not real-time or procedural. Transactional problems rarely need more functionality than create, report, update, and delete.
  • Use an SQL-based database. This provides scalability and long-term maintainability of the application. Many manufacturing applications will have a long lifetime and only a standards-based database will provide long-term supportability. SQL databases also have standard reporting and display tools, reducing the application code.
  • Use a database server. While small applications often can be run on one computer, locating the database on a database server provides a supportable solution. The application's database may be just one of many databases on the server, but the server will have backup support, RAID (redundant) disks, and redundant power supplies.
  • Use integrity constraints. Most SQL databases support some form of foreign key, not null, unique, and range checking functions. This ensures that only valid data is added to the database and provides checks that do not have to be included in code.
  • Create tables without integrity constraints to hold "abnormal" situations. If an error occurs in normal operation, the operator often will not have enough information to solve the problem. Create "abnormal" tables that have the same structure as normal tables, but without integrity constraints, and store the abnormal cases in these tables. Use this information for analysis and correction of problems.
  • Use transactional control. Most SQL databases provide some form of transaction control. This allows multiple changes to the database that either all succeed, or if any one fails, then all roll back. This further reduces the application's error-handling code.
  • Use stored procedures. Stored procedures are SQL statements executed on database events, such as a change to a data field or deletion of a record. Stored procedures can significantly reduce the application code.
  • Provide an option so the application can create the database. Testing and rollout is much easier if the application can recreate its database, including the stored procedures. It is easier to track one application source file than multiple files and versions.
  • Don't hard-code database paths, instead use the OS registry database to find environment information. Hard-coded paths, such as "C:My Database," provide an execution constraint that is hard to maintain. Relocating the database without recompiling the application is more supportable.
  • Use Visual Basic or an equivalent to reduce code and provide a good user interface. There are many free, or low-cost, high-level development environments that can reduce the coding effort and make a database application a cost-effective solution.

These simple guidelines have helped me develop long-lasting database applications when an MES system is not available or cost justified.


Author Information
Dennis Brandl, dbrandl@brlconsulting.com, is the president of BR&L Consulting, a consulting firm focusing on manufacturing IT solutions, based in Cary, N.C.

Email
Print
Reprint
Learn RSS

Talkback

We would love your feedback!

Post a comment

» VIEW ALL TALKBACK THREADS

Related Content

Related Content

 

By This Author

Sponsored Links

 

Advertisement
SPONSORED LINKS

More Content

  • Blogs
  • Discussions
  • Webcasts
  • Podcasts
  • Videos

Blogs

  • Charlie Masi
    Ask Charlie

    December 1, 2008
    Why should we spend billions of dollars on high-energy physics research?
    This question came in as a (rather irate sounding) Talkback item for a recently published article in a Control Engineering print issue. It rea......
    More
  • Paul Grayson
    AIMing for Automated Vehicles

    November 30, 2008
    Pass In Review
    Photo: AIM photo archive US ARMY M35A2 US Army cargo truck on loan to AMERICAN INDUSTRIAL MAGIC for the DARPA Grand Challenge. The phot......
    More
  • View All BlogsRSS

Discussions

  • Re: Modbus Slave Simulator (reply posted by Mark)

  • Magelis XBTGT with Zelio Smart Relay via MODBUS (posted by N1K0)

  • P & I Autocad symbols (posted by Takudzwa)


  • Source: Control.com, the global online discussion community for automation professionals.

    Webcasts

    Engineering-driven Ethernet
    This Control Engineering Roundtable Webcast will address the engineering issues you should be aware of when exploring the adoption of Ethernet or when looking to expand its use in your facility.

    Bridging gaps with wireless
    Discover how you can create stronger, flexible and cost-effective wireless connections for your entire plant. Register today!

    View All Webcasts
    Advertisements





    NEWSLETTERS

    Get engineering industry news, trends, and business-critical information delivered directly to your inbox!

    Click on a title below to learn more.

    Weekly News (Weekly)
    Process Instrumentation & Sensors (Monthly)
    System Integration Monthly (Monthly)
    Process & Advanced Control (Monthly)
    Machine Control (Monthly)
    Information Control (Monthly)
    Automation Control (Monthly)
    Product Review (Monthly)
    Simplified Safety
    Fieldbus Facts
    PROFInews North American Edition
    About Us   |   Advertising Info   |   Site Map   |   Contact Us   |   Useful Sites   |   FREE Subscription   |   RSS
    © 2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
    Use of this Web site is subject to its Terms of Use | Privacy Policy
    Please visit these other Reed Business sites