Podcast
Questions and Answers
What is a key characteristic of a columnar database?
What is a key characteristic of a columnar database?
In a graph database, what does a node represent?
In a graph database, what does a node represent?
Which of the following databases is NOT an example of a columnar database?
Which of the following databases is NOT an example of a columnar database?
What aspect of NoSQL databases might encourage their usage?
What aspect of NoSQL databases might encourage their usage?
Signup and view all the answers
What is one of the primary benefits of using a relational database?
What is one of the primary benefits of using a relational database?
Signup and view all the answers
Which of the following best describes a key-value database?
Which of the following best describes a key-value database?
Signup and view all the answers
What is typically used to describe the connection between two nodes in a graph database?
What is typically used to describe the connection between two nodes in a graph database?
Signup and view all the answers
How does Redis primarily differ from traditional disk-based databases?
How does Redis primarily differ from traditional disk-based databases?
Signup and view all the answers
Why might columnar databases be less optimal for insert operations?
Why might columnar databases be less optimal for insert operations?
Signup and view all the answers
Which statement best describes the nature of NoSQL databases?
Which statement best describes the nature of NoSQL databases?
Signup and view all the answers
How does data compression benefit a columnar database?
How does data compression benefit a columnar database?
Signup and view all the answers
What is a significant advantage of using Redis as a key-value database?
What is a significant advantage of using Redis as a key-value database?
Signup and view all the answers
Which of the following terms is commonly associated with graph algorithms?
Which of the following terms is commonly associated with graph algorithms?
Signup and view all the answers
What feature does a document database offer compared to a relational database?
What feature does a document database offer compared to a relational database?
Signup and view all the answers
Which operation is NOT typically associated with a key-value store like Redis?
Which operation is NOT typically associated with a key-value store like Redis?
Signup and view all the answers
What primary challenge does a traditional relational database face in big data environments?
What primary challenge does a traditional relational database face in big data environments?
Signup and view all the answers
Which statement accurately describes the indexing method used in MongoDB?
Which statement accurately describes the indexing method used in MongoDB?
Signup and view all the answers
What is a significant limitation of MongoDB regarding transactions?
What is a significant limitation of MongoDB regarding transactions?
Signup and view all the answers
In MongoDB, which of the following is the correct method to delete a specific document matching a criterion?
In MongoDB, which of the following is the correct method to delete a specific document matching a criterion?
Signup and view all the answers
How does MongoDB handle data partitioning?
How does MongoDB handle data partitioning?
Signup and view all the answers
What is the default behavior when inserting a document in MongoDB if the '_id' field is omitted?
What is the default behavior when inserting a document in MongoDB if the '_id' field is omitted?
Signup and view all the answers
Which of the following best describes the data structure used in MongoDB as opposed to traditional relational databases?
Which of the following best describes the data structure used in MongoDB as opposed to traditional relational databases?
Signup and view all the answers
What is the purpose of the '_id' field in MongoDB?
What is the purpose of the '_id' field in MongoDB?
Signup and view all the answers
Which of the following operations can be performed through the MongoDB API?
Which of the following operations can be performed through the MongoDB API?
Signup and view all the answers
What type of database is characterized by no relation schema and is often used to store data in JSON, BSON, or XML documents?
What type of database is characterized by no relation schema and is often used to store data in JSON, BSON, or XML documents?
Signup and view all the answers
Which of the following represents a potential reason not to migrate from SQL to NoSQL?
Which of the following represents a potential reason not to migrate from SQL to NoSQL?
Signup and view all the answers
In the context of SQL to NoSQL migration, which scheme is the most popular?
In the context of SQL to NoSQL migration, which scheme is the most popular?
Signup and view all the answers
When is it advisable to design a NoSQL solution from the beginning rather than migrating from SQL?
When is it advisable to design a NoSQL solution from the beginning rather than migrating from SQL?
Signup and view all the answers
What is a disadvantage of using SQL databases compared to NoSQL databases during data assembly?
What is a disadvantage of using SQL databases compared to NoSQL databases during data assembly?
Signup and view all the answers
Which item is NOT commonly associated with a document database?
Which item is NOT commonly associated with a document database?
Signup and view all the answers
Which of the following is a potential benefit of using a document database?
Which of the following is a potential benefit of using a document database?
Signup and view all the answers
What describes the data structure format used in document databases?
What describes the data structure format used in document databases?
Signup and view all the answers
Study Notes
INF2003: Database Systems NoSQL AY24/25 Trimester 1
- Course offered by Singapore Institute of Technology (SIT)
- Presented by Zhang Wei on November 5, 2024
Relational DB: Advantages and Gap
-
Benefits:
- Consistency, concurrency, recovery
- Matematical background, solid and rigorous
- SQL for management and communication
- Mature ecosystem with tools and services
- Fact: MySQL database is centralized, stored on a single disk.
-
Good points:
- Fast local joins, easy management
-
Bad points:
- Scalability/partitioning issues
- Robustness/replication problems
- Task dispatching challenges
-
Reality:
- Big data handling, Geo-distribution, and data diversity
NoSQL
- Goal: Simplify data models for wider use cases.
-
Features:
- Diverse data types and locations
-
Types:
- Key-value: Simplest NoSQL, a hash table with key-value pairs. Example: Redis.
- Store, retrieve values in O(1) time
- Support for data structures (Strings, hashes, lists, sets etc)
- In-memory operations for speed
- Data persistency to disk for reliability
- Many languages supported (Python, Java, C#, C++, etc.)
- Document:
- Handles heterogeneous metadata
- Suitable for storing items (e.g., Lazada/Shopee products)
- Not suitable for relational database
- Columnar:
- Data stored in columns, not rows
- Flexible schema design
- Data compression
- Examples: HBase, Cassandra, Hypertable, Amazon SimpleDB, etc.
- Graph:
- Explicit graph structure
- Each node knows its adjacent nodes
- Suitable for applications with native graph structure (social networking)
- Easily applies graph algorithms
- Node: Contains properties
- Relationship: Connects two nodes (e.g., acted_in)
- Property: Named values (e.g., 'name', 'Tom Hanks')
- Label: Type of node (e.g., person)
MongoDB
- Founded in 2007
- Document-oriented NoSQL database
- Written in C++
- Hash-based schema-less database
- Uses strings for keys
- Document identifiers are automatically generated
- Supports various programming languages (Javascript, Python)
- Features: secondary indexes, atomic writes, master-slave replication, automatic failover, horizontal scaling
- No joins (using scripts)
SQL -> NoSQL Migration
- Possible reasons: Business scale-up, application changes
-
Scheme 1 (1:1 mapping): Most popular, translate SQL table to NoSQL collections
- Tools like AWS DMS, Python libraries available
- Sample code readily available
- Scheme 2 (Denormalization): Decompose to bigger structures
- Scheme 3 (Forget migration): Start from scratch with a new design (better for major app changes)
Columnar Databases
- Database as key-value pairs
- Key is comprised of 3 parts: row key, column key & timestamp
- Data stored column-wise
- Flexible schema
- Data compression
- Examples: HBase, Cassandra, Hypertable
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
nosql