Getting started with ArangoDB and Symfony 2 – part 1

This is part 1 (of 4) of an introduction to the use of ArangoDB together with Symfony 2. You’ll find the links to the other parts of this tutorial at the end of this text. In this tutorial we will implement a very simple movie database as an example of how to use ArangoDB together with Symfony 2. We assume for the tutorial that you know the basic concepts of Symfony2. No prior ArangoDB knowledge is required. The demo shows how to create, edit, update and delete movies, how to select a list of movies from the database in two different ways. We’ll use the simple query API for most examples. The “search for a topic” feature uses ArangoDB’s query language (AQL), a convenient sql-like way to query ArangoDB. You can download the completed demo at Github.

Posted in API, php | Tagged , , , | Comments Off

Getting started with ArangoDB and Symfony 2 – part 2

This is part 2 (of 4) of an introduction to the use of ArangoDB together with Symfony 2. You’ll find the links to the other parts of this tutorial at the end of this text. You can download the completed demo at Github. The data structure Our app deals with movies: each movie has a title, a year of release and it is assigned to a genre. Each movie deals with none, one or many topics. In a relational database we would probably create a table movie and another table topic and join them with a shared movie id. ArangoDB follows like other document stores the “aggregate model” approach: In short terms this means that you should put data that is often needed together into one document. Remember: documents are a bit like rows in the relation world; in nosql world they can have a nested structure.

Posted in API, php | Tagged , , , | Leave a comment

Getting started with ArangoDB and Symfony 2 – part 3

This is part 3 (of 4) of an introduction to the use of ArangoDB together with Symfony 2. You’ll find the links to the other parts of this tutorial at the end of this text. You can download the completed demo at Github. Working with forms The next example shows the use of ArangoDB with Symfony’s form component. This is how our form will look like. The topics are represented as a text field and the user is required to separate them by commas. This delivers questionable user experience, but leads to an interesting question: how can we transform our topics array from our movie document to a text field? And: we’ll need it at least two times, both for creating and editing movies.

Posted in API, php | Tagged , , , | Leave a comment

Getting started with ArangoDB and Symfony 2 – part 4

This is part 4 (of 4) of an introduction to the use of ArangoDB together with Symfony 2. You’ll find the links to the other parts of this tutorial at the end of this text. You can download the completed demo at Github. Extending Arangodb\Document The next thing we want to improve are all those noisy set calls in the controller: 1 2 3 4 5 6 7 8 // src/Triagens/ArangodbBundle/Controller/DefaultController.php if ($form->isValid()) { $movie = new ArangoDocument(); $movie->set("title",$form->get("title")->getData()); $movie->set("released",$form->get("released")->getData()); $movie->set("genre",$form->get("genre")->getData()); // and so on … my eyes hurt! }

Posted in API, php | Tagged , , , | 2 Comments

ArangoDB 1.2.0 Released

We are proud to announce the release of ArangoDB 1.2.0. You can find an overview of the new features in these blog posts: New Features in ArangoDB 1.2 Simplifications in ArangoDB 1.2 API changes in ArangoDB 1.2 If you are upgrading your database from 1.1, please carefully read Upgrading to ArangoDB 1.2 The source code is available from the 1.2 branch on github, the binary packages from our download page. The new version has also been submitted to homebrew and Apple’s AppStore. Last Minute Remarks We have decided to switch the statistics functions off, by default. You can switch them on by changing the config file. The current statistics functions are now obsolescent. We want to switch to a more flexible and less time consuming implementation in 1.3.

Posted in php, Releases | Leave a comment

Tutorial for ArangoDB’s PHP API published

Note: We changed the name of the database in May 2012. AvocadoDB is now called ArangoDB. Hey there, short notice: Jan has written a tutorial on how to use the PHP API for AvocadoDB (note: this is “just” the API for the REST interface, it does not cover yet the upcoming query language). You can find both the PHP API and the tutorial on Github. We are making progress with other languages as well… but that’s something for another blog post (cliffhanger ).

Posted in API, php | Tagged , | Leave a comment