Practical SQL for SlickPic Testing

Slides:



Advertisements
Similar presentations
Keys, Referential Integrity and PHP One to Many on the Web.
Advertisements

10 Copyright © Oracle Corporation, All rights reserved. Including Constraints.
8 Copyright © Oracle Corporation, All rights reserved. Manipulating Data.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial Password: UWPstudent Password is case sensitive.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Module 3: Table Selection
ZEIT2301 Design of Information Systems SQL: Creating a Database School of Engineering and Information Technology Dr Kathryn Merrick.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
CS 3630 Database Design and Implementation. Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial.
Company LOGO 1 Database Creation and Maintenance Jorge G. Martinez.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Introduction to MySQL Lab no. 10 Advance Database Management System.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
CSC 2720 Building Web Applications Database and SQL.
10 Copyright © 2009, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
1 Copyright © 2006, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
Copyright © 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
Slide 1 Chapter 7 – Part 1 Data Definition Language & Data Manipulation Language.
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
CS 3630 Database Design and Implementation. Assignment 3 Style! Agreement between database designer and the client. UserName1_EasyDrive UserName2_EasyDrive.
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
Creating Tables and Inserting Records -- Not easy to edit! -- check constraints! Create table test1 ( C1 char(5) primary key, C2 Varchar2(15) not null.
SQL Structured Query Language 1. Data Definition Language (DDL) is used to manage table and define data structure i.e. CREATE, ALTER, DROP Data Control.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
What’s a database? Data stored in a structured format that lends itself to easy manipulation and recall.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Managing Database With Oracle Replacement for Ch10 COP 4708.
Including Constraints. What Are Constraints? Constraints enforce rules at the table level. You can use constraints to do the following: – Enforce rules.
Chapter 3: Relational Databases
SQL constrains and keys. SORTED RESULTS Sort the results by a specified criterion SELECT columns FROM tables WHERE predicates ORDER BY column ASC/DESC;
Constraints and Views Chap. 3-5 continued (7 th ed. 5-7)
Understand Data Definition Language (DDL) Database Administration Fundamentals LESSON 1.4.
2 Copyright © 2009, Oracle. All rights reserved. Managing Schema Objects.
Big Data Yuan Xue CS 292 Special topics on.
 MySQL is a database system used on the web  MySQL is a database system that runs on a server  MySQL is ideal for both small and large applications.
3 A Guide to MySQL.
CompSci 280 S Introduction to Software Development
Web Systems & Technologies
Databases.
CS 3630 Database Design and Implementation
Log for Patron Record Changes
Chapter 5 Introduction to SQL.
CS320 Web and Internet Programming SQL and MySQL
© 2016, Mike Murach & Associates, Inc.
Manipulating Data.
Using SQL Server through Command Prompt
Manipulating Data Schedule: Timing Topic 40 minutes Lecture
ISC440: Web Programming 2 Server-side Scripting PHP 3
Lecturer: Mukhtar Mohamed Ali “Hakaale”
Chapter 8 Working with Databases and MySQL
HSCI 709 MySQL Lecture 13.
CIS 136 Building Mobile Apps
Structured Query Language
DATABASE SQL= Structure Query Language مبادئ قواعد بيانات
SQL DATA CONSTRAINTS.
Manipulating Data.
Lesson Plan Instructional Objective Learning Objective
Session - 6 Sequence - 1 SQL: The Structured Query Language:
CS3220 Web and Internet Programming SQL and MySQL
CS3220 Web and Internet Programming SQL and MySQL
Assignment: SQL #2 Putting Information into a Database
Including Constraints
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
SQL NOT NULL Constraint
SQL AUTO INCREMENT Field
Presentation transcript:

Practical SQL for SlickPic Testing

SlickPic Database environments Database: ORACLE Express Database: MySQL can be loaded from http://dev.mysql.com/downloads/mysql/ GUI Studio: http://www.devart.com/dbforge/mysql/studio/download.html

SlickPic database in Oracle Create a fragment of database objects (tables) in Oracle in proper order Populate the created tables with test data in proper order Grey Box testing using SQL statements

Create database tables sp_user create table sp_user (user_id number primary key, login_type varchar(20) not null, login varchar(20), pw varchar(20), first_name varchar(60), last_name varchar(60), account_type varchar(20), Account_state varchar(12), Created date, Last_login date );

Create database tables sp_album table create table sp_album (album_ID number primary key, user_id number not null, name varchar(120) not null, description varchar(1200), date_created date, date_modified date, album_type varchar(20) not null, number_of_photos number, parent_album_id number not null, CONSTRAINT user_FK FOREIGN KEY (user_ID) REFERENCES sp_user (user_id));

Create database tables sp_photo table create table sp_photo (album_id number not null, photo_id number not null, file_name varchar(60), file_format varchar(12) not null, photo_name varchar(120), description varchar(1200), photo_size_mg number not null, resticted_flag char(1), likes number, number_of_comments number, file_location varchar(200) not null, Constraint photo_pk primary key (album_id, photo_id), CONSTRAINT album_FK FOREIGN KEY (album_ID) REFERENCES sp_album (album_id));

sp_user sp_album sp_photo Creating test data Tables must be populated with test data in in proper parent child relation order: sp_user insert into sp_user values (100, ‘OPENID’ ,null, null,‘Suba’, null,'PRO','ACTIVE', sysdate-5, sysdate); sp_album insert into sp_album values (200, 110, 'Party', 'Grad Party with mom', sysdate-32, null, 'Public', 200) ; sp_photo insert into sp_photo values (200, 300,null,'jpeg','Ready to go',null,13,null,23,4,'grad/album 1');

Using SQL for Test Cases TC ID Test Intent Test Data 1. Verify that application displays number of albums per user correctly. Select user_id, count(album_id) album_count from sp_album group by user_id order by album_count desc 1.2 Verify that application displays number of photos per user correctly. Select user_id, count(photo_id) from sp_album a, sp_photo p where a.album_id=p.album_id group by user_id 1.3 Verify that when user changes the number of photos - deletes, adds them back, this number is being updated and displayed properly Select user_id, count(photo_id) from sp_album a, sp_photo p where a.album_id=p.album_id group by user_id Home Work: Complete Test Cases by adding Steps, Expected Result, and Execution Environment (Oracle, MySQL), and Execution Result (Pass, Fail)

Using SQL for Test Cases TC ID Test Intent Testing Strategy Test Data 2. Validate proper GUI presentation of large number of Albums and Photos Identify User account(s) having large number of Albums and Photos Select user_id, count(album_id) album_count from sp_album group by user_id order by album_count desc Select user_id, count(photo_id) photo_count from sp_album a, sp_photo p where a.album_id=p.album_id group by user_id order by photo_count desc 3 Validate the boundary values of Photo file size for each type of user account, such as ‘PRO’/25 MB, ‘BASIC’/15 MB, and etc. Select the MAX Photo file size by account type Select account_type, max(photo_size_mg) from sp_user u, sp_album a, sp_photo p where u.user_id=a.user_id and a.album_id=p.album_id group by account_type; Home Work: Complete Test Cases by adding Steps, Expected Result, and Execution Environment (Oracle, MySQL), and Execution Result (Pass, Fail)

Quiz Foreign Key relation SP_ALBUM SP_USER Album_ID User_ID Foreign Key …… 211 123 214 198 256 User_ID Primary Key …….. 123 167 198 SP_USER has 100 records; SP_ALBUM has 1000 records SP_USER has 1000 records; SP_ALBUM has 100 records Select User_ID, Album_ID from sp_user, sp_album where sp_user.user_id=sp_album.user_id Number of records retrieved: a) 100 b) 1000 c) 1100 a) 100 b) 1000 c) 1100 Quiz Results: 1. 2.