Podcast
Questions and Answers
What is a key characteristic of a columnar database?
What is a key characteristic of a columnar database?
- It supports a fixed schema for all rows.
- Data can be stored in a flexible schema. (correct)
- Data is stored in rows only.
- It always requires indexing for speed.
In a graph database, what does a node represent?
In a graph database, what does a node represent?
- A data type constraint.
- A relationship to another node.
- An entity that can contain properties. (correct)
- A data record from a table.
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?
- MySQL (correct)
- Amazon SimpleDB
- HBase
- Cassandra
What aspect of NoSQL databases might encourage their usage?
What aspect of NoSQL databases might encourage their usage?
What is one of the primary benefits of using a relational database?
What is one of the primary benefits of using a relational database?
Which of the following best describes a key-value database?
Which of the following best describes a key-value database?
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?
How does Redis primarily differ from traditional disk-based databases?
How does Redis primarily differ from traditional disk-based databases?
Why might columnar databases be less optimal for insert operations?
Why might columnar databases be less optimal for insert operations?
Which statement best describes the nature of NoSQL databases?
Which statement best describes the nature of NoSQL databases?
How does data compression benefit a columnar database?
How does data compression benefit a columnar database?
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?
Which of the following terms is commonly associated with graph algorithms?
Which of the following terms is commonly associated with graph algorithms?
What feature does a document database offer compared to a relational database?
What feature does a document database offer compared to a relational database?
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?
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?
Which statement accurately describes the indexing method used in MongoDB?
Which statement accurately describes the indexing method used in MongoDB?
What is a significant limitation of MongoDB regarding transactions?
What is a significant limitation of MongoDB regarding transactions?
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?
How does MongoDB handle data partitioning?
How does MongoDB handle data partitioning?
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?
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?
What is the purpose of the '_id' field in MongoDB?
What is the purpose of the '_id' field in MongoDB?
Which of the following operations can be performed through the MongoDB API?
Which of the following operations can be performed through the MongoDB API?
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?
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?
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?
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?
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?
Which item is NOT commonly associated with a document database?
Which item is NOT commonly associated with a document database?
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?
What describes the data structure format used in document databases?
What describes the data structure format used in document databases?
Flashcards
Relational Databases
Relational Databases
Databases that organize data into tables with relationships between them.
NoSQL Databases
NoSQL Databases
Databases that don't use the traditional table-based structure of relational databases.
Key-Value Database
Key-Value Database
A simple NoSQL database that stores data as key-value pairs.
Redis
Redis
Signup and view all the flashcards
Document Database
Document Database
Signup and view all the flashcards
GET (database operation)
GET (database operation)
Signup and view all the flashcards
SET (database operation)
SET (database operation)
Signup and view all the flashcards
DEL (database operation)
DEL (database operation)
Signup and view all the flashcards
NoSQL vs Relational Database
NoSQL vs Relational Database
Signup and view all the flashcards
SQL to NoSQL Migration
SQL to NoSQL Migration
Signup and view all the flashcards
1-1 Mapping (Migration)
1-1 Mapping (Migration)
Signup and view all the flashcards
Denormalization (for Migration)
Denormalization (for Migration)
Signup and view all the flashcards
JSON Data in Database
JSON Data in Database
Signup and view all the flashcards
MongoDB
MongoDB
Signup and view all the flashcards
Document-oriented DB
Document-oriented DB
Signup and view all the flashcards
CRUD Operations (MongoDB)
CRUD Operations (MongoDB)
Signup and view all the flashcards
Insert (MongoDB)
Insert (MongoDB)
Signup and view all the flashcards
Find (MongoDB)
Find (MongoDB)
Signup and view all the flashcards
Update (MongoDB)
Update (MongoDB)
Signup and view all the flashcards
Delete (MongoDB)
Delete (MongoDB)
Signup and view all the flashcards
Columnar Database
Columnar Database
Signup and view all the flashcards
Columnar Database Benefits
Columnar Database Benefits
Signup and view all the flashcards
Graph Database
Graph Database
Signup and view all the flashcards
Node in a Graph Database
Node in a Graph Database
Signup and view all the flashcards
Relationship in a Graph Database
Relationship in a Graph Database
Signup and view all the flashcards
Graph Database Advantages
Graph Database Advantages
Signup and view all the flashcards
When to Use NoSQL
When to Use NoSQL
Signup and view all the flashcards
ACID Properties
ACID Properties
Signup and view all the flashcards
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