Difference between revisions of "DB2"
m (→Features of DB2) |
(→Data Base Access) |
||
Line 6: | Line 6: | ||
== Data Base Access == | == Data Base Access == | ||
It is normally accessed [[DirectDatabaseAccess | directly]] from a [[:Category:Programming | high level language]] such as [[SQL]], or a Data Base Tool like [[Query]]. | It is normally accessed [[DirectDatabaseAccess | directly]] from a [[:Category:Programming | high level language]] such as [[SQL]], or a Data Base Tool like [[Query]]. | ||
+ | |||
+ | New files may be added via | ||
+ | * some [[400 languages and database tools]] | ||
+ | ** [[DDS]] | ||
+ | ** [[SQL]] | ||
+ | ** including data base file output from [[Query]] | ||
+ | * [[IBM]] [[Commands]] to [[*OUTFILE]] | ||
The 400 comes with various commands that permit us to dump or display the contents of files various ways. | The 400 comes with various commands that permit us to dump or display the contents of files various ways. |
Revision as of 16:25, 10 June 2005
DB2 400 is the database built in to OS/400.
Also see DB2 article at [Wikopedia http://en.wikipedia.org/wiki/DB2]
Data Base Access
It is normally accessed directly from a high level language such as SQL, or a Data Base Tool like Query.
New files may be added via
The 400 comes with various commands that permit us to dump or display the contents of files various ways.
Features of DB2
Compared to how files could be structured and accessed on prior IBM and other platforms, DB2 had several revolutionary features that added to the potential programming power of the 400.
Some DB2 capabilities, that we take for granted today on the 400, may have been available on S/38 but not on S/36 SSP.
- DB2 defines data at the system level
- This minimizes / eliminates data redundancy
- Any number of different 400 languages and database tools can access the same file layout, without needing definition within that software
- DB2 supports
- Data Sharing
- Referential Integrity
- Triggers
- Stored Procedures
External Definition
Before the invention of this data base reality, we could only use Internal Definition of files. That means each and every program had to have its own layout of a file, and any dumps of the file showed all the data contigous, not breaking it up into meaningful fields. Forget about being able to access the data with programs like SQL.
With Internal Definition, each program only needed to define the fields it was going to use, which meant there might not be any one place to go for the complete layout of a file.
With External Definition, part of the DB2 file structure is the whole story on the file and its field layout, which can be accessed by any programming language in the IBM family.
Internal Definition is still supported, and we can use it in a program to break an External Definition field down into smaller sub-fields such as through a Data Structure.