Click or drag to resize
DataDictionary Class

[This is preliminary documentation and is subject to change.]

DataDictionary holds metadata about actual data model / database table structure for the "dynamic" data. The metadata consists of information on tables (including descriptions) fields (including descriptions) enumerations : (number, string) pairs per field relations between tables (parent / child relations, including cardinality )
Inheritance Hierarchy
SystemObject
  CSC.SC.TOPICA4.DynamicDataDataDictionary

Namespace: CSC.SC.TOPICA4.DynamicData
Assembly: CSC.SC.TOPICA4.DynamicData (in CSC.SC.TOPICA4.DynamicData.dll) Version: 4.30.6239.27195
Syntax
C#
public class DataDictionary : IComputationMetaData, 
	IEvaluatable

The DataDictionary type exposes the following members.

Constructors
  NameDescription
Public methodDataDictionary
Create new empty DataDictionary
Public methodDataDictionary(Database)
Create a DataDictionary from database db
Public methodDataDictionary(Database, DataRow)
Create a datadictionary from database using database and datarow
Top
Methods
  NameDescription
Public methodAddField
Add new fields to field colelction
Public methodAddNewField(String, String, String, String, DataType, Boolean)
Add new field to fieldcollection and return it
Public methodAddNewField(String, String, String, String, DataType, Int32, Boolean, Boolean, Boolean)
Add new field to fieldcollection and return it
Public methodAddNewTable
Add new table to table collection
Public methodAddRelation
Add new relation to relationcollection and return it
Public methodBuildAugmentedViews
Generate "flat views" for tables - return number of views generated.
Public methodBuildFlatViews
Generate "flat views" for tables - return number of views generated.
Public methodBuildLookUpViews
Generate lookup views - return number of views generated.
Public methodBuildOrphanViews1
Generate orphan views (one view per table) - return number of views generated.
Public methodBuildOrphanViews2
Generate orphan views (one view per relation) - return number of views generated.
Public methodCheckTable(Database, Boolean, DirectoryInfo, String, ProgressCollection) Obsolete.
Compare actual database tables to this DataDictionary (in RAM only - no metadata in database!)
Public methodCheckTable(Database, CommandTimeouts, Boolean, DirectoryInfo, String, ProgressCollection)
Compare actual database tables to this DataDictionary (in RAM only - no metadata in database!) Currently only used for very simple data dictionaries with 1 table.
Public methodCreateTablesAndTriggers
Create table(s) and optionally corresponding triggers. History = false : Only one databse table is created per DataDictionary table. History = true : Two databse tables are created per DataDictionary table (one for registration, and one for history) - and a trigger to automatically copy data from registration table to history table.
Public methodStatic memberDBDelete
Delete DataDictionary from database db
Public methodStatic memberDBExists
Check if database db contains a DataDictionary
Public methodStatic memberDBGet
Get DataDictionary form database - return null it does not exist.
Public methodDBInsert
Insert into database db
Public methodDBLoad
Loads data from specified database using supplied datarow into Datatable and datafield collections
Public methodDBRead
Read from database db
Public methodDBUpdate
Update the DataDictionary already in the table
Public methodDebugPrint
Print to debug listener
Public methodDropTables
Drop tables
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEvaluate
Evaluate partical expression
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindField
Find field by name
Public methodFindRelation
Find relation between parentTable and childTable
Public methodFindRelationByChildTable
Find relation having childTable as child table
Public methodFindTable
Find table by name
Public methodGetExternalRelations
Get all external relations
Public methodGetFieldsWhereDescriptionStartsWith
Get fields where description starts with startsWith
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetOrgUnitConfigureTables
Get tables that have 'OrgUnitConfigure' property set. Used in datamodel >= 4.2 only!
Public methodGetOrgUnitRelationTables
Get tables that require relation to OrgUnit. Used in datamodel >= 4.2 only!
Public methodGetOrgUnitSelectTables
Get tables that require selection of OrgUnit. Used in datamodel >= 4.2 only!
Public methodGetPhraseEnabledFields
Get collection of phrase-enabled fields (as a DataDictionaryFieldCollection. NB: because "phrase-enabled" is NOT stored in DataDictionary (yet), this method returns ALL text fields with size 0 - e.g. all fields of type TextAraea and RichTextArea!
Public methodGetPhraseEnabledFields(Database, String, DataType, Int32)
Get fields where Description starts with startsWith And DataType is Text And Fieldsize is 0 (TextAreas)
Public methodGetPhraseEnabledTableFields
Get collection of phrase-enabled fields (as a DataDictionaryTableFieldCollection. NB: previously "phrase-enabled" was NOT stored in DataDictionary (yet). If no phrase-enabled fields are found, return alle TextArea and RichTextArea fields.
Public methodGetSearchableTables
Get all searchable tables
Public methodGetStructureTypes
Gets the structure types.
Public methodGetStructureTypesDataTable
Gets the structure types data table.
Public methodGetTablesByRelationTable
Get all data dictionary tables that have one or more external relations to referencedTableName
Public methodGetTablesByStructureType
Get all data dictionary tables with structureType
Public methodGetTablesWithPhraseEnabledFields
Get collection of all tables containing one or more phrase-enabled fields. NB: "phrase-enabled" was previously NOT stored in DataDictionary. No tabls wiht phars-enabled fiels are found, return tables with TextArea or RichTextArea fields.
Public methodGetTablesWithTextAreaFields
Get all tables containing one or more TextArea or RichTextArea fields
Public methodGetTextAreaFields
Get all fields of type TexArea (or RichTextArea)
Public methodGetTextAreaTableFields
Get all table/fields of type TexArea (or RichTextArea)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
String representation for debugging etc.
(Overrides ObjectToString.)
Public methodUpdate
Update DataDictionary
Public methodWriteStructure(TextWriter, String)
Write contents of DataDictionary in human readable format to writer
Public methodWriteStructure(TextWriter, String, Int32, Int32)
Write contents of DataDictionary in human readable format to writer
Top
Fields
  NameDescription
Public fieldGeneratedDateTime
Get/set DataDictionary generation date/time
Public fieldHistory
Get/set history status. If true, maintain history tables and triggers.
Public fieldReferentialIntegrity
Get/set referential integrity status. Not implemented yet!
Public fieldRequiredNotNull
Get/set option to cotrol whether fields marked as "NotNull" generate NOT NULL option on databse fields
Public fieldRootKeyFieldnames
Get/set RootKeyFieldnames
Public fieldRootTable
Get/set root table
Public fieldStatic memberTabulator
Constant for tabulator character as string. TODO: move to StringLibrary.
Public fieldUseVarcharMax
Controls how TextArea fields are implemented in SQL: False (default): TEXT - true: VARCHAR(MAX)
Top
Properties
  NameDescription
Public propertyActiveTables
Get only active tables (those where GenerateSQL == true).
Public propertyDataSet
Get Dataset
Public propertyFieldCollection
Get Fieldcollection
Public propertyRelationCollection
Get RelationCollection
Public propertyTableCollection
Get TableCollection
Public propertyUseExternalRelations
Checks whether external relations are defined
Top
See Also