© 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho...

16
© 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae, Jeong- kyeom Kim Man-jae Ha, Khushboo, Jayesh 2009. 11. 27 1

Transcript of © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho...

Page 1: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Grammar Test Framework

DBMS-3

Leader : Harish Narayana / Minho Hwang

Member : Sook-youn Kwon, Jong-hyeok Lim

Yu-jin Bae, Jeong-kyeom Kim

Man-jae Ha, Khushboo, Jayesh

2009. 11. 27

1

Page 2: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Agenda

2

Introduction

Project Scope

Demo Step

Limitation and Future work

SQL Grammar (BNF)

Page 3: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Introduction

LogFile

LogFile

BNFFile

BNFFile

SQL

Query

Generator

User

Interface

Analyzer

Logger

DB

Manager

Grammar Test

Framework

Embedded

DB

Introduction :

- The Grammar Test Framework is the solution to assure Quality for the database vendors.

- You can test your DBMS with various other DBMS(s) for consistency in results.

- To test DBMS for their ANSI SQL 2003 compliance.

Page 4: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

SQL Grammar (BNF)

BNF Grammar for ISO/IEC 9075-2:2003

Page 5: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Project Scope

Select Query

No Clause Description

1 Simple query SELECT columns FROM tables

2 WHERE WHERE columns op condition

3 GROUP BY GROUP BY columns

4 HAVING HAVING columns

5 Aggregate Function function (columns)

6 ORDER BY ORDER BY columns sort type

7 JOIN expression table join type table ON condition

8 Sub-Query

(1 level)

FROM (sub-query) alias

WHERE column op (sub-query)

Having column op (sub-query)

- Generating Select Query

Page 6: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Demo Step – 1.Select SQL BNF file

Page 7: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Demo Step – 2.Add DBMS to test

Page 8: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Demo Step – 2.Add DBMS to test

LogFile

LogFile

Main Frame (GUI)

UI Controller

DisplayController

ServerController

TestingController

Monitoring

Logger

TestDB

Setter

Generator (Random Query)

DomainGrammar

ParserAnalyzer

DBMSManager

SchemaBuilder

GrammarReader

DBMS3Embedded

Server DBMS1 DBMS2

PropertyFile

PropertyFile Property

File

PropertyFile Property

File

PropertyFile

BNFFile

BNFFile

Setting DB Generate Query Fire Query Analyze result

View

Controller

Model

[ MVC model ]

ControllerController

ViewView ModelModel

Model-view-control (MVC) is an architectural pattern used in software engineering. The pattern isolates business logic from input and presentation. Permitting independent development, testing and maintenance of each.

Page 9: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Demo Step – 3.Start testing

Page 10: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Demo Step – 3.Start testing

LogFile

LogFile

Main Frame (GUI)

UI Controller

DisplayController

ServerController

TestingController

Monitoring

Logger

TestDB

Setter

Generator (Random Query)

DomainGrammar

ParserAnalyzer

DBMSManager

SchemaBuilder

GrammarReader

DBMS3Embedded

Server DBMS1 DBMS2

PropertyFile

PropertyFile Property

File

PropertyFile Property

File

PropertyFile

BNFFile

BNFFile

SQL QUERYSQL QUERY

View

Controller

Model

[ MVC model ]

Setting DB Generate Query Fire Query Analyze result

Page 11: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Demo Step – 3.Start testing

LogFile

LogFile

Main Frame (GUI)

UI Controller

DisplayController

ServerController

TestingController

Monitoring

Logger

TestDB

Setter

Generator (Random Query)

DomainGrammar

ParserAnalyzer

DBMSManager

SchemaBuilder

GrammarReader

DBMS3Embedded

Server DBMS1 DBMS2

PropertyFile

PropertyFile Property

File

PropertyFile Property

File

PropertyFile

BNFFile

BNFFile

Setting DB Generate Query Analyze resultFire Query

View

Controller

Model

[ MVC model ]

Page 12: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Demo Step – 4.Anlyze Result of Query

LogFile

LogFile

Main Frame (GUI)

UI Controller

DisplayController

ServerController

TestingController

Monitoring

Logger

TestDB

Setter

Generator (Random Query)

DomainGrammar

ParserAnalyzer

DBMSManager

SchemaBuilder

GrammarReader

DBMS3Embedded

Server DBMS1 DBMS2

PropertyFile

PropertyFile Property

File

PropertyFile Property

File

PropertyFile

BNFFile

BNFFile

Setting DB Generate Query Fire Query Analyze result

View

Controller

Model

[ MVC model ]

Page 13: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Demo Step – 5.View Testing Log

Page 14: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Demo Step – 5.View Testing Log

Page 15: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential

Limitation and Future work

1 Limitation

Presently only 77 production rules in the SQL BNF grammar file

Uses predefined Logical Data Model information

Difficulty in implementing classes for extendibility of SQL BNF grammar

2 Future work

Support for various SQL Query. (DML, DDL and DCL)

Generate query of all possible combination.

Extendibility to apply SQL Grammar file from DBMS vendors.

Use dynamic logical data model information define by user

Page 16: © 2008 Wipro Ltd - Confidential Grammar Test Framework DBMS-3 Leader : Harish Narayana / Minho Hwang Member : Sook-youn Kwon, Jong-hyeok Lim Yu-jin Bae,

© 2008 Wipro Ltd - Confidential© 2008 Wipro Ltd - Confidential

Min-ho HwangProject Leader

[email protected]

Thank You

November11, 2009 16© 2008 Wipro Ltd - Confidential