Logo/

NoSQL Database Concepts and Elasticsearch Applications

Log in

Made with ScholarlyMake flashcards like these from your own notes

NoSQL Database Concepts and Elasticsearch Applications

Questions and answers

88 cards
  1. Question:What is a key difference between NoSQL and relational databases?

    Answer:NoSQL models data differently, fitting specific use cases without fixed schemas.

  2. Question:Define the ACID principles of relational databases.

    Answer:Atomicity, Consistency, Isolation, Durability—ensuring reliable and safe transactions.

  3. Question:What does the CAP theorem state about distributed databases?

    Answer:A database can only satisfy two of the: consistency, availability, partition tolerance.

  4. Question:Why do NoSQL databases typically follow the BASE principles?

    Answer:Because distributed NoSQL systems choose availability and partition tolerance over strict consistency.

  5. Question:Which NoSQL database type is best suited for highly interconnected data like social networks?

    Answer:Graph database.

  6. Question:What is the main motivation for companies to adopt NoSQL databases over traditional RDBMS?

    Answer:To handle large volumes, variety, velocity of data, and scalable partitioning.

  7. Question:How does a document store compare to a traditional relational database?

    Answer:Stores entire documents as units, reducing need for normalization and complex joins.

  8. Question:What are key-value stores optimized for?

    Answer:Scalability and fast retrieval of large data volumes via key-based access.

  9. Question:When is a column-oriented database preferable over a row-oriented one?

    Answer:In analytical queries and reporting, for summing and counting large datasets.

  10. Question:What role does sharding play in NoSQL systems like Elasticsearch?

    Answer:Distributes data across shards and replicas for scalability and fault tolerance.

  11. Question:How does the BASE model relate to eventual consistency?

    Answer:It guarantees data will become consistent over time through eventual synchronization.

  12. Question:Why are NewSQL databases considered a bridge between relational and NoSQL systems?

    Answer:They retain ACID features while supporting distributed, scalable architectures.

  13. Question:What are the main types of NoSQL databases discussed?

    Answer:Document store, key-value store, graph database, column database.

  14. Question:In the context of NoSQL, what is the significance of the ability to model data differently?

    Answer:It allows tailoring the database structure to specific use cases, improving efficiency.

  15. Question:Which NoSQL database type is particularly suitable for storing hierarchical or nested data?

    Answer:Document store.

  16. Question:Why might a business choose to turn off database nodes temporarily to ensure consistency?

    Answer:To prevent selling more items than the stock during partition failures.

  17. Question:What is the main challenge CAP theorem highlights in multi-node database design?

    Answer:Balancing consistency, availability, and partition tolerance.

  18. Question:What is a common use case for graph databases?

    Answer:Modeling interconnected relationships like social networks or citation graphs.

  19. Question:What is the advantage of column-oriented databases for analytical processing?

    Answer:Fast aggregation and summing operations on large datasets.

  20. Question:How does NoSQL's approach to schema differ from relational databases?

    Answer:NoSQL allows flexible, schema-less or semi-structured data modeling.

  21. Question:What does the 'soft state' aspect of BASE imply about system data?

    Answer:System state may change over time without explicit updates.

  22. Question:In what scenario might a relational database still be preferable?

    Answer:For small datasets requiring complex joins and strict consistency.

  23. Question:What is the primary purpose of normalization in relational databases?

    Answer:To reduce data redundancy by storing each piece of data only once.

  24. Question:Why are graph databases gaining popularity over other database types?

    Answer:They efficiently model highly connected, complex relationships.

  25. Question:What does 'sharding' entail in NoSQL systems?

    Answer:Partitioning data into smaller pieces across multiple servers or nodes.

  26. Question:What is a key benefit of using Elasticsearch with a NoSQL approach?

    Answer:Efficient, scalable search and analysis of large unstructured data.

  27. Question:Which NoSQL database type is most suitable for simple key-value pairs?

    Answer:Key-value store.

  28. Question:What is the significance of the 'eventual consistency' concept?

    Answer:Data will synchronize and become consistent after some delay.

  29. Question:Name a popular graph database that supports ACID properties.

    Answer:Neo4j.

  30. Question:How does NoSQL database modeling differ in terms of data normalization?

    Answer:NoSQL often forgo normalization to allow flexible or denormalized data.

  31. Question:What is a major limitation of multi-node distributed databases as per CAP?

    Answer:You must choose between consistency and availability during network partitions.

  32. Question:Why is modeling data for a graph database complex?

    Answer:Because of the wide interconnectivity and multiple relationship types.

  33. Question:What is the primary purpose of Elasticsearch within the described case study?

    Answer:Full-text search engine for disease diagnosis.

  34. Question:Why does Elasticsearch remain effective despite spelling or entry errors?

    Answer:Full-text search is robust against common errors like misspellings.

  35. Question:What is the main advantage of using a document store like Elasticsearch for medical data?

    Answer:It enables fast, flexible, and full-text search over unstructured data.

  36. Question:Why is creating a schema in Elasticsearch beneficial despite its schema-less claim?

    Answer:It ensures predictable data types and search behavior.

  37. Question:How does the example query '+fatigue+fever+

    Answer:The plus sign makes symptoms mandatory in the search.

  38. Question:What role do field weights (e.g., ^5, ^10) play in Elasticsearch searches?

    Answer:They increase the importance of matches in specific fields.

  39. Question:What is the significance of phrase matching in Elasticsearch queries?

    Answer:It searches for exact phrases enclosed in quotes.

  40. Question:How does adding additional symptoms, like 'rash' and 'chest pain,' refine the disease diagnosis?

    Answer:It narrows results, increasing the likelihood of correct diagnosis.

  41. Question:In the context of the case study, why might some diseases like HGE appear after more symptoms are added?

    Answer:Additional symptoms improve specificity, filtering out less relevant results.

  42. Question:What is the main challenge of relying solely on symptom-based search engines for diagnoses?

    Answer:Limited data complexity and factors beyond symptoms affect accuracy.

  43. Question:How does document indexing in Elasticsearch facilitate disease diagnostics?

    Answer:It allows quick retrieval of relevant disease information based on symptoms.

  44. Question:Why is it important to exclude links starting with 'list' when indexing diseases from Wikipedia?

    Answer:They are non-disease pages, not relevant for diagnosis.

  45. Question:What is the role of the 'body' of the document in the Elasticsearch index?

    Answer:Contains full text content for comprehensive search.

  46. Question:Why should one avoid over-complicating search queries in this context?

    Answer:Simple, relevant queries improve performance and result interpretability.

  47. Question:What is the main benefit of profiling a disease by its keywords in this project?

    Answer:Facilitates educational understanding and epidemic detection.

  48. Question:What advantage does Elasticsearch have over MongoDB in this case study?

    Answer:It specializes in full-text search, ideal for symptom-based queries.

  49. Question:How can fuzzy searches or regular expressions enhance diagnosis accuracy?

    Answer:They allow handling typos and partial matches, improving search robustness.

  50. Question:In setting the research goal, what is the secondary goal besides creating a search engine?

    Answer:Profiling diseases by their keywords for educational and epidemiological use.

  51. Question:Why is it recommended to limit data retrieval to specific pages rather than the whole Wikipedia dump?

    Answer:To conserve storage, bandwidth, and focus on relevant data.

  52. Question:What is the function of the 'mapping' in Elasticsearch schema design?

    Answer:Defines data types and structure for predictable indexing and search.

  53. Question:Why is it important to handle symptom phrases as exact strings in queries?

    Answer:To ensure precise phrase matching and relevant results.

  54. Question:What makes Elasticsearch an attractive choice over Solr for small projects?

    Answer:Ease of setup and configuration.

  55. Question:How does including the disease name as a document ID benefit searches?

    Answer:It allows quick lookup and avoids duplicates.

  56. Question:What is the main challenge when extending this approach to other data sources or more symptoms?

    Answer:Matching inconsistent disease identifiers and managing complex queries.

  57. Question:What is the significance of the 'score' in search results?

    Answer:Indicates how well a disease matches the search query.

  58. Question:Why might a disease not appear in the top results initially?

    Answer:Insufficient symptom matches or lower relevance score.

  59. Question:How can adding symptoms iteratively help confirm a disease diagnosis?

    Answer:It refines search results, increasing the likelihood of correct identification.

  60. Question:What is the main limitation of a symptom-based search engine compared to expert diagnosis?

    Answer:Missing contextual and nuanced medical information.

  61. Question:What is the importance of full text and title fields in the search index?

    Answer:They provide multiple relevance points for matching symptoms and disease names.

  62. Question:Why does Elasticsearch support different field weights during search?

    Answer:To prioritize matches in more critical fields like titles.

  63. Question:What is the primary benefit of using Python libraries in this case study?

    Answer:Automates data retrieval and indexing, enabling rapid iteration.

  64. Question:How does full-text search help in medical diagnosis applications?

    Answer:Quickly retrieves relevant disease information based on unstructured data.

  65. Question:What must be true for the search engine to correctly diagnose a disease?

    Answer:The symptoms and data must be accurately indexed and queried.

  66. Question:Why is creating an index mapping crucial before indexing diseases?

    Answer:It ensures consistent data types and optimized search.

  67. Question:What additional symptom confirms lupus when face rash is absent?

    Answer:Chest pain

  68. Question:Which operator does Elasticsearch use to include multiple conditions in a query?

    Answer:Logical AND

  69. Question:What is the Damerau-Levenshtein distance used for in search engines?

    Answer:Handling spelling mistakes with transpositions

  70. Question:Why are filters in Elasticsearch faster than search queries?

    Answer:They are less complex and cacheable

  71. Question:What is the purpose of significant terms aggregation in Elasticsearch?

    Answer:Identifying keywords that distinguish a disease

  72. Question:What is an n-gram, such as a bigram or trigram, in text analysis?

    Answer:A continuous sequence of n words or characters

  73. Question:When indexing for disease profiling, why might using bigrams improve results?

    Answer:They capture meaningful word pairs in text

  74. Question:What does the process of data cleansing in text analysis typically involve?

    Answer:Stop word filtering or removing common words

  75. Question:What is a custom analyzer in Elasticsearch used for?

    Answer:To define specific tokenization and filtering processes like bigram creation

  76. Question:In the context of NoSQL, what does the BASE acronym stand for?

    Answer:Basic availability, soft state, eventual consistency

  77. Question:What does the CAP Theorem imply for distributed databases?

    Answer:You can't have consistency and availability simultaneously

  78. Question:Name a key-value store that is known for its size and versatility.

    Answer:Redis

  79. Question:What distinguishes a graph database from other NoSQL types?

    Answer:It models entities and relations explicitly

  80. Question:Why is Elasticsearch considered both a document store and a search engine?

    Answer:It stores data as documents and performs full-text search

  81. Question:What is the primary benefit of using significant terms aggregation in disease profiling?

    Answer:Identifies characteristic keywords in the dataset

  82. Question:How does the use of filters prior to queries enhance performance in Elasticsearch?

    Answer:Filters are faster, less resource-intensive, and cacheable

  83. Question:What is the main difference between a search query and a filter in Elasticsearch?

    Answer:Search query scores and ranks results; filter applies an inclusion/exclusion criterion without scoring

  84. Question:What operation in Damerau-Levenshtein distance accounts for transposing characters?

    Answer:Adjacent character transposition

  85. Question:How does Elasticsearch combine query and filter in a search request?

    Answer:Filters narrow down data, and queries rank results within that subset

  86. Question:Why might bigrams be preferable to trigrams or higher n-grams in some indexing scenarios?

    Answer:They balance storage and meaningful phrase detection

  87. Question:What role does Elasticsearch index settings play in enabling bi-gram creation?

    Answer:They configure token filters like the shingle filter for bigram generation

  88. Question:What is the purpose of closing and reopening an Elasticsearch index after changing settings?

    Answer:To apply index configuration updates