Skip to main content

Posts

Showing posts with the label ingres

Ingres vs Postgres MVCC Explained With Neo4j's LLM Knowledge Graph Builder

 LLM Knowledge Graph Builder is an application designed to turn unstructured data such as pdfs, text documents, YouTube videos, and web pages, into a knowledge graph stored in Neo4j, promising much better accuracy than simple RAG (Retrieval-Augmented Generation). https://www.i-programmer.info/news/80-java/17967-ingres-vs-postgres-mvcc-explained-with-neo4js-llm-knowledge-graph-builder-.html

Upgrading to a newer Ingres version breaks SQL query

The following query (ignore most fields,just pay attention to d1.last_aa )   Q1   select d1.last_aa,           m.c_ylikoy as c_ylikoy,           n_ylikoy = m.n_ylikoy,           c_typ_ylik=tf.c_typ_ylik,           n_typ_ylik = tf.n_typ_ylik,           tm_mesh=m.tm_mesh,           pt_fpa=m.pt_fpa,           pt_fpa_last= d1.pt_fpa,           end_eis_ex = d.end_eis_ex,           ps_diaqesh = sum(d.ps_diaqesh),                    tm_monadas = avg(d.tm_monadas),           c_mon_metr = m.c_mon_metr,           c_typ_gmdn = m.c_typ_gmdn,           c_loga = m.c_loga,           c_cpv = c.c_cpv,     ...

The Enduring Influence Of Postgres

A historical recollection of the Postgres project and its impact on the DBMS industry provides an insight into the key features of the object-relational database as conceived by Mike Stonebraker. Looking Back at Postgres,   freely available as an arXiv.org pdf, is an essay that also forms part of the just released book  "Making Databases Work The Pragmatic Wisdom of Michael Stonebraker" . It comes from Joseph M. Hellerstein, a prominent research member of the UC Berkeley Postgres project, which was led by the Stonebraker think tank from the mid-1980's to the mid-1990's, and takes us on a magnificent tour through the evolution of the Postgres project. During that journey, Hellerstein pauses on its milestones to elaborate on its forward thinking that planted the roots of the technologies that shape the database industry today, decades after the project's conception. full article here

Connecting To The Outside World with Perl and Database Events

There are times when I want my database to be able to talk to the outside world, rather than the other way around. Let's explore some scenarios where this ability would come handy before implementing a solution using Ingres RDBMS and Perl. You can see the result in action and the code is available to replicate it with any RMDBS. For example, the database ought to  alert  an external entity: A. in a Drugstore, whenever an item's stock decreases beyond a fail-safe limit B. in a Post Office, whenever an item arrives and its barcode is scanned C. in a Hospital, whenever a patient is diagnosed with a condition D. in a Hospital, whenever a patient is admitted into the Hospital or is prescribed medicine full article on i-programmer.info

Actian X/Ingres - Working around the limitations of the GLOBAL TEMPORARY/SESSION TABLES

An attempt to work around the Limitations of Database Procedures when used with Global Temporary Tables Successfully tested on  Ingres II 9.2.0 (int.lnx/118)NPTL On Ingres II 10.0.1 (a64.lnx/100)NPTL returns error: E_SC0206 An internal error prevents further processing of this query.     Associated error messages which provide more detailed information about     the problem can be found in the error log, II_CONFIG:errlog.log Code on GitgHub

Ingres 11 detailed technical preview

Version 11 of Actian's Ingres open source RDBMS, is going to be a major release as indicated by the jump in the version number. The sequence goes 10.0.0, 10.1.0, 10.2 and from there to 11. This heralds quite a few changes and welcome additions. The technical preview available at the moment provides only the bare minimum of information, so we dug deeper and can now reveal the most important new features, as far as developers are concerned, broken down by category. full article on i-programmer

SQL Workshop – Having Clause With NULLs

SQL Workshop is where we confront real world scenarios that SQL devs face on a day to day basis, especially when having to maintain legacy systems. This one looks at the problem of handling partially delivered orders. For this example imagine that you are in charge of an order processing system for a large corperation.. read on i-programmer

SQL Workshop - Removing Duplicate Rows

Let’s say that we have a heap table without keys, solely used for dumping raw data into. That data at some point is filtered and cleaned up for further use. As time passes and data accumulates, duplicate rows creep in causing all sorts of issues. So, using SQL, how do we remove the duplicates but keep the one row necessary? Read it on i-programmer

SQL Workshop - Selecting columns without including a non-aggregate column in the group by clause

Thinking in terms of sets and set operations can be difficult at first but after a while you discover that you can do things without needed to drop down to procedural approaches. This scenario requires us to be members of a hospital's Dietary Department and with the end of the year approaching we are assigned the task of estimating the amount of money needed for next year’s resource shopping, to keep the patients fed for the coming twelve months. So we need to find the sum of the mean amount spent on the resources/raw material (vegetables, fruit, meat etc) grouped by Account Category (i.e. the account that serves for fruit) and Account Id (actual account number) used for their shopping, and use that as the basis for our new season’s budget estimate. When a request for, say, fruit comes in, we translate that request into the amount of money consumed using a formula based on the fruit’s dynamically updated Mean Value, the Quantity of the request and a Ratio. W...

SQL Workshop - Subselects And Join

SQL Workshop is where we confront the type of problems SQL devs face on a day to day basis. The example here is based on a real problem encountered in Ingres - but it has been simplified for the purpose of illustration. What do you do when you can't use a subselect within a Join? Full article here (i-programmer)

old gcc + new a2ps = library mismatch

I wanted to set up a2ps 4.14 on an old SCO Unix machine (which suprsingly had a gcc compiler installed) for Transforming Ingres' legacy reports with PostScript  Before you set up a2ps, you have to set gperf up first. Its installation  was a breeze, so I assumed that a2ps would install easily too.....However that was not the case; when reaching the 'make' phase I was getting the following error : Making all in lib make all-am Making all in src make all-am /bin/ksh ../libtool --tag=CC --mode=link gcc -g -O2 -o a2ps main.o read.o sshread.o ssheet.o select.o generate.o delegate.o regex.o buffer.o ve rsions.o ffaces.o version-etc.o long-options.o parsessh.o lexssh.o lexps.o sh eets-map.o ../lib/liba2ps.la -lm gcc -g -O2 -o a2ps main.o read.o sshread.o ssheet.o select.o generate.o delegate .o regex.o buffer.o versions.o ffaces.o version-etc.o long-options.o parsessh.o lexssh.o lexps.o sheets-map.o ../lib/.libs/liba2ps.a -lm  ...

Transforming Ingres' legacy reports with PostScript (Part 1)

this : Plain text ASCII report (plain.jpg) into this : PostScript report (postscript.jpg) How things work at the moment: PC's with Windows OS run terminal emulators which connect to Unix/Linux servers. When the ABF application generates a report its output is dumped on disc as a plain text file which is subsequently send to a network or local printer. When local printing is required (the printer is attached locally to the PC running the emulator) then the emulator opens a direct connection to the local printer port by using special escapes (called transparent ot pass-thru printing) and then forwards the plain text file to it. In either case the file is forwarded to the printer in RAW format, bypassing any printer drivers and thus is printed as-is. The same process holds also true for reports generated by OpenRoad on Windows The disadvandes of this approach are : (1). although sent in RAW format, the interpretation lies on the printer at hand; for example some print...

Auto generated sequences, the silver bullet for concurrency ?

Ingres incorporated automatic generated sequences, a feature that was built into other dbms products, into version 9 onwards. So are automatic generated sequences just for convenience or are they really useful? They have many advantages which are speed, especially when caching is enabled, scalability, and elimination of concurrency issues associated with unique key generation. But the drawback is that they can introduce gaps in the sequence in a variety of ways : since auto generated sequences are an object that lives in the server, on server failure it is lost. The same is true in case of caching since it can age out of the shared pool. Gaps can also be introduced programmatically e.g. by means of a rollback: user A is getting a number from the sequence let's say number 8 and commits user A is getting the next number from the sequence, number 9 user B is getting the next number from the sequence, number 10 user A rolls back and user B commits thus a gap was effective...

Lightweight session tables

The session wide temporary tables are a very useful feature. You create the table, use it for your intermediate results and then you don't have to drop it, it's dropped automatically when the session ends. This, except of the the ease of use that it provides has another advantage; in case of a session or system failure after a commit has been issued the table if not temporary would remain in the database after recovery.With the temporary table you have no such as issues. An issue arises when you want to use multiple temporary tables with the same name within the same session ;e.g when the user presses a key I use a temporary table to store the product codes and print them in barcode labels. The user might want to re-print additional barcode labels so he must press the key again to initiate printing thus a 'Duplicate table' error occurs since the table has been already created. To overcome this issue I create multiple temporary tables by basing their name on the tim...

IIseterr or iiseterr ?

Elaborating more on the IIseterr/iiseterr naming conflict by doing some research on the symbol tables inside archive library libingres.a (a refresher on the issue: http://perlingresprogramming.blogspot.com/2008/10/do-not-trust-manual.html) The following entry is from the library implementation that will compile with 'iiseterr' libingres.a:iiuflibq.o:00000cf0 T iiseterr_ libingres.a:iiuflbqL.o:00000cf0 T iiseterr libingres.a:iiaclibq.o:000008a0 T IIpseterr libingres.a:iiseterr.o:00000000 T IIseterr we see that there are four implementations of iiseterr each one in a different library, thus any of the four can be used in the source code and will compile fine In the offending implementations where the undefined reference error occurred there is no 'iiseterr' entry (as in the manual) for any library contained in libingres.a; however there is an IIseterr entry and that is why when capitalizing both i's the symbol can be found and hence compile. (it would com...