Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL92 Test Suite

Posted on 2004-08-19
9
Medium Priority
?
558 Views
Last Modified: 2008-03-10
Hi I wrote a parser for SQL92 and I want to test if it parses correctly and is implemented properly. Its sort of complicated but what I bascially need is DB schema and a set of SQL queries such as "select * from TABLENAME" .  What I am going to do is take the SQL queries, run them on a mySQL datase, and save those results in a test file. Then I am going to see if my implemenation produces the same result. I've googled it but can't seem to find any information. Thanks!
0
Comment
Question by:eecosmo01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 7

Expert Comment

by:petoskey-001
ID: 11846173
MySql isn't 100% sql-92 compliant by default, and even in Ansi mode, I think there are some very minor differences.

Here is the MySql manual on compatibility...
http://dev.mysql.com/doc/mysql/en/Compatibility.html

The differences from ANSI
http://dev.mysql.com/doc/mysql/en/Differences_from_ANSI.html

And a better review of MySql compliance, as well as a few other databases
http://det-dbalice.if.pw.edu.pl/det-dbalice/documents/all/html/db_compare/db_compar_chp01.html

And finally while I couldn't find a simple test suite like you requested, here is the full SQL92 Spec...
http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

NIST.GOV should carry the test suite, I think you have to pay for it.  
0
 

Author Comment

by:eecosmo01
ID: 11846681
Thanks, I have most of those links already. I really looking for just a list of queries and a DB schema but I guess if that does not exist then I'll write my own =( Thanks again for the help.
0
 
LVL 7

Expert Comment

by:petoskey-001
ID: 11846695
Here is a link to the source code at least so you can download the test suites...
http://www.itl.nist.gov/div897/ctg/sql_form.htm
0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 

Author Comment

by:eecosmo01
ID: 11846753
Yah I came across that too. Is there a way to extract the queries? It seems to be spread out between all those different files and it seems like I need some app to run it. I really just want to test the parser. Thanks
0
 
LVL 7

Accepted Solution

by:
petoskey-001 earned 2000 total points
ID: 11848127
I don't really see a way without compiling them.  If you compiled the test programs, you could look at your log file and have every SQL query ran.  In the mean time, it's not exactly SQL92, but here is a link to all the SQL files that PostgreSQL uses to do testing before each release.  It has SQL92 syntax, as well as some extra PGSQL stuff.
http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/test/regress/sql/#dirlist
0
 

Author Comment

by:eecosmo01
ID: 11848178
0
 

Author Comment

by:eecosmo01
ID: 11848182
petoskey-001,
   Oh thanks for that last link... that helps pretty well too! I appreciate your help =)
0
 
LVL 7

Expert Comment

by:petoskey-001
ID: 11848186
Well I guess for just testing a parser those would be OK, but they don't have any create scheme commands so they would all fail on a real database.  Unlesss I'm missing something.  
0
 

Author Comment

by:eecosmo01
ID: 11855529
petoskey,
   Yup you are correct. I did not realize there was no schema to be located anywhere =(
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question