Using Caché Multi-Dimensional Storage - InterSystems ...
Using Caché Multi-Dimensional Storage - InterSystems ...
Using Caché Multi-Dimensional Storage - InterSystems ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Introduction<br />
^Settings("Auto1","Properties","Color") = "Red"<br />
^Settings("Auto1","Properties","Model") = "SUV"<br />
^Settings("Auto2","Owner") = "Mo"<br />
^Settings("Auto2","Properties","Color") = "Green"<br />
Globals have the following features:<br />
• Simple to Use — Globals are as easy to use as other programming language variables.<br />
There is a comprehensive set of commands in both the <strong>Caché</strong> ObjectScript language and<br />
the Basic scripting language that make it extremely easy to use globals within applications.<br />
• multidimensional — You can specify the address of a node within a global using any<br />
number of subscripts. For example, in ^Settings("Auto2","Properties","Color"),<br />
the subscript Color is a third-level node within the Settings global. Subscripts can be<br />
integer, numeric, or string values, and need not be contiguous.<br />
• Sparse — The subscripts used to address global nodes are highly compacted and need<br />
not have contiguous values.<br />
• Efficient — The operations on globals — inserting, updating, deleting, traversing, and<br />
retrieving — are all highly optimized for maximum performance and concurrency. There<br />
are additional commands for specialized operations (such as bulk inserts of data). There<br />
is a special set of globals designed for temporary data structures (such as for sorting<br />
records).<br />
• Reliable — The <strong>Caché</strong> database provides a number of mechanisms to ensure the reliability<br />
of data stored within globals, including both logical-level and physical-level journaling.<br />
Data stored within globals is backed up when a database backup operation is performed.<br />
• Distributed — <strong>Caché</strong> provides a number of ways to control the physical location of data<br />
stored within globals. You can define a physical database used to store a global, or distribute<br />
portions of a global across several databases. <strong>Using</strong> the distributed database features<br />
of <strong>Caché</strong>, you can share globals across a network of database and application server<br />
systems. In addition, by means of data shadowing technology, data stored within globals<br />
on one system can be automatically replicated on another system.<br />
• Concurrent — Globals support concurrent access among multiple processes. Setting and<br />
retrieving values within individual nodes (array elements) is always atomic: no locking<br />
is required to guarantee reliable concurrent access. In addition, <strong>Caché</strong> supports a powerful<br />
set of locking operations that can be used to provide concurrency for more complex cases<br />
involving multiple nodes. When using Object or SQL access, this concurrency is handled<br />
automatically.<br />
• Transactional — <strong>Caché</strong> provides commands that define transaction boundaries; you can<br />
start, commit, or rollback a transaction. In the event of a rollback, all modifications made<br />
2 <strong>Using</strong> <strong>Caché</strong> <strong>Multi</strong>-<strong>Dimensional</strong> <strong>Storage</strong>