Sunday, March 21, 2010

Tapeworm From Cookie Dough

made in Google Web Security Scanner Interview with Fabio

We all have gotten used to thinking about the database as a collection of tables made in relation to one another. This is the classic approach of database where all data are represented as and reports are handled relational algebra with operators . The basic structure of a relational DB is the domino , characterized by a set of values \u200b\u200bknown as

attributes which are together called tuple.

But let's see what makes this kind of DB, relational. By definition, the report is a connection between two or more elements . In the field of DB a report is connection that exists between the values \u200b\u200bplaced on a table . This consists of a head containing a set of attributes, and a body we carry out now the concept of relational database. Speaking of non-relational DB is too vague because it is an "ecosystem" has grown recently, and most of its bodies are not stable under development. There is also another factor that could lead to confusion that comes close for the first time in the world of non-relational DB, or the variety of approaches used. on the approach that I would like to use DB "tested" as Cassandra
and
CouchDB , two of the most used and performing. These DB are either document-oriented and using JSON notation for defining schemas and creating views, through the dynamic use of JavaScript.
To illustrate better this different approach, I show how the data are represented in JSON objects and how they are sent to the server.

An example of JSON structure taking into consideration a simple registry university, university
var = {"student": [/ / "student" is an array in "university" {"name": "Mario", / / \u200b\u200bFirst element "name": "Smith", "freshman": 547937}, {"name" "Enzo", / / \u200b\u200bSecond element "name": "Greens", "freshman": 542456 }]} / / end "university"
university.toJSONString var server = ( )


Regarding access to data, the procedure is even simpler, in fact, only enough to print the value of the various fields of the object;

document.writeln (university.studente [0]. name) ; document.writeln (university.studente [0]. surname); document.writeln (university.studente [0]. matriculation);

All really very simple.

0 comments:

Post a Comment