Skip to main content

Introduction to Globals

This topic introduces you to the concept of globals, the underlying multidimensional storage structure for InterSystems IRIS®. No matter how you decide to store or access your data, what you’re doing is using globals.

Globals can be accessed using a relational model, using an object model, or directly. For a video that explains the benefits of this multi-model access and a hands-on exercise that lets you try the three alternatives yourself, see Exploring Multiple Data Models with GlobalsOpens in a new tab.

What Are Globals?

One of the hallmarks of the InterSystems IRIS is its ability to store data once and allow you to access it using multiple paradigms. For example, you can use InterSystems SQL to visualize your data as rows and columns, or you can use ObjectScript and think of your data in terms of objects that have properties and methods. Your application can even mix these data models, using whichever model is easiest and more efficient for a given task. But no matter how you write or access your data, InterSystems IRIS stores it in underlying data structures known as globals.

Globals are persistent multidimensional sparse arrays:

  • Persistent — Globals are stored in the database and can be retrieved at any time, by any process that can access that database.

  • Multidimensional — The nodes in a global can have any number of subscripts. These subscripts can be integers, decimal numbers, or strings.

  • Sparse — Node subscripts do not have to be contiguous, meaning that subscripts without a stored value do not use any storage.

Nodes in a global can store many types of data, including:

  • Strings

  • Numeric data

  • Streams of character or binary data

  • Collections of data, such as lists or arrays

  • References to other storage locations

Even the server-side code you write is ultimately stored in globals!

Why Should Application Developers Learn About Globals?

While it is possible to write an application on the InterSystems IRIS platform with little or no knowledge of globals, there are several reasons why you may want to learn more about them:

  • Some operations may be easier or more efficient if you access globals directly.

  • You may want to create custom data structures for data that does not conform to relational or object data models.

  • Some system administration tasks are done at the global level, and understanding globals will make these tasks more meaningful to you.

Globals and External Languages

If you are writing an application in any of the supported external languages, InterSystems IRIS provides APIs that allow you to manipulate your data using the three models discussed in this topic, as follows:


Not all forms of access are supported for all languages.

FeedbackOpens in a new tab