{% extends "base.html" %} {% block title %}Frequently Asked Questions{% endblock %} {% block body %}

Frequently Asked Questions

Please find your question here. If don't find the answer, feel free to join the mailing list and ask your question there.

Is siena another ORM?
Not exactly. It is not an ORM (Object-relational mapping tool) because it is not only intended to be used in relational databases. Siena is a library for persistience that works in relational databases and NoSQL databases as well.
Does siena support JOINs?
No. Siena has a common API for both relational and NoSQL databases. So you can write code for NoSQL databases and then port it to a relational database and viceversa. Supporting JOINs will break this compatibility.
Instead of using JOINs you can use denormalization. Siena has some features that will help you with this. Please read the Getting started guide, the section that talks about "embedded objects".
How can I implement one-to-many relationships?
Check the Getting started guide, the section that talks about "Working with relationships".
How can I implement many-to-many relationships?
Just create an intermediate class that represents the many-to-many relationship. Then implement two one-to-many relationships. Check the Getting started guide, the section that talks about "Working with relationships".
Does Siena support foreign keys?
Siena supports relationships and can work in relational databases. But ensuring data consistency depends on your database engine. In relational databases you can create your constraints manually. The siena implementation for relational databases can create the database schema, but doesn't support creating the foreign keys yet.
Can siena create and update the database schema?
The siena implementation for relational databases can generate the SQL needed to keep in sync your data model with your database schema. It creates "CREATE TABLE" and "ALTER TABLE", etc. when needed.
Does siena support connection pooling?
The siena implementation for relational databases supports pluggable siena.jdbc.ConnectionManager. You can implement your own. If you are using the Play! framework the best idea is to implement a ConnectionManager that uses the pooling feature from the framework. Read how.
{% endblock %}