you are not logged in

Navigation

User login

0013 - sc Research: How to implement different SQL-dialect-parsers efficiently?

What Data/Info should we extract?

What kind of dialects do we have to consider?

What are the differences in dialect?

 

 

 

Result of this story:

How are we going to walk the path of converting the different ANSI SQL dialects?
There are several of them, having some differences but also many similarities.
Open source is available, but can it be (re) used by Mixed? Which dialects can we parse using the available open source code? Do they convert/parse views for example? Views might be a problem as we see it now.....it is possible to create views in dialect specific sql even in some kind of database specific programming code......

As a result of this stories, several new stories are created:

0019 - sc SQL dialect parsers: Two grammars: mixed.dans.knaw.nl/node/371

 

0018 - sc SQL dialect parsers: Research differences and matches between the different ANSI-SQL: mixed.dans.knaw.nl/node/370

 

0020 - sc SQL dialect parsers: Inventory: mixed.dans.knaw.nl/node/372

0017 - sc SQL dialect parsers: Create one or more templates: mixed.dans.knaw.nl/node/369

0016 - sc SQL dialect parsers: Document the architecture of the (example) ANSI-SQL converter:  mixed.dans.knaw.nl/node/368


New approach

I'm planning to create a very limited grammar, basically a subset of AnsiSQL, only supporting create, alter, and insert statements. All other SQL grammar will be ignored or stored as a blob. A new 'dialect' can be added by altering a copy of our grammar. This might result in some unneccesary duplication, where possible we could introduce some preprocessing, making shared grammar possible. All delegated actions will be handled by 1 generic process (ParserDelegate.java) which will need to know what dialect it is receiving.

More detail

I think the real purpose is: given the variety of SQL dialects, how do we convert them to ANSI SQL in a way that avoids writing different parsers for each dialect? Or, more generally, with a minimum of reduplication? The outcome of this story should be a plan and some new stories that start carrying out that plan.

analysis of dialect

Perhaps it would be wise to focus on the differences and similarities between the several dialects.
First the differences per dialect towards ANSI SQL should be identified, the next step would be to identify similar differences from ANSI SQL between the dialects.