Since document databases store records in tree like structures the fields will never be at set positions. Does this make querying a document database inefficient, or would indexes just be used a开发者_StackOverflows with a normal relational database?
You seem to have a specific idea in mind of a 'document database,' but that term is not a term of art.
A 'document database' could be:
- a database with a big text field column and a full text index.
- an XML database such as MarkLogic or SoftwareAG
- a complex SQL schema that models a document as a lot of little pieces.
There are more or less efficient architectures and indexing strategies for all of these. Only the last uses conventional SQL indices. Full text support uses inverted term indices such as are implemented by Lucene to supply fast search on arbitrary terms. XML databases build indexes on XPath expressions.
精彩评论