Lescasse Consulting
 Home    Company    News    Prices    Download    Buy    Forums   
Read Me
Buy
Forums
Resume
AntiSpam 1.2
wBackup 1.11
NetAccess 2.0
Visual APL 1.0 
APL+Win 8.0 
APL+Win Products 
APL+Win Objects™ 
APL+Win Training 
     • Packages
     • Feedback
     • World Map
     • Updates
     • Pack 1
     • Pack 2
     • Pack 3
     • Pack 4
     • Pack 5
     • Pack 6
     • Pack 7
     • Pack 8
     • Pack 9
     • Pack 10
     • Pack 11
     • Pack 12
     • Pack 13
     • Pack 14
APL+Web Services
APL+Web Component 
APL+ History
Dyalog.Net Tutorial
Conferences 
Powerpoint
White Papers
Web Hosting
References
Links
 
APL+Win Objects™ 6.0

TADO5
TADO5 Tutorial
TAPLDraw5
TAPLEdit5
TAPLSession5
TAbale5
TAboutBox5
TAccess5
TAgent5
TBlatMail5
TButton5
TCDO5
TCRC5
TCancelButton5
TCheck5
TCheckGroup5
TChildForm5
TChooseColor5
TChooseFont5
TClipBoard5
TClock5
TCodeStats5
TColors5
TCombo5
TComboDrive5
TComboFilter5
TComboList5
TComboTree5
TCommandBar5
TCommandButton5
TControlClass5
TCueCard5
TDHTML5
TDHTMLEditor5
TDateTime5
TDateTimeFr5
TDates5
TDemoHandlers5
TDisplay5
TDOS5
TDualSelect5
TEdit5
TEditAmount5
TEditDir5
TEditEnter5
TEditFile5
TEditGrid5
TEditList5
TEditListview5
TEditMenu5
TEditNum5
TEditSelect5
TEditSpin5
TEmail5
TError5
TExampleForm5
TExcel5
TExcel5 Tutorial
TFindReplace5
TFOne5
TFTP5
TFTP5 Tutorial
TFileCompare5
TFileMenu5
TFileMenuDef5
TFlatButton5
TForm5
TFormClass5
TFormEditor5
TFrame5
TGetDir5
TGif5
TGifForm5
TGifWb5
TGoMenu5
TGraphX5
TGrid5
TGridDisplay5
TGridPrint5
TGUID5
THLine5
THTML5
THTML5 Tutorial
THTTP5
THelp5
THelpMenu5
TImagelist5
TInfo5
TIniFile5
TInstall5
TInternet5
TJpg5
TJpgWb5
TLabel5
TList5
TListview5
TLock5
TLogs5
TMAPI5
TMath5
TMDIForm5
TMSOutlook5
TMaskEdit5
TMedia5
TMenu5
TMessage5
TModalCall5
TMsgBox5
TNavigator5
TNetwork5
TNonVisualClass5
TODBC5
TOKButton5
TObject5
TOpenFile5
TOption5
TOptionGroup5
TOutlook5
TOutlookMail5
TOWCSpread5
TPDF5
TPFKeys5
TPage5
TPassword5
TPicture5
TPing5
TPopupMenu5
TPowerpoint5
TPowerpoint5 Tutorial
TPrinter5
TProgress5
TProgressDlg5
TQuestion5
TRegistry5
TRegistryKey5
TResource5
TRichEdit5
TSPX5
TSQLDMO5
TScheduler5
TScroll5
TSelector5
TSpinner5
TSplitter5
TStatus5
TStopWatch5
TTest5
TTestError5
TTextFile5
TTimer5
TTip5
TTipForm5
TTLI5
TToolBar5
TToolbox5
TToolsMenu5
TTrackbar5
TTranslate5
TTree5
TVLine5
TViewMenu5
TWebBrowser5
TWebServer5
TWebSite5
TWebSiteNet5
TWinMenu5
TWord5
TYesNo5
    Visits:  1864 (53 on line) Last Update: Nov 23, 2003  
    APL+Win Training Pack 9    Printer Friendly  
Developing a Relational Database in APL+Win (part 1)

Download APL+Win Training Pack 9 (263 K)

With this APL+Win Training Pack you enter the realm of Relational Databases and learn how APL+Win can perfectly fit to the Relational model.

The TOOLKIT.W3 delivered workspace contains a large set of utilities which you can use to:

  • create your own Relational Databases in APL+Win
  • fill your Relational Databases with APL data
  • query your database with an SQL-like query language
  • start doing relational queries
  • create and use a sample Relational Database
  • add or remove columns & tables from a Relational Database

This APL+Win Training Pack contains the first part of an extremely powerful Relational Database Engine which can outperform standard databases (Oracle, Sybase, MS Access, Paradox, etc...) by sometimes factors of more than 100!


This Relational Database Engine can let you create and exploit databases with hundreds of tables and columns and millions of rows, with remarquable performance. For example, to:

  • select records where a numeric column matches a given criteria, and
  • extract the found records data from a table with 500,000 rows and 4 columns

takes less than 3 seconds on my rather slow Toshiba 720 CDT portable (Pentium 133).



      Œts Ş bbb„Select AllBut lilNo From lil Where lilOrdno Eq 11 Ş Œts
1997 6 28 16 41 51 990
1997 6 28 16 41 54 570

The instruction above reads 10 million bytes from the hard disk (because for this particular query hits are spread out within the 500000 table records) and extracts 44899 extracted records!

If the hits had been grouped in the first 100000 records and if setting the blocking factor to 100000 the above query would give results in less than 1 second.


      Œts Ş bbb„Select AllBut lilNo From lil Where lilOrdno Eq 12 Ş Œts
1997 6 28 16 48 27 240
1997 6 28 16 48 28 230


And this is with non indexed columns!


Quickly discover below how to use this Relatinal Database System:


Create a new database



       Create Database 'c:\temp\new'
c:\temp\new.lc

Creating 2 tables in this database:


       Create Table 'sup' 'Suppliers'
sup Suppliers
       Create Table 'pro' 'Products'
pro Product

Creating columns in the Products and Suppliers tables:


       Create Column 'supname' NotNull PrimaryKey Char(20)
c:\temp\supname.new
      Create Column 'proname' NotNull PrimaryKey Char(12)
c:\temp\proname.new
       Create Column 'proprice'	Float
c:\temp\proprice.new
      Create Column 'prosupno' Integer ForeignKey supNo supName
c:\temp\prosupno.new

List existing tables and columns:


      List Tables
Num  Name Deleted Description
ŻŻŻ  ŻŻŻŻ ŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻ
1001 sup       21 Suppliers
1003 pro       22 Products

      List Columns
Num  Name     NotNull PKey FKey  LinkName LinkAlt Type    Width Format Records
ŻŻŻ  ŻŻŻŻ     ŻŻŻŻŻŻŻ ŻŻŻŻ ŻŻŻŻ  ŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻ ŻŻŻŻ    ŻŻŻŻŻ ŻŻŻŻŻŻ ŻŻŻŻŻŻŻ
1002 supNo    NotNull                             Integer     1 I8           0
1004 proNo    NotNull                             Integer     1 I8           0
1005 supName  NotNull PKey                        Char       20 20A1         0
1006 proName  NotNull PKey                        Char       12 12A1         0
1007 proPrice                                     Float       1 F12.2        0
1008 proSupno              supNo supName        0 Integer     1 I8           0

Adding data to the Products and Suppliers tables:


     Insert Into sup Values(›'APL2000')
     Insert Into sup Values(›'Lescasse Consulting')
     proname„œ'APL+Win' 'APL Book' 'APL+Dos' 'APL+Unix' 'DLL Parser'
     proprice„10000 800 8000 12000 2000
     prosupno„1 2 1 1 2
     Insert Into pro

Using Select to extract data from tables:


      Frame Select * From sup
RecNo Name
ŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
    1 APL2000
    2 Lescasse Consulting
		
      Frame Select * From pro
RecNo Name         Price Supplier
ŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻ ŻŻŻŻŻŻŻŻ
    1 APL+Win      10000        1
    2 APL Book       800        2
    3 APL+Dos       8000        1
    4 APL+Unix     12000        1
    5 DLL Parser    2000 2

      Frame Select * From pro SortedBy proSupno,-proName
RecNo Name         Price Supplier
ŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻ ŻŻŻŻŻŻŻŻ
    1 APL+Win      10000        1
    4 APL+Unix     12000        1
    3 APL+Dos       8000        1
    5 DLL Parser    2000        2
    2 APL Book       800        2

      Frame Select * From pro SortedBy proSupno,-proName Where proName Contains'APL'
RecNo Name         Price Supplier
ŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻ ŻŻŻŻŻŻŻŻ
    1 APL+Win      10000        1
    4 APL+Unix     12000        1
    3 APL+Dos       8000        1
    2 APL Book       800        2

Performing selection in one table and extracting from another one:


      Frame Select * From pro Where supName Eq'APL2000'
RecNo  Name         Price Supplier
ŻŻŻŻŻ  ŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻ ŻŻŻŻŻŻŻŻ
    1  APL+Win      10000        1
    3  APL+Dos       8000        1
    4  APL+Unix     12000        1

Looking at extracted data:


      proname
APL+Win
APL+Dos
APL+Unix

      proprice
10000 8000 12000

      (proprice>9000)šproname
APL+Win
APL+Unix

Etc.


Removing the database:


      Drop Database 'new'

Creating a sample database with one table having 1000000 (one million) records:


      Œchdir'c:\temp'
C:\aplwin

      Œts Ş SampleDb 1000000 Ş Œts
1997 6 28 17 58 20 30
1997 6 28 17 58 36 560

All these were just a few examples of this powerful Relational Database Engine.


Pack 9 Content

DISK9.DOC An 77 pages Winword document containing Chapter 18 of the APL+Win Training.
TOOLKIT.W3 The first part of an APL+Win Relational Database Engine.
 This entire Web site has been dynamically generated by APL+Win Objects™ 6.0
 For all questions contact:  info@lescasse.com
 Copyright İ 2003-2005 Lescasse Consulting. All rights reserved.