現在、私は自分のJavaアプリケーションのために埋め込み可能なnosqlデータベースを探しています。私の現在のアプローチは、couchbase lite javaを使用しています。私は次の例を実行し、db.sqlite3ファイルの作成を見た。couchbase liteは実際にはSQLデータベースがありません
public class Main {
public static void main(String[] args) {
// Enable logging
Logger log = Logger.getLogger("app1");
log.setLevel(Level.ALL);
JavaContext context = new JavaContext();
// Create a manager
Manager manager = null;
try {
manager = new Manager(context, Manager.DEFAULT_OPTIONS);
} catch (IOException e) {
e.printStackTrace();
}
// Create or open the database named app
Database database = null;
try {
database = manager.getDatabase("app1");
} catch (CouchbaseLiteException e) {
e.printStackTrace();
}
// The properties that will be saved on the document
Map<String, Object> properties = new HashMap<String, Object>();
properties.put("title", "Couchbase Mobile");
properties.put("sdk", "Java");
// Create a new document
Document document = database.createDocument();
// Save the document to the database
try {
document.putProperties(properties);
} catch (CouchbaseLiteException e) {
e.printStackTrace();
}
// Log the document ID (generated by the database)
// and properties
log.info(String.format("Document ID :: %s", document.getId()));
log.info(String.format("Learning %s with %s", (String) document.getProperty("title"), (String) document.getProperty("sdk")));
System.out.println(document.toString());
}
}
ここでは、nosqlデータベースを使用していますか?
はい、Couchbaseは、[公式サイト](http://www.couchbase.com/)にあるように、マルチモデルのNoSQLドキュメント指向データベースです。 – DimaSan
文書のcouchbase liteパーシステンス機構は.sqlite3です。何が私を混乱させるのかは、それらのデータベースファイルのリレーショナルモデルです。私はここで私を啓発することができますか? – user3014595
NoSQLは "SQLだけではない"の略です。 – DimaSan