
Introducing DatabasePak
DatabasePak is a high performance SQL widget toolkit for building Motif
client/server applications on UNIX.¨ With DBPak developers can use well-known Motif programming techniques to build database applications that handle the most complex requirements.
Innovative Architecture
DatabasePak(TM) (DBPak(TM))offers an entirely new way to build Motif database applications. DBPak lets developers leverage the full capabilities of relational databases, without compromising performance or productivity. With DBPak's SQL widget toolkit architecture, Motif developers can develop complex client/server applications without having to learn the internals of database development. However, DBPak is not a 4GL; developers use C or C++ with standard Motif calling conventions.
Key Features
- Automatically retrieve, update, and display database information
- Motif widget-based API
- Supports Sybase and Oracle
- Schema Browser--view database structure and content
- Creates dynamic SQL
- Optionally uses stored procedures
- Table widget--tabular data display
- Field validation via picture editing and look up
- Full control over database transactions
SQL Widget Toolkit
DatabasePak offers a rich set of SQL widgets highly optimized for database development. DBPak offers three types of SQL widgets:
- Data Presentation Widgets
- Data Management Widgets
- Database Access Widgets
These widgets work closely together to generate SQL queries at runtime, pass the queries to a database server, and automatically format the results for the end user.
Customize Widget Behavior
DatabasePak widgets automatically manage common database functions like retrieving data from the database, determining how the information should be displayed on the interface, and updating the database with new or changed data. Developers may, however, override "automatic" functions by:
- Setting resource values in the SQL widgets
- Using the callback issued before any "automatic" function to call substitute Motif, Oracle OCI, or Sybase DBLib routines, or stored procedures
- Calling one of the DBPak convenience routines
Data Presentation Widgets
Data Presentation widgets let end users view and update database information. They include widgets like Data Field and Option Menu.
Data Presentation widgets ensure end users enter valid data by supporting picture statements and look up.
- Picture Statements can be used to confirm that entries match a particular format. For instance, if the user should be forced to enter a date that looks like,
"9/14/72," the widget can be set to issue an error message if it receives invalid input.
- Look up is used when valid entries are restricted to a certain set of values. Thus, if a field is restricted to "Mr.," "Mrs.," or "Ms.," the end user will get an error message if any other value is entered.
Data Management Widgets
Data Management widgets let the developer manipulate the database without having to learn either Oracle OCI or Sybase DBLib. This intermediate layer is the key to the unique architecture of DBPak.
Query Widgets
Query widgets coordinate communication between Database Access widgets and Data Presentation widgets. When database information changes, the Query widget determines which parts of the interface need to be refreshed, and coordinates the updates. Similarly, when the database should be brought up to date to reflect the end user's input, it is the Query widget which collects the changes from the Data Presentation widgets and builds an SQL statement to communicate the changes to the database.
Although the Query widget does not appear on the interface, it uses the standard Motif widget API, making it easy for Motif developers to understand and use.
Table Widget
DatabasePak's Table widget combines a special Query widget with powerful geometry management capabilities. The Table creates a scrollable table holding Data Presentation widgets. User input, database updates, keyboard traversal, and scrolling are all handled completely and automatically. However, each of the automatic features can also be controlled by the developer. For instance, Table columns can be set to be "frozen" instead of scrollable.
Dynamic SQL and Stored Procedures
Query widgets build SQL statements either dynamically or by accessing stored procedures. DatabasePak lets developers reuse stored procedures already written for either Sybase or Oracle. Using stored procedures, developers can leverage existing code and easily use existing data control models.
Transaction Control
Query widgets also offer full transaction control so that developers can control exactly when changes to data are committed to the database.
Control Buttons and Control Panel
Control Buttons are Motif Push Buttons and Arrow Buttons with built-in functions to search, navigate, update, insert, and delete records. The work together automatically, especially when they are used with the Control Panel widget.
Database Access Widgets
Every DatabasePak application depends on a Database Access widget to set up the
connection between the application and the database server. Database Access widgets
encapsulate all server-dependent code. Currently, DBPak offers Database Access widgets for Oracle and Sybase.
For developer convenience, DBPak also includes a Login widget which prompts the user for a database server name, user name, and password to pass on to the Database Access widget.
Schema Browser
The Schema Browser solves a common 3GL development problem--not being able to view the structure and contents of the database server. The Schema Browser connects to a database server and graphically displays the various databases, tables, column declarations and types, primary keys, and sample data.
DatabasePak Widgets
Data Presentation Widgets:
- XiDBDataField
- XiDBList
- XiDBOptionMenu
- XiDBRadioBox
- Database Aware Motif Widgets:
- XiDBText
- XmDBTextField
- XmDBScale
- XmDBToggleButton
- XmDBLabel
Data Management Widgets:
- XiDBControlPanel
- XiDBTable
- XiDBQuery
- Database Aware Motif Widgets:
- XiDBArrowButton
- XiDBPushButton
- XiDBScrollBar
Database Access Widgets:
- XiDBSybaseDataSrc
- XiDBOracleDataSrc
Utility Widgets:
More SQL Widgets
DBPak also adds database awareness to some of the ICS EnhancementPak Business Edition widgets which are sold separately:
- XiCombination-Box
- XiPlotter
- XiLinePlot
- XIBarPlot
- XiPieChartPlot
Development System Requirements
User Interfaces: Motif v1.2.x; X11R5
Minimum Recommended
Memory: 16 MB 24 MB
Graphics Display: 1024 x 768 1280 x 1024
Platforms
SunOS 4.1.x; Solaris 2.x; HP UX 9.0.x.
Supported Databases
Oracle 7.x; Sybase 4.x; Sybase 10.x.