현재 내 Java 응용 프로그램을위한 임베디드 nosql 데이터베이스를 찾으려고합니다. 내 현재 접근 couchbase 라이트 자바를 사용하고 있습니다. 다음 예제를 실행하고 db.sqlite3 파일을 생성했습니다.couchbase lite는 실제로 no 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 라이트 지속성 메커니즘은 .sqlite3입니다. 나를 데이터베이스 파일의 관계형 모델이라고 혼동하게 만드는 것은 무엇입니까? 여기서 나를 깨우칠 수 있니? – user3014595
NoSQL은 "Not SQL"의 약자입니다. – DimaSan