Use-Case Specification: Import Schema from SQL File

Total Page:16

File Type:pdf, Size:1020Kb

Use-Case Specification: Import Schema from SQL File

CS 327 Project

Use-Case Specification: Import Schema from SQL File

Version 1.0 dbViZ Version: 1.0 Use-Case Specification: Import Schema from SQL File Date: 12/6/2002 Revision History Date Version Description Author 12/6/2002 1.0 Use Case for Importing the Schema from Sonia Kaura the SQL file

Confidential ÓCS 327 Project, 2018 Page 2 dbViZ Version: 1.0 Use-Case Specification: Import Schema from SQL File Date: 12/6/2002 Table of Contents

1. Import Schema from SQL File 4 1.1 Brief Description 4

2. Flow of Events 4 2.1 Basic Flow 4 2.2 Alternative Flows 4 2.2.1 SQL File not found 4 2.2.2 There is Error in parsing the SQL file 4

3. Special Requirements 4 3.1 The SQL file format 4 3.2 SQL File and password protection 5

4. Preconditions 5 4.1 dbViZ configuration and installation 5

5. Postconditions 5 5.1 Schema loaded 5 5.2 Schema not loaded 5

6. Extension Points 5

Confidential ÓCS 327 Project, 2018 Page 3 dbViZ Version: 1.0 Use-Case Specification: Import Schema from SQL File Date: 12/6/2002 Use-Case Specification: Import Schema from SQL File

1. Import Schema from SQL File

1.1 Brief Description This use case lists the various details for the “Importing the Schema from SQL file”. The file will be one with the sql extension and will contain the list of sql commands which represent the schema of the database e.g. http://jdbv.sourceforge.net/ElaborationDocs/Tests/FDC.sql 2. Flow of Events

2.1 Basic Flow 1. The user selects to “Import Schema from SQL File” option from the File->Load Schema Menu. 2. The application (hereafter referred as dbViZ ) shows a window to browse to the location of the “sql” file. 3. The user browses and selects the appropriate file to Import. 4. The user clicks ok. 5. The schema is read, parsed and loaded into the dbViZ main window, with the lists of tables present in it. 6. dbViZ is ready for displaying the tables onto the drawing area as ER Diagrams.

2.2 Alternative Flows

2.2.1 SQL File not found The user is unable to locate the appropriate SQL file.

2.2.1.1 The file selected is not of “sql” extension. The user is not allowed to select any other file except the file with the “sql” extension and hence the user presses cancel and browse window closes.

2.2.1.2 The file not found The file the user is looking for is not found and therefore the user presses cancel and again comes back to the main window of the dbViZ.

2.2.2 There is Error in parsing the SQL file If there is an error in the parsing of the SQL file, an error message is displayed and the loading of the schema is stopped. The user presses and ok to the error pop-up window and is brought back to the main window of dbViZ. 3. Special Requirements

3.1 The SQL file format The SQL file which will be imported to dbViZ will have to follow the grammar as listed at http://jdbv.sourceforge.net/ElaborationDocs/SQLGrammarSpec.txt. Any schema saved as “sql” file can be loaded into the application but to minimize the parse errors and other errors it is imperative that the user understands the grammar of the SQL. Also since the DBA is supposed to be an expert in the Database Field

Confidential ÓCS 327 Project, 2018 Page 4 dbViZ Version: 1.0 Use-Case Specification: Import Schema from SQL File Date: 12/6/2002

there should be no problem in understanding of the grammar rules 3.2 SQL File and password protection Since support for the “sql” file is really rudimentary, it is assumed that these files are not placed in password protected directories or files themselves may not be access protected etc.

4. Preconditions

4.1 dbViZ configuration and installation The dbViZ is loaded and appropriately configured when the user attempts to import the schema from the SQL file.

5. Postconditions

5.1 Schema loaded The Schema is successfully loaded and the main window of the drawing canvas shows the blank canvas in the center and the names of the loaded tables on the left, so that they can now be selected for drawing the E-R Diagram. 5.2 Schema not loaded If there was some error in the loading of the schema then the application is at the initial window. 6. Extension Points

Confidential ÓCS 327 Project, 2018 Page 5

Recommended publications