Constraint key details for table
        /// <summary>
        /// Reads tables index keys
        /// </summary>
        private void ApplyTablesConstraintKeys(List<DbTable> tables, SQLServerVersions sqlVersion)
        {
            if (sqlVersion == SQLServerVersions.SQL2000 ||
                sqlVersion == SQLServerVersions.SQL2000Below)
            {
                // not supported
                return;
            }

            //// Table constraints for SQL Server 2005 and above
            //SELECT        sys.objects.name AS TableName, sys.columns.name AS ColumnName, sys.indexes.name AS IndexName, sys.indexes.is_unique AS IsUnique,
            //                sys.indexes.is_primary_key AS IsPrimaryKey, sys.indexes.ignore_dup_key AS IgnoreDuplicateKey, sys.indexes.is_unique_constraint AS IsUniqueConstraintKey,
            //                sys.indexes.is_disabled AS Disabled
            //FROM            sys.objects INNER JOIN
            //                sys.indexes INNER JOIN
            //                sys.index_columns INNER JOIN
            //                sys.columns ON sys.index_columns.object_id = sys.columns.object_id AND sys.index_columns.column_id = sys.columns.column_id ON
            //                sys.indexes.object_id = sys.index_columns.object_id AND sys.indexes.index_id = sys.index_columns.index_id ON
            //                sys.objects.object_id = sys.index_columns.object_id
            //WHERE        (sys.objects.is_ms_shipped = 0) AND (sys.objects.type = 'U')

            string constraintKeySql = "SELECT        sys.objects.name AS TableName, sys.columns.name AS ColumnName, sys.indexes.name AS IndexName, sys.indexes.is_unique AS IsUnique, " +
                    "                sys.indexes.is_primary_key AS IsPrimaryKey, sys.indexes.ignore_dup_key AS IgnoreDuplicateKey, sys.indexes.is_unique_constraint AS IsUniqueConstraintKey,  " +
                    "                sys.indexes.is_disabled AS Disabled " +
                    "	FROM            sys.objects INNER JOIN " +
                    "                sys.indexes INNER JOIN " +
                    "                sys.index_columns INNER JOIN " +
                    "                sys.columns ON sys.index_columns.object_id = sys.columns.object_id AND sys.index_columns.column_id = sys.columns.column_id ON  " +
                    "                sys.indexes.object_id = sys.index_columns.object_id AND sys.indexes.index_id = sys.index_columns.index_id ON  " +
                    "                sys.objects.object_id = sys.index_columns.object_id " +
                    "	WHERE        (sys.objects.is_ms_shipped = 0) AND (sys.objects.type = 'U') ";

            using (SqlDataAdapter adapter = new SqlDataAdapter(constraintKeySql, _dbConnection))
            {
                adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;

                // description data table
                using (DataTable keysData = new DataTable())
                {
                    // Just to avoid stupid "Failed to enable constraints" error!
                    using (DataSet tempDs = new DataSet())
                    {
                        // Avoiding stupid "Failed to enable constraints" error!
                        tempDs.EnforceConstraints = false;
                        tempDs.Tables.Add(keysData);

                        // Get from db
                        adapter.Fill(keysData);
                    }

                    if (keysData.Rows.Count > 0)
                    {
                        // find description if there is any
                        foreach (var table in tables)
                        {
                            // filter row
                            keysData.DefaultView.RowFilter = " TableName='" + table.TableName + "' AND IsPrimaryKey=0 ";

                            // fetch findings, if there is any
                            foreach (DataRowView keysDataRow in keysData.DefaultView)
                            {
                                // found table !
                                DataRow keyRow = keysDataRow.Row;

                                // constraint Key
                                var constraintKey = new DbConstraintKey()
                                {
                                    IsUnique = Convert.ToBoolean(keyRow["IsUnique"].ToString()),
                                    KeyColumnName = keyRow["ColumnName"].ToString(),
                                    KeyName = keyRow["IndexName"].ToString()
                                };

                                // constraint keys
                                table.ConstraintKeys.Add(constraintKey);

                                // find key column
                                DbColumn keyColumn = table.FindColumnDb(constraintKey.KeyColumnName);
                                constraintKey.KeyColumn = keyColumn;
                            }
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Reads tables index keys
        /// </summary>
        private void ApplyTablesConstraintKeys(List<DbTable> tables, OracleServerVersions sqlVersion)
        {
            if (Cache_Indexes.Rows.Count == 0)
                return;

            // find description if there is any
            foreach (var table in tables)
            {
                // filter row
                Cache_Indexes.DefaultView.RowFilter = string.Format("TABLE_NAME='{0}'", table.TableName);

                // fetch findings, if there is any
                foreach (DataRowView keysDataRow in Cache_Indexes.DefaultView)
                {
                    // found table !
                    DataRow keyRow = keysDataRow.Row;
                    var indexName = keyRow["INDEX_NAME"].ToString();

                    // it should not be a primary key!
                    DataRow[] indexColumnInfo = Cache_IndexColumns.Select(string.Format("INDEX_NAME='{0}'", indexName));

                    // column information
                    if (indexColumnInfo == null || indexColumnInfo.Length == 0)
                        continue;
                    var columnName = indexColumnInfo[0]["COLUMN_NAME"].ToString();

                    // check if this is aprimary key!
                    DataRow[] primaryKeyInfo = Cache_All_Constraints.Select(string.Format("OWNER='{0}' AND TABLE_NAME='{1}' AND CONSTRAINT_TYPE='{2}' AND COLUMN_NAME='{3}'",
                        SpecificOwner.ToUpper(),
                        table.TableName,
                        STR_ConstraintType_Primarykey,
                        columnName));

                    if (primaryKeyInfo != null && primaryKeyInfo.Length > 0)
                    {
                        // sorry! this is a primary key and it is already added
                        // next!
                        continue;
                    }

                    const string STR_IndexUniqueName = "UNIQUE";
                    const string STR_IndexNonUniqueName = "NONUNIQUE";

                    // constraint Key and its uniqueness
                    var constraintKey = new DbConstraintKey()
                    {
                        IsUnique = (keyRow["UNIQUENESS"].ToString() == STR_IndexUniqueName),
                        KeyColumnName = columnName,
                        KeyName = indexName
                    };

                    // constraint keys
                    table.ConstraintKeys.Add(constraintKey);

                    // find key column
                    DbColumn keyColumn = table.FindColumnDb(constraintKey.KeyColumnName);
                    constraintKey.KeyColumn = keyColumn;
                }
            }
        }