layout | title | permalink |
---|---|---|
page |
301.11 Reading Notes |
/301-R11/ |
SQL | NoSQL |
---|---|
RDBMS | Non-relational/distributed database |
Table-based | Document-based (various schema) |
Vertically scalable | Horizontally scalable |
Complex queries | Weaker queries |
Wide availability of support | Limited support sources |
-
SQL: (often pronounced like "Sequel") Structured Query Language-- A language that is used to write queries for management of data in a database (modification, deletion, insertion, retrieval). SQL is based around a table structure for all data.
-
Database schema-- the defined fields within data that all data within the DB must conform to.
-
SQL is relational- it uses multiple tables of data that may be distinguished by schema but can be compared, connected, and cross-referenced. (example:one-to-one or one-to-many relation of one data point to fields in other tables)
-
SQL is appropriate for normalized, distributed data.
- Real World Robb Examples: My previous job made extensive use of databases (most in SQL-based systems, others I do not know the basis of) to manage class action lawsuit data. Depending on the case, individual claimants may have multiple claims per-vehicle, account, or purchase of a product or service. Overall each individual claimant needed consistent types of data for a name, contact information, and system ID, while each claim had a set of data that was particular to each case and tied to a claimant ID as well as having a separate ID category of its own.
-
SQL can only effectively scale vertically-- by adding more computing power.
-
-
NoSQL: NoSQL consists of data "collections" rather than tables, and no schema is enforced on data within the same collection.
-
NoSQL is appropriate for large and potentially changable data sets within the same database.
-
Real world examples: A long-term data collection project where new parameters might be added over time for the same compared subjects.
-
NoSQL can scale horizontally-- by adding parallel server storage for more data in addition to vertically.
-
NoSQL can outperform SQL for rapid but uncomplicated read/write requests.
-
Less efficient for data sets where very few fields are consistently read or written
-
Data is stored in documents that use flexible key-value pairs similar to JSON files.
-
-
Which type of database is best for hierarchical data storage?
- How do the massively decentralized computing systems of the last decade compare to SQL and NoSQL systems covered so far in how data is stored and accessed from them?