Uniface app adds orphan-row checks to SQLite, which lacks enforced foreign keys
The customer app built in Uniface 10 uses a database of 95 tables that declares no foreign keys, so SQLite can store records like invoice lines whose parent invoice is gone. The article presents a Uniface service, DQ3_SVC, that detects these orphaned rows and also flags data that is valid in form but wrong for the business. Foreign key enforcement is disabled by default in SQLite and must be turned on per connection, while PRAGMA foreign_key_check only works on declared keys. The author's approach runs a NOT EXISTS query for each child-parent relation across 48 pairs and reports every result, including zeros, as evidence that the checks ran. The SQL is portable to any SQLite database and was tested on Rocket Uniface 10.4.03 with SQLite 3.50.2.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in