On 13/09/13 21:18, Márcio Vinicius wrote:
Andy,

          In Jena documentation, all the examples using the TDB does not use
a relational database (MySQL or Postgres), is to use a bank or component is
only TDB file?

(sorry - I don't understand the last part of that sentence)


           It is recommended to use SDB on new projects? Because I read that
it was not recommended.

We do not recommend using SDB for new projects. See [1]. There are cases where SDB is necessary, typically where storing in an SQL databases is a mandatory requirement of a project. However, SDB does not scale as well as TDB and is slower. It does not get the same level of testing as other components - the project relies on user reports and we do not have complete coverage any more.

        Andy

[1] The wording we use visible at:
  http://jena.staging.apache.org/documentation/sdb/
and will be published to the main site in the next release.


thank.


2013/9/3 Andy Seaborne <[email protected]>

On 03/09/13 19:35, Márcio Vinicius wrote:

Dear, I have studied the Jena for some time and did some test prototypes.
In recent studies found that the documentation indicates the TDB component
for development of new applications, but all prototypes that had made was
based on SDB.

Example of connection:

        public Store getStore() {

StoreDesc storeDesc = new StoreDesc(LayoutType.**LayoutTripleNodesHash,
   DatabaseType.PostgreSQL);
JDBC.loadDriverPGSQL();

SDBConnection conn = new SDBConnection(Constants.DB_**URL,
   Constants.DB_USER,
Constants.DB_PASSWD);

Store store = SDBFactory.connectStore(conn, storeDesc);
   try {
if (!StoreUtils.isFormatted(**store)) {
store.getTableFormatter().**create();
   }
} catch (SQLException e) {
e.printStackTrace();
   }
return store;
}

How do I use the component TDB?


Hi there,

See

http://jena.apache.org/**documentation/tdb/<http://jena.apache.org/documentation/tdb/>

The pattern is similar:

Dataset ds = TDBFactory.createDatatset(**directory) ;

and use the dataset as normal.

No formatting is necessary.

         Andy


att






Reply via email to