#Databases

8 Followers · 371 Posts

InterSystems Caché database is a file where all the data, application scripts, and users, roles and security configurations are stored. Typically the name of the file is cache.dat.

Documentation.

Question Mathew Lambert · Jun 16, 2020

I would like to know if there is a way of having a callback or something similar, on persistent classes that is always called after the execution of the operation (failed or successfull).

%OnOpen is executed prior to the action, and there is no post callback

%OnAfterDelete and %OnAfterSave are executed after a successfull operation

8
0 331
Question Mathew Lambert · Jun 23, 2020

I know that 1-1 relationships are not officialy supported by intersystems cache/iris so I want to know the best way to store data with this kind of data model.

Currently I have two classes that where implemented some time ago:

Table A with a relationship type one on table B

Table B with a relationship type one on table A

To compile I have a double compile with qualifyer U.

What is the best way to implement a data model with 1-1 relationships?

Thank you

6
0 719
Article Yuri Marx · Jun 8, 2020 3m read

About regulations

Personal data privacy regulations have become an indispensable requirement for projects dealing with personal data. The compliance with these laws is based on 4 principles:

  1. Compliance with the rights of the holder of personal data;
  2. Governance of personal data assets;
  3. Privacy by Design and by Default;
  4. Data protection.

In case of violation in the treatment of personal data, controllers and operators of these data may suffer:

0
2 468
Article Oleh Dontsov · Jun 4, 2020 1m read

Sometimes you need quickly and easily import data into IRIS. For this, an IRIS import manager has been developed.

This application allows you to import JSON data and also provides a really simple interface for transferring data from MongoDB collections to IRIS globals. It has never been so easy.

Let's look at examples.

Import JSON

Suppose we have data in JSON format and we want to import it into IRIS. To do this, you just need to specify the global name and insert the data. After import, you will see the imported data. If global exists data will be overwritten.

Import MongoDB collections

5
0 792
Article Tani Frankel · Jun 4, 2020 10m read

In this article I'd like to share with you a phenomena that is best you avoid - something you should be aware of when designing your data model (or building your Business Processes) in Caché or in Ensemble (or older HealthShare Health Connect Ensemble-based versions).

2
0 498
Article Sergey Kamenev · May 28, 2020 7m read

A More Industrial-Looking Global Storage Scheme

In the first article in this series, we looked at the entity–attribute–value (EAV) model in relational databases, and took a look at the pros and cons of storing those entities, attributes and values in tables. We learned that, despite the benefits of this approach in terms of flexibility, there are some real disadvantages, in particular a basic mismatch between the logical structure of the data and its physical storage, which causes various difficulties.

0
0 978
Article Sergey Kamenev · May 11, 2020 8m read

Introduction

In the first article in this series, we’ll take a look at the entity–attribute–value (EAV) model in relational databases to see how it’s used and what it’s good for. Then we'll compare the EAV model concepts to globals.

Sometimes you have objects with an unknown number of fields, or perhaps hierarchically nested fields, for which, as a rule, you need to search.

0
4 4420
Question Jose Antonio Benitez · May 6, 2020

Hi, we have mirrored databases, now we have three nodes. Primary, backup, async. They are sync by journals and with some TB each node (expensive storage).

I would like to have a scenario where the two nodes (Primary and backup) have the same amount of messages (purge task of x days) , both as failover, but the asynchronous node should have more messaging, as much as the storage allows us. We want to use this node so provider can give support(search old messages), but not have databases in production that are so large that they are hardly consulted.

Any ideas?

Thanks in advance!

2
0 240
Question Mathew Lambert · Apr 28, 2020

I've been reading the documentation guide for 2018.1 over frozen query plans several times in the last days (link) and there is an answer I can't seem to find directly.

My on-premise upgrade way is:

  • Update healthshare version
  • Unfreeze all my namespace plans
  • Purge all queries
  • Overwrite the database containing the logic (both the old and new logic contains static queries compiled with the target HS version, and dynamic queries) 
1
0 273
Article Dmitry Maslennikov · Mar 24, 2020 2m read

I hope you already know one of my projects Cache Blocks Explorer. I've recently renamed it to Blocks Explorer.

For the recent contest, I've added a new feature, the ability to generate a static picture of any Cache or IRIS database. Like below. Where unique globals have a unique color. This is how looks like inside 9.5GB database. Where 1 pixel represents one block. By link on image you will get even bigger image, with more detalization.


6
0 445
Question Drew Holloway · Mar 12, 2020

Is there a way to query the database structure?  In SSMS there are queries for finding tables with a column with a certain name (using LIKE).  And there is the redgate tool SQL Search.  But I'm not sure how to go about looking for columns that have say a value of 'PATID' and returning all tables that match.  Does anyone know?

5
0 1800
Article Anton Umnikov · Feb 11, 2020 19m read

InterSystems IRIS Deployment Guide for AWS using CloudFormation template 

Please note: following this guide, especially the prerequisites section requires Intermediate to Advanced level of knowledge of AWS. You'll need to create and manage S3 buckets, IAM roles for EC2 instances, VPCs and Subnets. You'll also need access to InterSystems binaries (usually downloaded via WRC site) as well as IRIS license key.
 

Aug 12, 2020
Anton Umnikov

Templates Source code is available here: https://github.com/antonum/AWSIRISDeployment

Table of Contents

InterSystems IRIS Deployment Guide – AWS Partner Network. 1

1
1 1839
Article Tony Coffman · Feb 6, 2020 1m read

Hello Community,

Thank you all for your continued feedback and support of our ad hoc reporting platform, VDM.  There's been some questions around setting up a non-ODBC connection for InterSystems platforms.  We published a new YouTube video showing the steps necessary to connect to InterSystems Caché and InterSystems IRIS with BridgeWorks VDM. 

0
3 291
Discussion Neerav Verma · Dec 19, 2019

HI,

I am planning to build a WebApp that will have tons of data to display in tables, ability to add comments on that table rows and may be some few more small features as we move on.

1. It has to be Secure

2. It has to be fast

3. It has to be Non CSP / Non Zen

4. Will have Cache DB to pull records from but should be flexible to do that from any odbc resource

5. Version 2018 Ensemble

My first step would have been to investigate different options for technologies that would make it work and best suited with Ensemble 2018

18
0 588
Article Alex Litkovets · Apr 10, 2017 5m read

Introduction

We used the InterSystems iKnow technology to create a review assessment system called iKnow Reviews Analyzer (iKRA). Some information about the prototype of the system can be found here. iKRA analyzes users’ text reviews and automatically rates the object being reviewed. This functionality may come in very handy on e-commerce sites, forums or collections of media content – in other words, everywhere where people discuss products, places or services, for example.

What does the solution do?

5
0 2111
Article Sergey Kamenev · Nov 11, 2019 11m read

InterSystems IRIS supports a unique data structure, called globals, for information storage. Essentially, globals are persistent arrays with multi-level indices, having several extra capabilities—transactions, quick traversal of tree structures, and a programming language known as ObjectScript.

I'd note that for the remainder of the article, or at least the code samples, we'll assume you have familiarised yourself with the basics of globals:

7
2 1117
Question lw lw · Nov 14, 2019

My project need to  restore the previous part of the log,  and I use the rountine "^JRNRESTO" and filter.  After recovery completed,  the table structure is restored, but the table data is not restored, also unable to insert data into the table.

The filter is defined as follows:

ZJRNFILT(jid,dir,glo,type,restmode,addr,time)
 New zdh
 Set zdh=$zdatetimeh("11/14/2019 15:18:56")
 If $p(time,",",1)>$p(zdh,",",1) Set restmode=0 Quit
 If $p(time,",",1)<$p(zdh,",",1) Set restmode=1 Quit
 If $p(time,",",2)<$p(zdh,",",2) {
 Set restmode=1
 } Else {
 Set restmode=0
 } Quit

after restore the :

5
0 474
Question Kelly Blake · Nov 1, 2019

I would like to Compact globals in a database to free up space.   

I would begin the process on Saturday morning, but am concerned, due to the size, that it would not complete by Sunday evening.  I understand that the process is setup so that it can run with users on the system, however, as the advice indicates, this would not be ideal.

Can the process be stopped if it does not complete by the time you want/need it to?

Do you know how to guestimate how long the process would take?

This is the Freespace for the database in question.  There are 1047 globals of which one of them takes up 50%.

7
0 726
Question Yunier Gonzalez · Oct 31, 2019

Greetings community. I would like to know how to migrate a BD in production to a local environment. When I have a system in production (BD Sql Server) what we do is mount a local copy to do the analysis with the data and not occupy resources of the system in production. My question is: How do you do it with Intersystems technology? I already tested the PowerBi connector and it looks great, but that's where the question came up.
 

2
0 359
Question Jude Mukkadayil · Oct 29, 2019

Hi,

     I am trying to update an year on a date field in a cache database table but it showing an error message. But the functions are working on select query. The query I used is 

update RB_ResEffDateSessPayorRestr SET RESTR_DATETo = DATEADD(YYYY,1,RESTR_DATETo) where YEAR(RESTR_DATETo)=2020

I tried to update only the year which are 2020.

Can anyone please help me, Is there any error in the query?

Thanks

12
0 489
Article Gevorg Arutiunian · Apr 27, 2019 2m read

Here is an ObjectScript snippet which lets to create database, namespace and a web application for InterSystems IRIS:

	set currentNS = $namespace
	
	zn "%SYS"
	
	write "Create DB ...",!
	set dbName="testDB"
 	set dbProperties("Directory") = "/InterSystems/IRIS/mgr/testDB"
 	set status=##Class(Config.Databases).Create(dbName,.dbProperties)
	write:'status $system.Status.DisplayError(status)
	write "DB """_dbName_""" was created!",!!
	
	
	write "Create namespace ...",!
	set nsName="testNS"
	//DB for globals
	set nsProperties("Globals") = dbName
	//DB for routines
	set nsProperties("Routines") = dbName
	set status=##Class(Config.Namespaces).Create(nsName,.nsProperties)
	write:'status $system.Status.DisplayError(status)
	write "Namespace """_nsName_""" was created!",!!
	
	
	write "Create web application ...",!
	set webName = "/csp/testApplication"
	set webProperties("NameSpace") = nsName
	set webProperties("Enabled") = $$$YES
	set webProperties("IsNameSpaceDefault") = $$$YES
	set webProperties("CSPZENEnabled") = $$$YES
	set webProperties("DeepSeeEnabled") = $$$YES
	set webProperties("AutheEnabled") = $$$AutheCache
	set status = ##class(Security.Applications).Create(webName, .webProperties)
	write:'status $system.Status.DisplayError(status)
	write "Web application """webName""" was created!",!
	
	zn currentNS
3
6 1857
Question Bharath Nunepalli · Aug 20, 2019

I'm a DBA and support Caché databases on AIX. I coded shell scripts for monitoring journaling status, databases size, license end date.

We recently got a new instance of Caché on Windows. I'm just curious to know whether anyone coded database monitoring scripts on Windows using PowerShell or any other scripting language.

If yes, please share the details.

Thanks & Regards,

Bharath Nunepalli.

3
0 583
Question Thembelani Mlalazi · Aug 15, 2019

I have a list property that I query from the database to get the values contained in that list using $LISTFROMSTRING() when the list is returned the list values contain a rectangle like character similar to when you copy past something to the Terminal and it has a preceding space .The problem is I need to compare those values to other values and they do not match because of this value I have tried to use $EXTRACT(value,*W) and *P but this is not striping the preceding character how do I get rid of this character any ideas please. 

the values returned from the Database 

3
0 676