DataDictionary: Difference between revisions

From DataFlex Wiki
Jump to navigationJump to search
m (enough formatting for now ;))
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
TODO: integrate this with [[Data Dictionaries]]
= Definition =
A data dictionary is defined as the business layer in-bewteen your table on disk, and the requested operation at runtime.  It handles the find, clear, save, validate, and delete requests from either the programmer or the user.  A data dictionary exists both as a class coded definition and as an instantiated object which uses full delegation and polymorphism in the form of a data dictionary object in a "tree" structure for the data set you wish to perform an operation on.


A data dictionary is defined as the business layer in-bewteen your table on disk, and the requested operation at runtime.  It handles the find, clear, save, validate, and delete requests from either the programmer or the user.  A data dictionary exists both as a class coded definition and as an instantiated object which uses full delegation and polymorphism in the form of a data dictionary object in a "tree" structure for the data set you wish to perform an operation on.
= editing a Data Dictionary =


Editing a DataDictionary CLASS in Visual DataFlex involves at least 10 identifiable options:
Editing a DataDictionary CLASS in Visual DataFlex involves at least 10 identifiable options:
Line 17: Line 18:


All together, these 10 functional abilities to centrally define data table rules are dwarfed by the fact that they are "hitched up in tandem" like a team of "Budweiser Clydesdales" which work interconnectedly to enforce your entire data structure on any data operation which includes save, clear, find, delete, and validation.
All together, these 10 functional abilities to centrally define data table rules are dwarfed by the fact that they are "hitched up in tandem" like a team of "Budweiser Clydesdales" which work interconnectedly to enforce your entire data structure on any data operation which includes save, clear, find, delete, and validation.
=  How to use Data Dictionaries  =
The [[Database Builder]] tool helps you defining the class with visual aid for:
*Field settings like ''Capslock''
*Table settings like calculations on save or save/delete validations
*Relationship settings like [[Cascade Delete]].
The Datadictionary class can also contain and business rules required when records are created, edited or deleted.
==How to create a new Data Dictionary from scratch==
#Open [[Database Builder]].
#Create a new table
#Enter some columns (input name, type and width)
#Choose '''Maintenance''' and '''Create Empty DataDictionary'''.
==How to create Relationships==
Before creating relationships, make sure that both tables should have an index.
*use 'the relationship wizard' in the database builder.
== Use Data Dictionaries in Batch Processes ==
When using the studio, the usage of Data Dictionaries are very naturally integrated into your project. But when doing a save without dbForm objects eg in a batch process or so, a lot of developers are going back to the file buffer way. This way it bypasses the class structure you carefully put in place for saves, deletes, updates etc.
Please check [[Using Data Dictionaries in Business Processes]] for help and sample code.
=Supported backends=
It is possible to reach several databases through the Data Access [[DataFlex Connectivity Kit]] or using third party
drivers from Mertech Data [http://mertechdata.com/rainbow/site/1/default.aspx]
*[[Native DataFlex database]]
*[[Oracle]] [http://wiki.oracle.com/page/Database]
*[[Microsoft SQL Server]] [http://msdn2.microsoft.com/en-us/sql/default.aspx]
*[[Pervasive]] [[SQL]] [http://ww1.pervasive.com/developerzone/access_methods/btrieve.asp]
*[[ODBC]]
*[[MySQL]]
*[[IBM DB2]]
[[Category:Basics]]
Anonymous user

Navigation menu