If you came here, then you must know that there is a correct way to write S3QL and an easy way to write S3QL!! ;-)
S3QL is the S3DB Protocol and Query Language. Its syntax is described in details at the S3QL documentation page. However, if you like shorter sintaxes, there is a tool for you here too!
The XML syntax for S3QL can be executed in any S3DB Deployment by using the API funcion S3QL.php (see API functions in documentation). These are usually verbose and require all the XML tags to be appropriatelly opened and closed, like this:
If you are typing these queries it becomes very easy to make small mistakes, thus invalidating the query.
However, if you like to build your queries more quickly, you can use the alternative S3QL compact notation, available at S3QL.html
To get a feel of how this notation works, you can visit the tool at http://js.s3db.googlecode.com/hg/translate/index.html. The example S3QL query above has the following syntax in compact notation:
insert(P | name=MyProject,description=A project to store my data)
In essence, the generic syntax for the S3QL compact notation is something like:
action ( E | E.a )
Where E is one of the 7 S3DB entities (Deployment, User, Project, Collection, Rule, Item and Statement); E.a are all possible attributes for S3DB entities and action can be any of "select", "insert", "update" and "delete".