Relational Tables

Syndicate content 6 

Globals, these magic swords for storing data, have been around for a while, but not many people can use them efficiently or know about this super-weapon altogether.

If you use globals for tasks where they truly shine, the results may be amazing, either in terms of increased performance or dramatic simplification of the overall solution (1, 2).

Globals offer a special way of storing and processing data, which is completely different from SQL tables. They were first introduced in 1966 in the M(UMPS) programming language, which was initially used in medical databases. It is still used in the same way, but has also been adopted by some other industries where reliability and high performance are top priorities: finance, trading, etc.

Later M(UMPS) evolved into Caché ObjectScript (COS). COS was developed by InterSystems as a superset of M. The original language is still accepted by developers' community and alive in a few implementations. There are several signs of activity around the web: MUMPS Google group, Mumps User's group), effective ISO Standard, etc.

Modern global based DBMS supports transactions, journaling, replication, partitioning. It means that they can be used for building modern, reliable and fast distributed systems.

Globals do not restrict you to the boundaries of the relational model. They give you the freedom of creating data structures optimized for particular tasks. For many applications reasonable use of globals can be a real silver bullet offering speeds that developers of conventional relational applications can only dream of.

Globals as a method of storing data can be used in many modern programming languages, both high- and low-level. Therefore, this article will focus specifically on globals and not the language they once came from.

Last comment 31 July 2017
+ 12   0 4
1250

views

+ 12

rating

In the previous parts (1, 2) we talked about globals as trees. In this article, we will look at them as sparse arrays.

A sparse array - is a type of array where most values assume an identical value.

In practice, you will often see sparse arrays so huge that there is no point in occupying memory with identical elements. Therefore, it makes sense to organize sparse arrays in such a way that memory is not wasted on storing duplicate values.

In some programming languages, sparse arrays are part of the language - for example, in J, MATLAB. In other languages, there are special libraries that let you use them. For C++, those would be Eigen and the like.

Globals are good candidates for implementing sparse arrays for the following reasons:

Last comment 17 July 2017
+ 6   0 5
556

views

+ 6

rating

Greetings,

I am working on the first of many triggers which will have identical code upon row insertion or update of a single column.  According to the document I should be able to define a multiple-event trigger using Cache SQL/DDL.

Here is a link to the current CREATE TRIGGER documentation.  Within the description section is the following paragraph:

A single-event trigger is triggered by a specified INSERT, DELETE, or UPDATE operation. A multiple-event trigger is defined to execute when any one of the specified events occurs on the specified table. You can define an INSERT/UPDATE, an UPDATE/DELETE, or an INSERT/UPDATE/DELETE multiple-event trigger.

I have no issue creating the single-event triggers, but I cannot work out the proper syntax to create a multiple-event trigger.

Here's a sample table

Last answer 11 July 2017
0   0 0
0

comments

351

views

0

rating

Beginning - see Part 1.

 

3. Variants of structures when using globals

 

A structure, such as an ordered tree, has various special cases. Let's take a look at those that have practical value for working with globals.

 

 

 

 

3.1 Special case 1. One node without branches

 

Last comment 8 July 2017
+ 6   0 5
775

views

+ 6

rating

I have a persistent class where I am logging each CCDA I receive. I want to store all of the providers associated to that CCDA (many to one). In a relational database, I would have a child table with a foreign key to the primary table. I'm guessing the equivalent to Cache would be 

1. Create a custom class (ProviderList) with the properties I want to store.

2. Add the class as a property of my CCDA persistent class.

Property Providers as Array of ProviderList (SQLProjection = "table/column";

Am I on the right track?

Last answer 17 October 2016 Last comment 17 October 2016
0   0 2
222

views

0

rating

Job Description
Caché Objects Web Developer


 

An excellent opportunity exists for an enthusiastic Caché Objects full stack web developer to join our rapidly growing company based near Old Street.

The Job

Our customers use our software to manage events, from small meetings to high-profile conferences and shows. The quality of our software is critical to their success, and critical to our business

+ 1   0 1
0

comments

269

views

+ 1

rating