User Input File Requirements

Database Schema File

Database Schema File is used to set up the schema of a database, including tables, triggers, store procedures, indices, etc. By modifying this file, a user can execute experiments with different schema, and examine how different database design can affect the performance of an application. The user must provide the path to this file through the user interface before an experiment can be executed.

   File Name Restriction

None

   Content Convention

This file should contain all SQL statements needed to create tables, triggers, indices, store procedures, constraints and any other valid statements for setting up the database. Unlike the Database Initialization File, each statement in this file need not be written on one line.  To guarantee the correctness and efficiency during database setup process, each SQL statement or store procedure is required to end with the statement "go" (see example below).

NOTE:   Do NOT use double quotes " in this file, use single quotes ' only, otherwise error will occur in database setup process.

   Sample File

    CREATE TABLE Student (
                    sid                  char(9) NOT NULL,
                    tname             varchar(20) NULL,
                    sname             varchar(50) NOT NULL,
                    spasswd          varchar(20) NOT NULL,
                    sstatus            char(1) NOT NULL
                                          CHECK (sstatus IN ('S')),
                    svalidity            char(1) NOT NULL
             )
            go

           CREATE INDEX MyIndex ON Student
           (      tname
            )
           go
 

          ALTER TABLE Student
                ADD PRIMARY KEY (sid)
          go
 

         CREATE PROC MyStoredProcedure @x int, @result int output AS
             print 'Hello world!'
             return 0
         go
 
 
 
 


Back to User Input File Requirements

Back to Help Contents