dbms: direct-access and sql file types
DESCRIPTION
DBMS: Direct-Access and SQL File Types. Nico Spence, Chief Marketing Officer Nick Decker, Engineering Supervisor BASIS International Ltd. Overview. BASIS DBMS Direct-result-set navigation and maintenance SQL-result-set navigation and maintenance New DBMS Objects BBjFileInfo - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/1.jpg)
©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
DBMS: Direct-Access andSQL File Types
Nico Spence, Chief Marketing Officer Nick Decker, Engineering Supervisor
BASIS International Ltd.
![Page 2: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/2.jpg)
2©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
Overview
► BASIS DBMS• Direct-result-set navigation and maintenance• SQL-result-set navigation and maintenance
► New DBMS Objects• BBjFileInfo• BBjOpenFileInfo
► IOLISTS vs. Templates► Extended File Types► DBMS Deployment Options
![Page 3: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/3.jpg)
3©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
New DBMS Objects
► BBjFileInfo Object• Provides object-oriented way to access file information
traditionally retrieved from the FID() and FIN()• Associated with an open channel, so it provides a dynamic
view of the file (methods always return current information)• Retrieve information such as
Filename Filesize Filetype Key information Record information
![Page 4: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/4.jpg)
4©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BBjFileInfo Demonstration
![Page 5: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/5.jpg)
5©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BBjOpenFileInfo
► Programmatic access to opened file information• Advisory Locking• Extracted• File name• Locked• Open Type• Read Only• User• ID String• Host Name• Force Close• Documentation Link
![Page 6: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/6.jpg)
6©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BBjOpenFileInfoDemonstration
![Page 7: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/7.jpg)
7©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
Extracted Record Demonstration
![Page 8: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/8.jpg)
8©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
IOLISTS
► IOLISTs - legacy style of input with drawbacks• Code using IOLISTs is less legible and more difficult
to maintain0100 IOLIST A$,B[ALL],C$,D,IOL=200
0200 IOLIST E$,F,G$
• IOLISTs are significantly slower than string templates
![Page 9: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/9.jpg)
9©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
String Templates
► String templates – modern input style with advantages• Describes a record in a file or SQL result set
Field name Data type (character, numeric, etc.) Fixed or variable length Terminators, padding characters
![Page 10: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/10.jpg)
10©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
String Templates
► String templates (continued) • Easy access to fields• Required for SQL and SELECT verb access• Significantly faster than IOLISTs• Code is more legible and easier to maintain• Can be retrieved via
SQL GET TABLE INFO Text area in VKEYED File
![Page 11: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/11.jpg)
11©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
Extended File Types
► XKEYED files ► JKEYED files► VKEYED files► ESQL Files
![Page 12: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/12.jpg)
12©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
XKEYED File Type
► BBj offers more file types• XKEYED files
Unlimited number of keys Unlimited number of key segments Unlimited key length Smaller than MKEYED files Faster record iteration
![Page 13: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/13.jpg)
13©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
XKEYED Demonstration
![Page 14: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/14.jpg)
14©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
XKEYED Demonstration
![Page 15: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/15.jpg)
15©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
JKEYED File Type
► BBj offers more file types (continued)
• JKEYED Files (Journaled Files) All file modifications are:
♦ Atomic – all operations completely succeed or completely fail
♦ Logged to automatically restore a potentially corrupt file to its last known good state
![Page 16: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/16.jpg)
16©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
JKEYED File Type
► BBj offers more file types (continued)
• JKEYED Files (Journaled Files) Transaction Tracking
♦ Allows the programmer to define a set of operations on multiple files to be treated as a single operation
♦ Allows programmer to commit or rollback the entire operation
![Page 17: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/17.jpg)
17©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
JKEYED File Type
► BBj offers more file types (continued)
• JKEYED Files (Journaled Files) True variable length records
♦ Perfect for BLOBs (Binary Large Objects) to store- Images- Audio- Video- Complete documents
![Page 18: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/18.jpg)
18©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
VKEYED File Type
► BBj offers more file types (continued)
• VKEYED Files True variable length records
♦ Reduced disk usage♦ Perfect for BLOBs (Binary Large Objects) to store
- Images- Audio- Video- Complete documents
![Page 19: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/19.jpg)
19©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
VKEYED File Type
► BBj offers more file types (continued)
• VKEYED Files (continued)
Dynamic keys - add, remove, and change keys Named keys - reduce maintenance coding Text area - write string templates in the header
![Page 20: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/20.jpg)
20©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
VKEYED File Type
► BBj offers more file types (continued)
• VKEYED Files (continued)
REM Create a VKEYED fileREM 64 is the expected average record size
erase p_file$,err=*next
vkeyed p_file$,[1:1:6],[2:1:3],[3:1:2:"D"],0,64
![Page 21: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/21.jpg)
21©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
VKEYED Details Demonstration
![Page 22: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/22.jpg)
22©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BBjFileInfo
► BBjFileInfo Object (continued)
Special VKEYED functionality Add keys Remove keys Change existing keys Set key names Set associated text
![Page 23: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/23.jpg)
23©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BASIS DBMS – New File Types
![Page 24: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/24.jpg)
24©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BASIS DBMS – New File Types
![Page 25: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/25.jpg)
25©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BASIS DBMS – New File Types
![Page 26: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/26.jpg)
26©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
VKEYED File Size Demonstration
![Page 27: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/27.jpg)
27©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
VKEYED File Speed Consideration
► Disk Speed► Network Speed► File structure► Differences measured in milliseconds
![Page 28: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/28.jpg)
28©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BASIS DBMS – New File Types
► BBj offers more file types (continued)
• ESQL Files Exclusively for SQL access; not a BBj file Created via SQL ‘Create Table’ syntax
♦ Configured in the Database Properties section of the Enterprise Manager
![Page 29: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/29.jpg)
29©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BASIS DBMS – New File Types
► BBj offers more file types (continued)
• ESQL File Features Contains dictionary information in the file Supports variable length records Supports dynamic index creation Offers true SQL data types
♦ Numeric values with a precision and scale♦ Dates & Timestamps
- Stored as a native type- No longer require mapping to a column extension
![Page 30: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/30.jpg)
30©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BASIS DBMS – New File Types
► BBj offers more file types (continued)
• ESQL File Features (continued)
Optimizations♦ Performance gains
- Faster inserts- Faster data retrieval
♦ Able to read a single column instead of always reading a whole row- No longer byte array based
![Page 31: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/31.jpg)
31©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BASIS DBMS – New File Types
► BBj offers more file types (continued)
• ESQL File Features (continued)
Future enhancement possibilities include ♦ Identity columns (auto increment)♦ Column and row constraints
- Foreign key relations- Not NULL constraint- Default values
♦ Optional Case-Sensitivity♦ Support for advanced ALTER TABLE syntax
![Page 32: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/32.jpg)
32©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
ESQL Demonstration
![Page 33: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/33.jpg)
![Page 34: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/34.jpg)
34©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
BBj File Type Comparisons
BBj File
Maximum Keys
Maximum Key Size
Maximum File Size
Random Access
Highly Recoverable
Variable Length Records
Dynamic Key Chains
SQL Only Journaled
Indexed 0 N/A 2GB xSerial 0 N/A 2GB xDirect/Sort 1 64 2GB xMKeyed 16 120 2GB xMKeyed:Recoverable 16 120 2GB x xMKeyed:4GB 16 120 4GB xMKeyed:4GB:Recoverable 16 120 4GB x xMKeyed:64bit 16 120 Unlimited xMKeyed:64bit:Recoverable 16 120 Unlimited x xXKeyed Unlimited Unlimited 2GB xXKeyed:Recoverable Unlimited Unlimited 2GB x xXKeyed:4GB Unlimited Unlimited 4GB xXKeyed:4GB:Recoverable Unlimited Unlimited 4GB x xXKeyed:64bit Unlimited Unlimited Unlimited xXKeyed:64bit:Recoverable Unlimited Unlimited Unlimited x xJKeyed Unlimited Unlimited Unlimited x x xVKeyed (64bit & Recoverable) Unlimited Unlimited Unlimited x x x xESQL N/A N/A Unlimited x x x x x
If backwards compatibility with PRO/5 is required, BASIS recommends using MKeyed:64bit:Recoverable filesIf backwards compatibility with PRO/5 is not required, BASIS recommends using VKeyed
![Page 35: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/35.jpg)
35©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
DBMS Deployment Options
► Single-tier• Thin Client • Interpreter • DBMS
► Two-tier• Fat Client on different machines• DMS on separate machine
► Three-tier• Thin Client on different machines and the Interpreters running on the
same machine with the DBMS• Thin Client of different machines connecting to a centralized
interpreter server that connects to a separate DBMS server
![Page 36: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/36.jpg)
36©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
DBMS RedundantDeployment Options
► Load-balanced interpreter servers connecting to:• Storage area network SAN connected to RAID
• High-availability servers
• Highly Recoverable File System
• Journaled File System
![Page 37: DBMS: Direct-Access and SQL File Types](https://reader036.vdocument.in/reader036/viewer/2022062301/56814d84550346895dbae359/html5/thumbnails/37.jpg)
37©1985-2006 All rights reserved. U.S. 1.800.423.1394 International +1.505.338.4188 Tech Support +1.505.345.5021 [email protected] www.basis.com
Summary
► BASIS DBMS• Direct-result-set navigation and maintenance• SQL-result-set navigation and maintenance
► New DBMS Objects• BBjFileInfo• BBjOpenFileInfo
► IOLISTS vs. Templates► Extended File Types► DBMS Deployment Options