Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        private void InitializeDbTables()
        {
            DbCreator dbCreate = new DbCreator();

            if (dbCreate.IsTableExist(ProtCidSettings.protcidDbConnection, crystBuInterfaceCompTables[(int)BuType.PDB].TableName))
            {
                return;
            }
            string createTableString = string.Format("Create Table {0} ( " +
                                                     "PdbID CHAR(4) NOT NULL, InterfaceId INTEGER NOT NULL, " +
                                                     "BuID VARCHAR(8), BuInterfaceID INTEGER, QScore FLOAT);",
                                                     crystBuInterfaceCompTables[(int)BuType.PDB].TableName);

            dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, crystBuInterfaceCompTables[(int)BuType.PDB].TableName);

            string indexString = string.Format("Create INDEX {0}_Idx1 " +
                                               " ON {0} (PdbID, InterfaceID);", crystBuInterfaceCompTables[(int)BuType.PDB].TableName);

            dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString, crystBuInterfaceCompTables[(int)BuType.PDB].TableName);


            createTableString = string.Format("Create Table {0} ( " +
                                              "PdbID CHAR(4) NOT NULL, InterfaceId INTEGER NOT NULL, " +
                                              "BuID VARCHAR(8), BuInterfaceID INTEGER, QScore FLOAT);",
                                              crystBuInterfaceCompTables[(int)BuType.PISA].TableName);
            dbCreate.CreateTableFromString(ProtCidSettings.protcidDbConnection, createTableString, crystBuInterfaceCompTables[(int)BuType.PISA].TableName);

            indexString = string.Format("Create INDEX {0}_Idx1 " +
                                        " ON {0} (PdbID, InterfaceID);", crystBuInterfaceCompTables[(int)BuType.PISA].TableName);
            dbCreate.CreateIndex(ProtCidSettings.protcidDbConnection, indexString, crystBuInterfaceCompTables[(int)BuType.PISA].TableName);
        }
Ejemplo n.º 2
0
        private void InitializeDbTable()
        {
            DbCreator dbCreator = new DbCreator();

            if (!dbCreator.IsTableExist(ProtCidSettings.buCompConnection, buGroupTable.TableName))
            {
                string createTableString = "Create Table " + buGroupTable.TableName + " ( " +
                                           " GroupSeqID INTEGER NOT NULL, " +
                                           " PdbID CHAR(4) NOT NULL, " +
                                           " BuID VARCHAR(8) NOT NULL, " +
                                           " EntityFormat VARCHAR(255) NOT NULL, " +
                                           " AsymFormat VARCHAR(255) NOT NULL, " +
                                           " AbcFormat VARCHAR(255) NOT NULL );";
                dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, buGroupTable.TableName);

                string createIndexString = "Create INDEX " + buGroupTable.TableName + "_Idx1 ON " +
                                           buGroupTable.TableName + "(PdbID, BuID);";
                dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, buGroupTable.TableName);

                createIndexString = "Create INDEX " + buGroupTable.TableName + "_idx2 ON " +
                                    buGroupTable.TableName + "(GroupSeqID);";
                dbCreator.CreateIndex(ProtCidSettings.buCompConnection, createIndexString, buGroupTable.TableName);
            }

            if (!dbCreator.IsTableExist(ProtCidSettings.buCompConnection, groupTable.TableName))
            {
                string createTableString = "Create Table " + groupTable.TableName + " ( " +
                                           " GroupSeqID INTEGER NOT NULL, " +
                                           " FamilyString BLOB Sub_Type Text NOT NULL);";
                dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, groupTable.TableName);

                /*          string createIndexString = "Create INDEX " + groupTable.TableName + "_idx1 ON " +
                 *            groupTable.TableName + "(GroupSeqID);";
                 *        dbCreator.CreateTable(ProtCidSettings.buCompConnection, createIndexString, groupTable.TableName);*/
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        private void InitializeDbTable()
        {
            DbCreator dbCreator = new DbCreator();

            if (!dbCreator.IsTableExist(ProtCidSettings.buCompConnection, domainInterfaceCompTable.TableName))
            {
                string createTableString = "CREATE TABLE " + domainInterfaceCompTable.TableName + " ( " +
                                           "RelSeqID INTEGER NOT NULL, " +
                                           "PdbID1 VARCHAR(4) NOT NULL, " +
                                           "PdbID2 VARCHAR(4) NOT NULL, " +
                                           "BuID1 VARCHAR(8) NOT NULL, " +
                                           "BuID2 VARCHAR(8) NOT NULL, " +
                                           "DomainInterfaceID1 INTEGER NOT NULL, " +
                                           "DomainInterfaceID2 INTEGER NOT NULL, " +
                                           "Qscore FLOAT NOT NULL);";
                dbCreator.CreateTableFromString(ProtCidSettings.buCompConnection, createTableString, domainInterfaceCompTable.TableName);
            }
        }