Introduction to Reality
This topic contains a high-level introduction to the Reality user environment, describing the file structure of a database and the utilities available for database management and inquiry, and operation of system resources.
Overview
Reality is a software environment that supports Reality applications on UNIX and Windows systems. The applications support environment supplied by Reality is a Relational Database Management System (RDBMS), supporting multiple databases on a single host platform, access to Reality files on a foreign (SQL-based) database, a range of powerful utilities for database management and inquiry, and a set of utilities for operating system resources.
Multiple databases
Any number of databases can be created and maintained on the host. The only restriction is disk space availability. This allows independent and secure use of different databases by different departments or groups using the system. Each database comprises a collection of data organised in relational data structures enabling easy access to, and manipulation of data.
Database isolation
Under normal circumstances, all the databases you create on a host will be associated with the same copy of Reality. Although each database is completely separate, problems that affect the underlying Reality system can affect all databases. If you want to prevent this, you can use the Database Isolation feature that allows you to have multiple copies of Reality, running independently of each other.
Reality files on foreign databases
It is possible to create and maintain Reality files on a foreign (SQL-based) database. Reality applications can read and update these files just as if they were on a Reality database.
Notes:
- To do this requires a working ODBC installation, appropriate ODBC driver(s) and Data Source Definition(s) on the Reality system.
- Support for foreign database files is not available on AIX platforms.
SQL view
An SQL view file is a Reality file that provides a view of an existing SQL table (or SQL view) on a foreign database. These files allow Reality applications to access data stored in a foreign database's native format. In most cases these will be used for read access; but it is possible to update files of this type from Reality if you know the format of the external table data and the rules imposed by the foreign database.
Note
To create or access SQL view files, you must have a working ODBC installation (ODBC driver manager), appropriate ODBC driver(s) and Data Source Definition(s) for the foreign database on the Reality system.
SQL access
SQL for Reality enables ODBC- and JDBC-compliant applications to read and write data to a Reality database using SQL. Such applications are compatible with nearly all DBMS. A utility (SQLM) assists in creating SQL tables based on existing Reality dictionary definitions.
External interfaces
Reality includes the following external interfaces:
HTML from English
This allows you embed an English report in a web page for display in browser.
RealWebThis provides the Web developer with DataBasic experience with access to data held in a Reality database by means of a set of Java servlets running on a web server and a DataBasic API for constructing HTML pages.
Reality Java Interface
Provides the Java programmer with access to Reality databases by allowing them to call DataBasic subroutines, write servlets that access a Reality database using RealWeb, and connect to a Reality database using the SQL/JDBC.
Remote Basic ActiveX Control
Allows Visual Basic programs running on a Windows PC to run Remote Basic subroutines on a Reality database.
Web ServicesAllows you to make your DataBasic subroutines available to remote applications by exposing them as subroutines and functions on a web server.
XML SupportAllows DataBasic programmers to extract data from and export data to XML documents.
Multiple versions
More than one version of Reality can be installed and used on a system. However, only one version at a time can be installed as the 'live' version, that is, the operational version that supports a large user population. The 'live' version is installed using a software key. All other versions are restricted to a maximum of eight users. This allows for the development and testing of Reality upgrades before going 'live'.
For more details, refer to Running Multiple Versions of Reality in the Installation Guide appropriate to your system (UNIX or Windows).
Database types: partition and filestore
Two types of Reality database can be created:
-
Partition database (UNIX and Windows).
-
Filestore database (UNIX only).
Refer to Types of Database for descriptions of these database types and their comparative benefits.
System configuration
The diagram below shows a simplified schematic diagram of Reality on a UNIX or Windows system.
Database management utilities
Reality supports a range of powerful facilities for database management and inquiry, including:
-
Terminal Control Language (TCL); the primary interface between a database user and the Reality software.
-
English; an inquiry language which provides an easy-to-use tool for retrieving data from a Reality database and generating a report.
-
DataBasic; an extended version of the BASIC programming language that can be used to create user applications.
-
Proc; a job control language, used to execute batch jobs or other scheduled activities.
-
EDITOR and Screen Editor, two text editors; one a line-oriented text editor and the other, a full screen text editing utility. Both utilities can be used to create and edit items in Reality text files.
-
Indexing (or AutoIndexing); can be used to increase speed of access to Reality files. English, DataBasic and TCL can explicitly use any defined indexes, and will in some cases also use indexes implicitly. SQL enquiries use indexes implicitly. Indexes are automatically maintained once defined.
-
Transaction Handling; a facility, used to keep sets of related database updates (transactions), as defined within applications, together and prevent a database from becoming inconsistent due to a process failing in mid-transaction.
-
Transaction Logging; a facility that protects data and enhances database resilience in the event of the a system failure.
-
Rapid Recovery; a facility that automatically restores a database to a consistent structure within minutes of restarting after a system failure.
-
RealLink for Windows; a software facility that integrates the Reality environment with the Microsoft Windows PC environment.
Operational facilities
Reality provides a set of facilities for controlling system resources from the Reality environment. These include:
-
Spooler. This handles multiple print reports generated in the Reality environment and queues them for despooling to a printer, tape or terminal device, enabling multiple users to share output devices.
-
Save and Restore Utilities. These enable an operator to save all or part of a database to tape from the Reality environment and restore from tape back to a database, facilitating database back-up or data portation between databases.
-
Magnetic Tape Unit Operating Utilities. These comprise a set of TCL commands used to operate magnetic tape units from the Reality environment.
-
Terminal Independent Process Handler (TIPH). This provides the capability to run a process in the background without a terminal.
-
File triggers. These are programs that can be set up to run automatically when a file item is changed or deleted.
Optional facilities
In addition to the standard facilities, Reality also supports some additional resilience options:
-
Shadow Database; a facility that provides increased database resilience from that supported by Transaction Logging.
-
FailSafe; a facility that is installed on two host systems to protect a database against loss of service and data in the event of a system crash. Database resilience is better than that provided by both Transaction Logging and Shadow Database on a stand-alone system.
-
Heartbeat; a software facility available as an optional addition to a Sun/SPARC Solaris Host Platform system which enhances resilience and usability by enabling automatic detection of a system or application failure, and automatic switch-over of users to the secondary database in the event of a primary failure, re-configuring the secondary as a primary.
-
Disaster Recovery; this provides a simple resilience facility for Reality databases that can be used in various ways - for example: to provide offsite replication of a standalone system, or to increase the resilience of Reality Failsafe systems by providing a second, off site, backup system.