SQL - bobbae/gcp GitHub Wiki

Structured Query Language (SQL) is the standard language for data manipulation in a database. Structured Query Language is a domain-specific language used in programming and designed for managing data held in a relational database management system .

Data Definition Language

Data Definition Language (DDL) allows you to create objects like Schemas, Tables in the database.

Data Control Language

Data Control Language (DCL) allows you to manipulate and manage access rights on database objects.

Data Manipulation Language

Data Manipulation Language (DML) is used for searching, inserting, updating, and deleting data.

Quickstart using Cloud SQL

https://cloud.google.com/sql/docs/mysql/quickstart

Relational Databases

A relational database is a digital database based on the relational model of data, as proposed by E. F. Codd in 1970. A software system used to maintain relational databases is a relational database management system (RDBMS). Many relational database systems have an option of using the SQL for querying and maintaining the database.

CloudSQL

CloudSQL is a fully managed service that makes it easy to set up, manage, and administer relational databases: PostgreSQL, MySQL, and SQL Server.

BigQuery

BigQuery is Google Cloud's fully managed, petabyte-scale, and analytics data warehouse that lets you run analytics over vast amounts of data in near real time.

Spanner

Cloud Spanner is a managed relational database with unlimited scale, strong consistency, and up to 99.999% availability.

Similar to SQL

Incomplete SQL compatible implementations.

SQL on Hadoop

Apache Hive, Sqoop, Impala, Drill, Phoenix, Spark SQL. Presto, CitusData, Jethro, HAWQ, Big SQL, PolyBase,

https://www.xplenty.com/blog/12-sql-on-hadoop-tools/

KQL

https://squaredup.com/blog/kusto-101-a-jumpstart-guide-to-kql/

CQL

https://cassandra.apache.org/doc/latest/cassandra/cql/

HiveQL

https://www.tutorialspoint.com/hive/hiveql_select_where.htm

Spark SQL

https://spark.apache.org/sql/

Apache Drill

https://drill.apache.org/

Presto

https://prestodb.io/

Apache Impala

https://impala.apache.org/

Apache Phoenix

https://phoenix.apache.org/

Apache Kudu

https://kudu.apache.org/

Apache Hue

https://github.com/cloudera/hue

SQL Alternatives

https://en.wikipedia.org/wiki/SQL#Alternatives

NewSQL

NewSQL databases retained all the aspects of the relational model, the predefined schema and the use of SQL, and sought to solve the problem of scale either in-memory or clever distributed architecture. In the latter case it may be referred to as Distributed SQL.

Distributed SQL

Distributed SQL is a single logical database deployed across multiple physical nodes in a single data center or across many data centers to deliver elastic scale and resilience.

https://www.cockroachlabs.com/blog/what-is-distributed-sql/

NoSQL

NoSQL databases are non tabular, and store data differently than relational tables. NoSQL databases come in a variety of types based on their data model and provide flexible schemas and scale easily with large amounts of data and high user loads.

Types of NoSQL databases

Document database

Document oriented databases store data in documents similar to JSON (JavaScript Object Notation) objects. Each document contains pairs of fields and values. The values can typically be a variety of types including things like strings, numbers, booleans, arrays, or objects. Examples: MongoDB, Datastore, Firestore, Couchbase, Elasticsearch.

Key value database

Key-value databases are a simpler type of database where each item contains keys and values. A value can typically only be retrieved by referencing its key, so learning how to query for a specific key-value pair is typically simple. Key-value databases are great for use cases where you need to store large amounts of data. Examples: Redis, LMDB, LevelDB, Riak

Wide column database

Wide-column stores store data in tables, rows, and dynamic columns. Wide-column stores provide a lot of flexibility over relational databases because each row is not required to have the same columns. Many consider wide-column stores to be two-dimensional key-value databases. Wide-column stores are great for when you need to store large amounts of data and you can predict what your query patterns will be. Examples: Cassandra, Bigtable, HBase, DynamoDB

Graph database

Graph databases store data in nodes and edges. Nodes typically store information about people, places, and things while edges store information about the relationships between the nodes. Graph databases excel in use cases where you need to traverse relationships to look for patterns such as social networks, fraud detection, and recommendation engines. Examples are Neo4j, AWS Neptune, JanusGraph and AllegroGraph.

Neo4j Aura on Google cloud

https://neo4j.com/cloud/aura-google-cloud/

GraphQL

GraphQL is a query language for APIs and a runtime for fulfilling the queries with your existing data.

SQL Related tools

Sqlcommenter

https://cloud.google.com/blog/topics/developers-practitioners/introducing-sqlcommenter-open-source-orm-auto-instrumentation-library

SQL and Dataframe

https://towardsdatascience.com/sql-jinja-is-not-enough-why-we-need-dataframes-4d71a191936d

Cloud SQL Insights

https://cloud.google.com/blog/products/databases/get-ahead-of-database-performance-issues-with-cloud-sql-insights

SQL Commenter

https://cloud.google.com/blog/topics/developers-practitioners/introducing-sqlcommenter-open-source-orm-auto-instrumentation-library

New Relic

https://docs.newrelic.com/docs/integrations/google-cloud-platform-integrations/gcp-integrations-list/google-cloud-sql-monitoring-integration/

SQL Tutorials

SQL Examples

https://sqlzoo.net/

Qwiklabs

https://www.qwiklabs.com/quests/52/