Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Monday, March 9, 2009

DB Performance testing framework.

Example of architecture of testing framework for database:

Compilation-based:


1) get definition of database:
2) get (f)lex rules on database statements.
3) define testing profile (confioguration)
4) Write interpreter and tests builder (flex + yacc) based.

+-----------------------+ +---------------+
| DB statements syntax | | test profile |
+-----------------------+ +---------------+
|| ||
|| ||
\/ \/
+---------+ +-----------+
| flex | | yacc |
+---------+ +-----------+
\\ //
\\ //
\\ //
\\ //
\| |/
+----+ +-------------------------+ +---------------+
| DB |==>| test framework |===>| test results |
+----+ +-------------------------+ +---------------+
//
//
//
|/
+--------+
| Graphs |
+--------+


Interpretable:


+-----------------------+ +------------------------+
| DB statements syntax | | test processing rules |
+-----------------------+ +------------------------+
|| ||
|| +---------+ ||
\/ | profile | \/
+---------+ +---------+ +-----------+
| flex | || | yacc |
+---------+ \/ +-----------+
\\ +---------+ //
\\ | dotconf | //
\\ +---------+ //
\\ || //
\| \/ |/
+----+ +-------------------------+ +---------------+
| DB |==>| test framework |===>| test results |
+----+ +-------------------------+ +---------------+
//
//
//
|/
+--------+
| Graphs |
+--------+

Wednesday, May 7, 2008

Ugly ER notation

Started day with reading Garcia, Ulman's and Widom book:
"Database Systems: The Complete Book" (2nd ed, Russian translation)

First of all looked through all, and found it very interesting in the details that met my eyes.

Also it has a very good descriptions of terminology generally used.

However the second chapter, passed is ugliest one. I haven't seen application that use notation proposed for years.

Week entities, round and common arrows, rhombuses, in what database applications they are used?
And a lot of "philosophy" there, that is description of a lot of correct and incorrect ways to present data in the model. And the 3rd chapter begins with statement that relational model is different from previous presented.

Ok, it seems that 2nd chapter could be passed without given a lot of attention to.

Resource related to the book:

http://infolab.stanford.edu/~ullman/fcdb/aut07/index.html#lecture

going to play a little with examples from there.

Tuesday, April 22, 2008

refactoring and spaghetti code

from engineering experience:

- Using map instead of repeating calls for function with more than two parameters looks bad and unmaintainable for number of calls 5 or less.

- Using dynamic SQL for creation of similar tables , describing same parts in while loop looks bad if number of tables less than 4.

Of cause you have not use this tech's if the code is evolving and probably would be changed (or it is permanent solution).