It is a generated sql file from a design program, but its pretty similar to a
handcrafted creation script.
A sample of part of the file is:
-- Create a Database table to represent the "Card" entity.
CREATE TABLE Card(
CardName VARCHAR(50) NOT NULL,
RulesText INTEGER,
fk1_TypeCode INTEGER NOT NULL,
fk2_ColourCode VARCHAR(1) NOT NULL,
-- Specify the PRIMARY KEY constraint for table "Card".
-- This indicates which attribute(s) uniquely identify each row of data.
CONSTRAINT pk_Card PRIMARY KEY (CardName)
);
-- Create a Database table to represent the "Expansion" entity.
CREATE TABLE Expansion(
Code VARCHAR(3) NOT NULL,
ExpansionName VARCHAR(50) NOT NULL,
ExpansionSymbol BLOB,
-- Specify the PRIMARY KEY constraint for table "Expansion".
-- This indicates which attribute(s) uniquely identify each row of data.
CONSTRAINT pk_Expansion PRIMARY KEY (Code)
);
-- Create a Database table to represent the "SetList" entity.
CREATE TABLE SetList(
CardNo INTEGER,
FlavourText VARCHAR(120),
fk1_Code VARCHAR(3) NOT NULL,
fk2_CardName VARCHAR(50) NOT NULL,
fk3_ArtistCode INTEGER NOT NULL,
fk4_RarityCode VARCHAR(1) NOT NULL
);
If I were using oracle I would just go into sqlplus and enter @filename
where filename is the name of the sql file with the commands in it. The
commands would execute and the tables would be created. Is there a similar
way of doing this in Access?