8. SQL - Structured Query Language
CREATE TABLE student(id INT, first_name VARCHAR(25), last_name VARCHAR(25),
email VARCHAR(100), PRIMARY KEY (id));
INSERT INTO student VALUES (1, 'John', 'Peterson', 'jpeterson@email');
SELECT * FROM student;
SQL WIKI tutorial
9. SQL
SELECT * FROM student s JOIN student_course sc ON s.id = sc.student_id JOIN
course c ON sc.course_id = c.id WHERE c.mentor_id = 3;
SELECT s.id, s.first_name, s.last_name, c.id, c.title FROM student s JOIN
student_course sc ON s.id = sc.student_id JOIN course c ON sc.course_id = c.id
WHERE c.mentor_id = 3 ORDER BY s.id;
13. Pros
Relational databases are well-documented
and mature technologies, and RDBMS are
sold and maintained by a number of
established corporations.
SQL standards are well-defined and
commonly accepted.
A large pool of qualified developers have
experience with SQL and RDBMS.
All RDBMS are ACID-compliant, meaning
they satisfy the requirements of Atomicity,
Consistency, Isolation, and Durability.
RDBMSes dont work well or at all with
unstructured or semi-structured data, due to
schema and type constraints. This makes them
ill-suited for large analytics or IoT event loads.
The tables in your relational database will not
necessarily map one-to-one with an object or
class representing the same data.
When migrating one RDBMS to another,
schemas and types must generally be identical
between source and destination tables for
migration to work (schema constraint). For many
of the same reasons, extremely complex datasets
or those containing variable-length records are
generally difficult to handle with an RDBMS
schema.
Cons
15. Key-Value Stores
such as Redis and Amazon DynamoDB, are extremely simple database management systems that store only key-value
pairs and provide basic functionality for retrieving the value associated with a known key.
The simplicity of key-value stores makes these database management systems particularly well-suited to embedded
databases, where the stored data is not particularly complex and speed is of paramount importance.
16. Column Stores
such as Cassandra, Scylla, and HBase, are schema-agnostic systems that enable users to store data in column families or tables, a
single row of which can be thought of as a record a multi-dimensional key-value store.
These solutions are designed with the goal of scaling well enough to manage petabytes of data across as many as thousands of
commodity servers in a massive, distributed system.
Although technically schema-free, wide column stores like Scylla and Cassandra use an SQL variant called CQL for data definition and
manipulation, making them straightforward to those already familiar with RDBMS.
17. Document Stores
including MongoDB and Couchbase, are schema-free
systems that store data in the form of JSON documents.
Document stores are similar to key-value or wide column
stores, but the document name is the key and the contents of
the document, whatever they are, are the value.
In a document store, individual records do not require a
uniform structure, can contain many different value types, and
can be nested. This flexibility makes them particularly well-
suited to manage semi-structured data across distributed
systems.
18. Graph Databases
such as Neo4J and Datastax Enterprise Graph, represent
data as a network of related nodes or objects in order to
facilitate data visualizations and graph analytics.
A node or object in a graph database contains free-form data
that is connected by relationships and grouped according to
labels. Graph-Oriented Database Management Systems
(DBMS) software is designed with an emphasis on illustrating
connections between data points.
As a result, graph databases are typically used when analysis
of the relationships between heterogeneous data points is the
end goal of the system, such as in fraud prevention,
advanced enterprise operations, or Facebooks original
friends graph.
19. Search engines
such as Elasticsearch, Splunk, and Solr, store data using schema-free JSON documents. They are similar to document stores, but with
a greater emphasis on making your unstructured or semi-structured data easily accessible via text-based searches with strings of
varying complexity.
20. MongoDB
MongoDB uses JSON-like documents with schemata. MongoDB is developed by MongoDB Inc., and is published under a combination
of the Server Side Public License and the Apache License.
Read more