In Sql(Structured Query Language) we have different type of commands available:
DDL
DDL (Data Definition Language)
These statements are used to define the database structure or schema. Some examples:
* CREATE - to create objects in the database
* ALTER - alters the structure of the database
* DROP - delete objects from the database
* TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
* COMMENT - add comments to the data dictionary
* RENAME - rename an object
DML
Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:
* SELECT - retrieve data from the a database
* INSERT - insert data into a table
* UPDATE - updates existing data within a table
* DELETE - deletes all records from a table, the space for the records remain
* MERGE - UPSERT operation (insert or update)
* CALL - call a PL/SQL or Java subprogram
* EXPLAIN PLAN - explain access path to data
* LOCK TABLE - control concurrency
DCL
Data Control Language (DCL) statements. Some examples:
* GRANT - gives user's access privileges to database
* REVOKE - withdraw access privileges given with the GRANT command
TCL
Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
* COMMIT - save work done
* SAVEPOINT - identify a point in a transaction to which you can later roll back
* ROLLBACK - restore database to original since the last COMMIT
* SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use
Wednesday, January 20, 2010
Sql Comands DDL , DML ,DCL , TCL
Friday, January 15, 2010
PHP & MQUERY
MQUERY
mQuery is a dynamic image generation script written in PHP with heavy bindings to ImageMagick. I insist that anyone be able to use it, which is why I've decided to make available under an open source BSD 2-clause license.
Why
I often found myself having to strugle with the GUIs of a certain pair of industry standard vector and scalar graphics editors to generate relatively simple images, mQuery aims to streamline the generation of images used within CSS to produce complex designs without the need for an editor.
It's not a complete replacement, especially for heavy path-based designs and artwork that requires constant visual feedback, but in most cases a finely crafted URI can produce the same results with much less effort, while minimizing the grunt work that coincides with evolutionary-design to a simple query tweak.
mQuery is arguably even more useful for manipulating images that must be generated dynamically, such as user-submitted photos.
Known Issues
mQuery is currently in pre-alpha. Not ready for production use. Some vital features are not fully implemented. Here is a list of known issues:
* stroke() on groups strokes all subshapes, rather than the collective group.
ImageMagick's stroking is limited to only a center-aligned variable width stroke. To make aligned, offset, inner and outer strokes I composite multiple center strokes of different width together. It's hacky and creates a lot of problems. I should be able to make this work with groups but I will have to rewrite the stroke algorithm when I get the time.
* 1 pixel strokes are too wide or too thin.
Again the stroke() implementation is hacky. I think this is a rounding error in ImageMagick. The only workaround right now is to use decimal widths like 1.1 or 0.9 to get it looking right. I am still debating weather or not to do this number fudging in the implementation.
* Text gets cut off
Apparently some fonts don't respect their bounding box and exceed the clipping region. Please let me know if you have a particular font that does this a lot, as it would help me debug the problem. I attemped to fix this by painting into a buffer 1 pixel too large on each side and correcting if any of the sides were not empty, but it was too slow, and tended to make the resulting font size incredibly small (explains why the fonts do it). I think the best solution may be to allow the overflow and then give text shapes special treatment for painting, but this is complicated and requires some architectural changes. It will also create new corner cases in certain brushes.
* No multiline text
I have to implement this on my side because ImageMagick's implementation is buggy. Different text alignments paint strokes in the wrong position.
* contrast() has a limited range
For some reason this is how ImageMagick is. I might be able to make this work with composition, or if need be an fx expression. It's on the list.
* rotate()
The ImageMagick rotate API doesn't take an origin, so I need to do the math myself and haven't gotten to it yet.
For futher Details Please visit Mquery