Iam using nosql in totajs4 .
Document structure in nosql database
{directoryName:{fileName:{"created": timestamp,"modified":timestamp,"deleted":timestamp}}}
unable to update this structure.
Changing nested objects isn't supported yet in Total.js 4. I recommend reading the specific document and modify only the nested property/key.
Related
I and my colleagues will migrate from firestore to MongoDB and we need to find a suitable way or a tool to analyze the firebase schema and know exactly the model for each collection and each sub-collection inside a collection in a nested level.
I tried to write a script but it was tedious due to the level of sub-collection we have.
I was able to get collection and sub-collections but I found it is hard to loop on each document and get its schema.
So any suggestions?
I would like to create collection where only one entity should be stored.
Questions:
Is it possible to create restrictions for this collection on db level?
What are the best practices for CRUD application dealing with such collection?
You can use schema validation to be sure that new documents will respect your schema. This feature appears in 3.2, but was modified since 3.6 with use of JSON schema. Check the right doc version.
I have a "project" entity and each project can have many "models" (files and some metadata) and each model is associated with a "user".
So far I have considered each of the entities as a document in MongoDB, However, I find myself going back to SQl style when trying to create the relationships between them (e.g. adding the project ID in each model's metadata). Is this okay in the NoSQL world? Should I have a nested document for project which contains a list of all linked models? If yes, how can I do that considering that I use GridFs for storing the model files, while the project is just a normal document?
In MongoDB your data model should be such that the most frequently accessed queries should be blazing fast. In this scenario , since you are using GridFS for storing model files, you can store project,user etc as metadata for a GridFS model entry. You can then query 'metadata' and GridFS together. You can refer to this for specifics : GRIDFS Metadata
What are comparable database like Mongo DB?
We are trying to evaluate Mongo DB and find the best database for a enterprise level application.
Is there any developer UI and admin UI available for MongoDB like SQL Plus/Toad etc for Oracle?
MongoDB is a document-oriented database, so instead of a row of data, you have a document. In MonogDB's case, its a JSON document. Apache's CouchDB is another document database that stores data in JSON format although there are subtle differences between the two.
Choosing between the two depends on your use case. Sometimes CouchDB is better than MongoDB.
Checkout this comparative to see the differences.
MongoDB is what is known as a NoSQL database, which is I assume why you're interested in it. You can find a list of other NoSQL databases at the below links:
http://en.wikipedia.org/wiki/NoSQL
http://nosql-database.org/
MongoDB does not include a GUI-style administrative interface; however, there are numerous community projects that provide admin UIs for MongoDB:
http://www.mongodb.org/display/DOCS/Admin+UIs
I like document oriented databases like MongoDB very much. Because they are shema-less. You can just insert find and update your records without first having to define a schema. But you can define one in your own Project logic. You have more freedom.
It would be nice to have an embeddable NoSQL database. Like SQLite but document oriented.
Currently I do develop one in Java. (You can also use it withhin an Android App):
https://github.com/neo-expert/thingdb
I am quite happy with MongoVue. I've made a couple of videos about this here.
If you have RDBMS you probably have to use Solr to index your relational tables to fully nested documents.
Im new to non-sql databases like Mongodb, CouchDB and Cassandra, but it seems to me that the data you save is already in that document structure like the documents saved in Solr/Lucene.
Does this mean that you don't have to use Solr/Lucene when using these databases?
Is it already indexed so that you can do full-text search?
It depends on your needs. They have a full text search. In CouchDB the search is Lucene (same as solr). Unfortunately, this is just a full text index, if you need complex scoring or DisMax type searching, you'll likely want the added capabilities of an independent Solr Index.
Solr (Lucene) uses an algorithm to returns relevant documents from a query. It will returns a score to indicate how relevant each document is related to the query.
It is different than what a database (relational or not) does, which is returning results that matches or not a query.