Skip to main content

Posts

Showing posts from June, 2009

Database Knowledge for a Tester Part II

1 SQL Concepts 1.1 Basic Data Types 1.2 Basic SQL Commands 1.1.1 Create Table SYNTAX: CREATE TABLE [Table Name] ([ColumnName1] [Datatype] ([size]), [ColumnName..n] [Datatype] ([size])); Rule for creating table: · Name can have maximum upto 30 chars. · Name should begin with an Alphabet (A-Z, a-z) and optionally followed by numbers (0-9) · Special character “_” underscore is allowed and also recommended. · SQL reserved words like create, select etc are not allowed. E.g. CREATE TABLE employee (employee_no varchar2 (10), employee_name varchar2 (25)); 1.1.2 Insert Data into Tables SYNTAX: INSERT INTO [TABLE NAME] ([COLUMNNAME1], [COLUMNNAME...N]) VALUES ([EXPRESSION1], [EXPRESSION2]); For e.g. INSERT INTO employee (employee_no, employee_name) VALUES (‘E001’, ‘Sachin Kumar’); Note: Character & Date expressions placed with in the INSERT INTO statement must be enclosed in single quotes. In INSERT INTO if the number of values is same as the number of column then

Database Knowledge for a Tester - Part I

1. Database concepts 1.1 Codd’s Rule for RDBMS – 12 Rule Rule 1: The Information Rule All data should be presented in a table form Rule 2: Guaranteed Access Rule All data should be accessible without ambiguity. Rule 3: Systematic Treatment of Null Values Support for Null values which is distinct from an empty string or a number with a value of zero. Rule 4: Dynamic Online Catalog based on the Relational model A relational database must provide access to its structure through the same tools that are used to access the data. Rule 5: Comprehensive Data Sublanguage Rule The DB must support at least one clearly defined language that includes functionality for Data Definition, Data Manipulation, Data Integrity, and Database Transaction Control. Rule 6: View Updating Rule Each view in the database should support the same full range of data manipulation that has direct access to a table available. In reality, providing update and delete access to logical views is difficult and is n