Document Stores at ETHZ - ETH Zurich | Flashcards & Summaries

Lernmaterialien für Document Stores an der ETHZ - ETH Zurich

Greife auf kostenlose Karteikarten, Zusammenfassungen, Übungsaufgaben und Altklausuren für deinen Document Stores Kurs an der ETHZ - ETH Zurich zu.

TESTE DEIN WISSEN

What can the values of a document in a document store be?

Lösung anzeigen
TESTE DEIN WISSEN

They can be Strings, integers, other documents, arrays and arrays of documents. Not all documents need to have the same fields.

Lösung ausblenden
TESTE DEIN WISSEN

What are the advantages of document stores over relational databases?

Lösung anzeigen
TESTE DEIN WISSEN

Flexibility. Not every record needs to store the same properties. New properties can be added on the fly.

Lösung ausblenden
TESTE DEIN WISSEN

What are indexes good for?

Lösung anzeigen
TESTE DEIN WISSEN

Indexes support the efficient resolution of queries. Without indexes, MongoDB must scan every document in a collection to select those documents that match the query. Scans can be highly inefficient and require MongoDB to process a large volume of data.

Lösung ausblenden
TESTE DEIN WISSEN

What makes document stores different from key-value stores?

Lösung anzeigen
TESTE DEIN WISSEN

Document-oriented databases are inherently a subclass of the key-value store. The difference lies in the way the data is processed: in a key-value store, the data is considered to be inherently opaque to the database, whereas a document-oriented system relies on an internal structure of the documents in order to extract metadata that the database engine uses for further optimization. Although the difference is often mostly in tools of the systems, conceptually the document-store is designed to offer a richer experience with modern programming techniques.

Lösung ausblenden
TESTE DEIN WISSEN

Is it true that different relationships between data can be represented by references and embedded documents?

Lösung anzeigen
TESTE DEIN WISSEN

Yes

Lösung ausblenden
TESTE DEIN WISSEN

What are indexes?

Lösung anzeigen
TESTE DEIN WISSEN

Indexes are special data structures that store a small portion of the data set in an easy-to-traverse form. The index stores the value of a specific field or set of fields, ordered by the value of the field as specified in the index.

Lösung ausblenden
TESTE DEIN WISSEN

How are hashed indexes used in MongoDB?

Lösung anzeigen
TESTE DEIN WISSEN

Hashed indexes are used to partition data across a sharded cluster.

Lösung ausblenden
TESTE DEIN WISSEN

How are sparse indexes different from normal ones?

Lösung anzeigen
TESTE DEIN WISSEN

Sparse indexes only contain entries for documents that have the indexed field, even if the index field contains a null value. The index skips over any document that is missing the indexed field. The index is "sparse" because it does not include all documents of a collection. By contrast, non-sparse indexes contain all documents in a collection, storing null values for those documents that do not contain the indexed field.

Lösung ausblenden
TESTE DEIN WISSEN

Is it true that in document stores, you must determine and declare a table's schema before inserting data?

Lösung anzeigen
TESTE DEIN WISSEN

No, document stores have a flexible schema, which does not require specifying the schema as in relational databases.

Lösung ausblenden
TESTE DEIN WISSEN

Is it true that Documents stores are not subject to data modeling and support only one denormalized data model?

Lösung anzeigen
TESTE DEIN WISSEN

No

Lösung ausblenden
TESTE DEIN WISSEN

How does a large number of small documents affect performance?

Lösung anzeigen
TESTE DEIN WISSEN

It degrades performance since document stores are basically key-value stores. If you can group these small documents by some logical relationship and you frequently retrieve the documents by this grouping, you might consider "rolling-up" the small documents into larger documents that contain an array of embedded documents.

Rolling up these small documents into logical groupings means that queries to retrieve a group of documents involve sequential reads and fewer random disk accesses. Additionally, rolling up documents and moving common fields to the larger document benefits the creation of an index on these fields. There would be fewer copies of the common fields and there would be fewer associated key entries in the corresponding index. See Indexes for more information on indexes.

However, if you often only need to retrieve a subset of the documents within the group, then rolling up the documents may not provide better performance. Furthermore, if small, separate documents represent the natural model for the data, you should maintain that model.

Lösung ausblenden
TESTE DEIN WISSEN

How does denormalization affect performance?

Lösung anzeigen
TESTE DEIN WISSEN
  • in general, it provides better performance for read operations (since expensive joins can be omitted)
  • request and retrieve related data in a single database operation
  • update related data in a single atomic write operation
Lösung ausblenden
  • 54238 Karteikarten
  • 1150 Studierende
  • 67 Lernmaterialien

Beispielhafte Karteikarten für deinen Document Stores Kurs an der ETHZ - ETH Zurich - von Kommilitonen auf StudySmarter erstellt!

Q:

What can the values of a document in a document store be?

A:

They can be Strings, integers, other documents, arrays and arrays of documents. Not all documents need to have the same fields.

Q:

What are the advantages of document stores over relational databases?

A:

Flexibility. Not every record needs to store the same properties. New properties can be added on the fly.

Q:

What are indexes good for?

A:

Indexes support the efficient resolution of queries. Without indexes, MongoDB must scan every document in a collection to select those documents that match the query. Scans can be highly inefficient and require MongoDB to process a large volume of data.

Q:

What makes document stores different from key-value stores?

A:

Document-oriented databases are inherently a subclass of the key-value store. The difference lies in the way the data is processed: in a key-value store, the data is considered to be inherently opaque to the database, whereas a document-oriented system relies on an internal structure of the documents in order to extract metadata that the database engine uses for further optimization. Although the difference is often mostly in tools of the systems, conceptually the document-store is designed to offer a richer experience with modern programming techniques.

Q:

Is it true that different relationships between data can be represented by references and embedded documents?

A:

Yes

Mehr Karteikarten anzeigen
Q:

What are indexes?

A:

Indexes are special data structures that store a small portion of the data set in an easy-to-traverse form. The index stores the value of a specific field or set of fields, ordered by the value of the field as specified in the index.

Q:

How are hashed indexes used in MongoDB?

A:

Hashed indexes are used to partition data across a sharded cluster.

Q:

How are sparse indexes different from normal ones?

A:

Sparse indexes only contain entries for documents that have the indexed field, even if the index field contains a null value. The index skips over any document that is missing the indexed field. The index is "sparse" because it does not include all documents of a collection. By contrast, non-sparse indexes contain all documents in a collection, storing null values for those documents that do not contain the indexed field.

Q:

Is it true that in document stores, you must determine and declare a table's schema before inserting data?

A:

No, document stores have a flexible schema, which does not require specifying the schema as in relational databases.

Q:

Is it true that Documents stores are not subject to data modeling and support only one denormalized data model?

A:

No

Q:

How does a large number of small documents affect performance?

A:

It degrades performance since document stores are basically key-value stores. If you can group these small documents by some logical relationship and you frequently retrieve the documents by this grouping, you might consider "rolling-up" the small documents into larger documents that contain an array of embedded documents.

Rolling up these small documents into logical groupings means that queries to retrieve a group of documents involve sequential reads and fewer random disk accesses. Additionally, rolling up documents and moving common fields to the larger document benefits the creation of an index on these fields. There would be fewer copies of the common fields and there would be fewer associated key entries in the corresponding index. See Indexes for more information on indexes.

However, if you often only need to retrieve a subset of the documents within the group, then rolling up the documents may not provide better performance. Furthermore, if small, separate documents represent the natural model for the data, you should maintain that model.

Q:

How does denormalization affect performance?

A:
  • in general, it provides better performance for read operations (since expensive joins can be omitted)
  • request and retrieve related data in a single database operation
  • update related data in a single atomic write operation
Document Stores

Erstelle und finde Lernmaterialien auf StudySmarter.

Greife kostenlos auf tausende geteilte Karteikarten, Zusammenfassungen, Altklausuren und mehr zu.

Jetzt loslegen

Das sind die beliebtesten StudySmarter Kurse für deinen Studiengang Document Stores an der ETHZ - ETH Zurich

Für deinen Studiengang Document Stores an der ETHZ - ETH Zurich gibt es bereits viele Kurse, die von deinen Kommilitonen auf StudySmarter erstellt wurden. Karteikarten, Zusammenfassungen, Altklausuren, Übungsaufgaben und mehr warten auf dich!

Das sind die beliebtesten Document Stores Kurse im gesamten StudySmarter Universum

Data structures

Birkbeck College, University of London

Zum Kurs

Die all-in-one Lernapp für Studierende

Greife auf Millionen geteilter Lernmaterialien der StudySmarter Community zu
Kostenlos anmelden Document Stores
Erstelle Karteikarten und Zusammenfassungen mit den StudySmarter Tools
Kostenlos loslegen Document Stores