Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hardikvasa/database-journal

Databases: Concepts, commands, codes, interview questions and more...
https://github.com/hardikvasa/database-journal

activemq aws code-sample database document-database dynamodb elasticsearch graph-database interview-questions kafka kinesis ledger mongodb mysql neo4j nosql-database postgresql redis-cache relational-database sqs-queue

Last synced: 10 days ago
JSON representation

Databases: Concepts, commands, codes, interview questions and more...

Awesome Lists containing this project

README

        

================
Database Journal
================

.. image:: images/types_of_dbs.png
:align: center
:width: 150pt

This repository is a collection of all-things database. It includes some fundamental concepts of databases, code samples, interview questions and more.

Index:

* `Database commands `__
* `Code Samples `__
* `Selecting the right database `__
* `Interview Questions `__

Database commands
=================

+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+
| DBMS | Model | Description | Runtime | Link |
+===============+============+=======================================+=========+=====================================================================================================+
| MySQL | Relational | Mysql basic commands | Shell | `link `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+
| MongoDB | Document | MongoDB basic commands | Shell | `link `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+

Code Samples
============

This section contains sample codes for database operations. For python, there are several options like `mysql-connector`, `pymysql`, `MySQLdb`, `SqlAlchemy`, etc.

+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| DBMS | Model | Description | Runtime | Sample Code | Docs |
+===============+============+=======================================+=========+=====================================================================================================+=========================================================================================================+
| MySQL | Relational | Python mysql connector code sample | Python | `link `__ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| MySQL | Relational | PyMySQL code sample | Python | `link `__ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| PostgreSQL | Relational | PostgreSQL using psycopg2 code sample | Python | `link `__ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| MongoDB | Document | MongoDB NoSQL database code sample | Python | `link `__ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| SQS | Queue | AWS Simple Queue Service operations | Python | `link `__ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| ActiveMQ | Queue | MQ Producer and MQ Consumer | Python | `link `_, `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| ActiveMQ | Queue | MQ Producer and MQ Consumer | Java | `link `_, `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| OracleDB | Relational | OracleDB sample code | Python | `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| Kinesis | Stream | AWS Kinesis stream sample code. | Python | `link `_, `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| Redis | In-memory | Redis code sample in python. | Python | `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| Neo4j | Graph | Graph database using neo4j-driver | Python | `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| DynamoDB | Document | DynamoDB basic operations | Python | `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| ElasticSearch | Search | ElasticSearch basic operations | Python | `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| AWS Neptune | Graph | Connecting to AWS Neptune with Gremlin| Python | `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| Cassandra | Wide-column| Cassandra basic operations | Python | `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+
| Amazon Aurora | MySQL | Basic Operations for Aurora DB | Python | `link `_ | `docs `__ |
+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+

DBMS comparison chart
=====================

This section some characteristics and comparison points between different database technologies.

+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+
| Property | Relational DB | NoSQL DB | Document DB | In-memory DB | Graph DB | Search DB | Time-series DB | Ledger DB | Queues | Streams |
+=================+====================+=====================+=====================+==================+===============+=================+====================+================+===================+===========================+
| Type | Relational | Non-Relational | Non-Relational | Non-Relational | Relational | Non-Relational | Relational | Non-Relational | Non-Relational | Non-Relational |
+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+
| Data | Structured | Un-structured | Un-structured | Un-structured | Un-structured | Semi-structured | Structured | Chain | Un-structured | Un-structured |
+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+
| Data format | Records, tuples | JSON | JSON | JSON | N/A | JSON | JSON | JSON | Objects | Objects |
+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+
| Scalability | Vertical | Horizontal | Horizontal | Horizontal | Horizontal | Horizontal | Horizontal | Horizontal | Horizontal | Horizontal |
+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+
| Record type | Flat | Hierarchical | Hierarchical | Hierarchical | Hierarchical | Hierarchical | Flat, Hierarchical | Hierarchical | Objects | Objects |
+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+
| Applications | CRM, Finance | Shopping cart | Content Management | Leaderboards | Social media | Product catalog | IoT applications | Cryptocurrency | Queuing tasks | Weather data |
+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+
| Complex queries | Yes | No | No | No | No | No | No | No | N/A | N/A |
+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+
| Property | ACID | CAP theorem | CAP theorem | CAP theorem | CAP theorem | CAP theorem | ACID | N/A | N/A | N/A |
+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+
| Engine(s) | MySQL, PostgresSQL | Cassandra, DynamoDB | MongoDB, DocumentDB | Redis, Memcached | Neo4j | Elasticsearch | InfluxDB | AWS QLDB | ActiveMQ, AWS SQS | Apache Kafka, AWS Kinesis |
+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+

Contributing
============

Anyone is welcomed to contribute to this repository. If you would like to make a change, open a pull request.
For issues and discussion visit the `Issue Tracker `__. Additional articles and workshops can be found on `website `__.

Disclaimer
==========

The contents of this repository is merely for educational purpose. The content may not be accurate or up-to-date.