Разработка базы данных библиотечного фонда города, страница 4

Set tdf = dbs.CreateTableDef( "chitatel_v_zale" )

Call AddFieldToTable("Chet_k", dbInteger, 0, 0, "", "", "", TRUE, FALSE )

Call AddFieldToTable("ID_zala", dbInteger, 0, 0, "", "", "", TRUE, FALSE )

Call AddFieldToTable("n_podchivki", dbInteger, 0, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("Invent_n", dbInteger, 0, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("Data", dbDate, 0, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("n_chit_bileta", dbInteger, 0, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("ID_sotrydnika", dbInteger, 0, 0, "", "", "", FALSE, FALSE )

dbs.TableDefs.Append tdf

End Sub

'=== Create table Znania ======

Sub CreateTable7()

Set tdf = dbs.CreateTableDef( "Znania" )

Call AddFieldToTable("kod_oblasti_znania", dbInteger, 0, 0, "", "", "", TRUE, FALSE )

Call AddFieldToTable("Nazvanie", dbText, 20, 0, "", "", "", FALSE, FALSE )

dbs.TableDefs.Append tdf

End Sub

'=== Create table Ekzempl_knigi ======

Sub CreateTable8()

Set tdf = dbs.CreateTableDef( "Ekzempl_knigi" )

Call AddFieldToTable("Invent_n", dbInteger, 0, 0, "", "", "", TRUE, FALSE )

Call AddFieldToTable("ID_knigi", dbInteger, 0, 0, "", "", "", TRUE, FALSE )

dbs.TableDefs.Append tdf

End Sub

'=== Create table Kniga_jyrnal_ ======

Sub CreateTable9()

Set tdf = dbs.CreateTableDef( "Kniga_jyrnal_" )

Call AddFieldToTable("ID_knigi", dbInteger, 0, 0, "", "", "", TRUE, FALSE )

Call AddFieldToTable("kod_oblasti_znania", dbInteger, 0, 0, "", "", "", TRUE, FALSE )

Call AddFieldToTable("ISBN", dbText, 20, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("Avtor", dbText, 30, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("Nazvanie", dbText, 20, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("n_toma", dbInteger, 0, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("Izdatel_stvo", dbText, 20, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("God_izdania", dbInteger, 0, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("n_biblioteki", dbInteger, 0, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("Stoimost_", dbInteger, 0, 0, "", "", "", FALSE, FALSE )

dbs.TableDefs.Append tdf

End Sub

'=== Create table Gazeta ======

Sub CreateTable10()

Set tdf = dbs.CreateTableDef( "Gazeta" )

Call AddFieldToTable("ID_gazeta", dbInteger, 0, 0, "", "", "", TRUE, FALSE )

Call AddFieldToTable("nazvanie", dbText, 20, 0, "", "", "", FALSE, FALSE )

Call AddFieldToTable("n_biblioteki", dbInteger, 0, 0, "", "", "", FALSE, FALSE )

dbs.TableDefs.Append tdf

End Sub

'=== Create table Podchivka ======

Sub CreateTable11()

Set tdf = dbs.CreateTableDef( "Podchivka" )

Call AddFieldToTable("n_podchivki", dbInteger, 0, 0, "", "", "", TRUE, FALSE )

Call AddFieldToTable("ID_gazeta", dbInteger, 0, 0, "", "", "", TRUE, FALSE )