ArticleslgStudy

computer science

GT.M

GT.M is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand GT.M rather than just read about it. In short: GT.M is a high-throughput key–value database engine optimized for transaction processing. (It is a type also referred to as "schema-less", "schema-free", or "NoSQL".) GT.M is also an application development platform and a compiler for the ISO standard M language, also known as MUMPS.

Key takeaways

  • GT.M belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect GT.M to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of GT.M from memory before moving on to harder problems.

Reference excerpt

GT.M is a high-throughput key–value database engine optimized for transaction processing. (It is a type also referred to as "schema-less", "schema-free", or "NoSQL".) GT.M is also an application development platform and a compiler for the ISO standard M language, also known as MUMPS. GT.M, an abbreviation for Greystone Technology M, was developed by the Greystone Technology Corp in the 1980s. It is an implementation of ANSI standard M for AIX and Linux. In addition to preserving the traditional features of M, GT.M also offers an optimizing compiler that produces object code that does not require internal interpreters during execution. The database engine, made open source in 2000, is maintained by FIS. GT.M is used as the backend of their FIS Profile banking application, and it powers banks in Spain, France, Italy, the Netherlands, Romania and India; Capital One 360 in the United States; Tangerine (Scotiabank) in Canada; Atom Bank; Tandem Bank; Sainsbury's Bank; Scottish Widows and Barclays Direct in the UK. It is also used as an open source backend for the Electronic Health Record system WorldVistA and other open source EHRs such as Medsphere's OpenVista. It is listed as an open source healthcare solution partner of Red Hat. It consists of approximately 2 million lines of code.

Technical overview GT.M consists of a language subsystem, a database subsystem, and utility programs. The language subsystem and database subsystem are closely integrated, but each is usable without the other. The language and database subsystems share common data organization and typing.

Data organization and typing

Like MUMPS, GT.M has no real concept of different data types, though strings (those which are not fully numeric) must be placed in quotes to differentiate them from variables. Numbers can be treated as strings of digits, or strings can be treated as numbers by numeric operators (coerced, in MUMPS terminology). Data is treated based on context and the rules of GT.M: 1+"42" yields the result 43, the first character of 43 is 4, and 20+"30 DUCKS" is 50 (as non-numeric characters are dropped during numeric operations). There is only one data structure - multi-dimensional sparse arrays (key-value nodes, sub-trees, and associative memory are all equally valid descriptions) with up to 32 subscripts. A scalar can be thought of as an array element with zero subscripts. Nodes with varying numbers of subscripts (including one node with no subscripts) can freely co-exist in the same array. For example, if one wanted to represent the national capitals of the United States:

Set Capital("United States")="Washington" Set Capital("United States",1774,1776)="Philadelphia" Set Capital("United States",1776,1777)="Baltimore"

Variables are created on demand when first assigned to. Thus, the first Set command above would create the variable Capital. Variables have scope in the language, and are called local variables. A database access looks like an array access, for example:

Set ^Capital("United States")="Washington"

but the caret (^) means that it is a database access. Variables used for database access have a single global scope, and of course persist and shared between processes. They are called global variables. The first 31 characters of a variable name are significant. The Kill and ZKill commands are used to delete subtrees of values. GT.M uses Unicode (ISO/IEC-10646) for international character set support.

Database subsystem

The logical database of a GT.M process consists of one or more global variable name spaces, each consisting of unlimited number of global variables. For each global variable name space, a global directory maps global variables to the database files where they actually reside. An unlimited number of global variables can fit within one database file; a global variable must fit in one database file. A database file consists of up to 224M (276,168,704) database blocks. A database block is a multiple of 512 bytes, with a maximum size of 65,024 bytes. Commonly used block sizes are 4KB, 8KB and 16KB - so, with an 8KB block size, an individual global variable can grow to 1,792GB. A global variable node (global variable, subscripts plus value) must fit in one database block and each block has a 16 byte overhead. So, the largest node that will fit in a database with a 4KB block size is 4,080 bytes. A key (global variable plus subscripts) can be up to 255 bytes. The database engine is daemonless and processes accessing the database operate with normal user and group ids - a process has access to a database file if and only if the ownership and permissions of that database file (plus any layered access control such as SELinux) permits access. Each process has within its address space all the logic needed to manage the database, and processes cooperate with one another to manage database files. When a database file is journaled, updates are written to journal files before being written to database files, and in the event of a system crash, database files can be recovered from journal files. The database engine also supports transaction processing. So, code such as:

TStart () Set ^Capital("France")="Paris" Set ^Country("Paris")="France" TCommit

implements an ACID transaction. GT.M uses optimistic concurrency control to manage transactions. A plug-in architecture allows the database to be encrypted in order to protect data at rest. GT.M is distributed with a reference plug-in that uses GnuPG.

Language subsystem

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with GT.M

Start with the simplest possible case. Write down what GT.M claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to GT.M before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about GT.M ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of GT.M

In research
GT.M appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses GT.M in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
GT.M is common in secondary-school and first-year university syllabi. It links to neighbouring topics Electronic health record software, FIS (company), Free database management systems, so understanding it makes those chapters shorter.
In everyday life
Look for GT.M outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “GT.M” →

How to study GT.M in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what GT.M means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain GT.M out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is GT.M in simple terms?

GT.M is a high-throughput key–value database engine optimized for transaction processing. (It is a type also referred to as "schema-less", "schema-free", or "NoSQL".) GT.M is also an application development platform and a compiler for the ISO standard M language, also known as MUMPS.

Why does GT.M matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study GT.M?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on GT.M.

Tags

  • Electronic health record software
  • FIS (company)
  • Free database management systems
  • MUMPS implementations
  • Software using the GNU Affero General Public License
  • Structured storage

Keep exploring