Professional Documents
Culture Documents
February 2010
1. Part A: Data Insertion Using Stored Procedure Requirements.....................................................3 a. Functional Requirements.........................................................................................................3 b. Critical Quality Requirements...................................................................................................3 1.1 Security (High)..................................................................................................................3 1.2 Interoperability (Criticality)................................................................................................3 1.3 Performance (Criticality)...................................................................................................3 1.4 Reliability (High)...............................................................................................................3 1.5 Usability (Criticality)..........................................................................................................3 1.6 Maintainability (Criticality).................................................................................................3 1.7 Portability (Criticality)........................................................................................................3 2. Part B: Data Insertion Using Stored Procedure Process Steps....................................................4 2.1 Pre-requisite condition...........................................................................................................4 2.2 SQL Server ..........................................................................................................................4 2.2.1 Process steps for Functional Requirements.....................................................................4 2.2.2 Process steps for CTQs...................................................................................................4 2.3 MySQL..................................................................................................................................5 2.3.1 Process steps for Functional Requirements.....................................................................5 2.3.2 Process steps for CTQs...................................................................................................5 2.4 Oracle ..................................................................................................................................5 2.4.1 Process steps for Functional Requirements.....................................................................5 2.4.2 Process steps for CTQs...................................................................................................6 2.5 Appendix A: Table Description..............................................................................................6 3. Part C Acceptance Criteria........................................................................................................8
(Criticality)
(High)
Data type of the parameters using in the procedure should match with the data type of the corresponding column. 1.5 1.6 1.7 Usability (Criticality) (Criticality)
Maintainability Portability
(Criticality)
5. Press F5 6. Click on New Query Tab. Write command to create a stored procedure INSERT_CITY_INFO for Insertion Operation on CITY table. The procedure should take parameter corresponding to each column of the table. The procedure body should contain insert statement to store data in the city Table using procedure parameter as values.
7. Press F5 8. To execute the stored procedure use EXEC command. 9. Create and execute store procedure for Branch and ZIP table as well.
2.2.2
2.2.2.1 Security Management studio provides two options: (1)Windows Authentication (2)SQL Server Authentication To provide permissions user roles can be used and access right to database could be provided using the user role. 2.2.2.2 Reliability While creating procedure specify the size of the parameters used appropriately.
2.3 MySQL
2.3.1 Process steps for Functional Requirements 1. Open MySql prompt from All Programs menu. 2. Provide password for authentication and then press enter 3. Type below command to enter into the database Use <database name>; 4. Write command to create stored procedure for inserting data into CITY table. a. Use Delimiter command to start the procedure b. Pass IN parameters in the procedure create statement. The value of the parameter is to assign to the column c. Inside Begin---End block, write the Insert statement for the table using parameter value d. Use Delimiter command to finish the procedure. 5. To execute the stored procedure use CALL command. 6. Similarly create and execute the stored procedure for BRANCH and ZIP table. 2.3.2 Process steps for CTQs
2.3.2.1 Security To grant access permission for table use GRANT commands at SQL command prompt. 2.3.2.2 Reliability While creating procedure specify the size of the parameters used appropriately.
2.4 Oracle
2.4.1 Process steps for Functional Requirements
1. Select Programs in the Start menu. Then select Oracle - ORACLE_HOME, then Application Development, and click SQL Plus. The SQL*Plus window appears displaying the Log On dialog.
2. Enter user name and password. If you are connecting to a remote Oracle database, enter the Oracle Net connect identifier in the Host String field. To connect to the default database, leave the Host String field blank. 3. Write command to create stored procedure for inserting data into CITY table. a. Pass IN parameters in the procedure create statement. This is because the value of the parameter is going to be assigned to column b. Inside Begin---End block write the Insert statement for the table using parameter value 4. To execute the stored procedure write EXEC command 5. Create and execute stored procedure for BRANCH and ZIP table as well/similarly.
2.4.2 Process steps for CTQs 2.4.2.1 Security To grant access permission for table use GRANT commands at SQL command prompt. 2.4.2.2Reliability While creating procedure specify the size of the parameters used appropriately.
S. No 1 2 3
Column Name
Field Type
INTEGER CHARACTER CHARACTER
Size
9999 50 3
Remarks
Numeric maximum 9999 refers branch master String max 50 characters 3 character code for city referring city master
S. No 1 2 3 4
Column Name
Field Type
CHARACTER
Size
3
Remarks
NOT NULL, UNIQUE NUMBER IDENTIFYING THE CITY.
CHARACTER
50
CHARACTER
50
CHARACTER
50
Size
4 20
Remarks
NOT NULL, UNIQUE NUMBER IDENTIFYING THE EMPLOYEE AND HIS LIBRARY CARD NO. NOT NULL
city_id Zip_code
Primary Key
Foreign Key
c)