{"id":13405616,"url":"https://github.com/hardikvasa/database-journal","last_synced_at":"2025-03-22T06:31:21.852Z","repository":{"id":42507736,"uuid":"189817860","full_name":"hardikvasa/database-journal","owner":"hardikvasa","description":"Databases: Concepts, commands, codes, interview questions and more...","archived":false,"fork":false,"pushed_at":"2022-04-02T07:37:57.000Z","size":334,"stargazers_count":55,"open_issues_count":1,"forks_count":20,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-01T13:41:59.682Z","etag":null,"topics":["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"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hardikvasa.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-02T07:36:43.000Z","updated_at":"2024-08-23T02:58:52.000Z","dependencies_parsed_at":"2022-08-26T08:51:05.147Z","dependency_job_id":null,"html_url":"https://github.com/hardikvasa/database-journal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardikvasa%2Fdatabase-journal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardikvasa%2Fdatabase-journal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardikvasa%2Fdatabase-journal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardikvasa%2Fdatabase-journal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardikvasa","download_url":"https://codeload.github.com/hardikvasa/database-journal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244189792,"owners_count":20412991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2024-07-30T19:02:06.670Z","updated_at":"2025-03-22T06:31:20.064Z","avatar_url":"https://github.com/hardikvasa.png","language":"Python","readme":"================\nDatabase Journal\n================\n\n.. image:: images/types_of_dbs.png\n   :align: center\n   :width: 150pt\n\nThis repository is a collection of all-things database. It includes some fundamental concepts of databases, code samples, interview questions and more.\n\n\nIndex:\n\n* `Database commands \u003chttps://github.com/hardikvasa/database-journal#database-commands\u003e`__ \n* `Code Samples \u003chttps://github.com/hardikvasa/database-journal#code-samples\u003e`__ \n* `Selecting the right database \u003chttps://github.com/hardikvasa/database-journal#dbms-comparison-chart\u003e`__ \n* `Interview Questions \u003cinterview-questions/README.rst\u003e`__ \n\n\nDatabase commands\n=================\n\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+\n| DBMS          | Model      | Description                           | Runtime | Link                                                                                                | \n+===============+============+=======================================+=========+=====================================================================================================+\n| MySQL         | Relational | Mysql basic commands                  | Shell   | `link \u003cdatabase-commands/mysql_commands.rst\u003e`__                                                     |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+\n| MongoDB       | Document   | MongoDB basic commands                | Shell   | `link \u003cdatabase-commands/mongodb.rst\u003e`__                                                            |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+\n\n\nCode Samples\n============\n\nThis section contains sample codes for database operations. For python, there are several options like `mysql-connector`, `pymysql`, `MySQLdb`, `SqlAlchemy`, etc.\n\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| DBMS          | Model      | Description                           | Runtime | Sample Code                                                                                         | Docs                                                                                                    |\n+===============+============+=======================================+=========+=====================================================================================================+=========================================================================================================+\n| MySQL         | Relational | Python mysql connector code sample    | Python  | `link \u003ccode-samples/mysql_connector_sample.py\u003e`__                                                   | `docs \u003chttps://dev.mysql.com/doc/\u003e`__                                                                   |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| MySQL         | Relational | PyMySQL code sample                   | Python  | `link \u003ccode-samples/pymysql_sample.py\u003e`__                                                           | `docs \u003chttps://dev.mysql.com/doc/\u003e`__                                                                   |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| PostgreSQL    | Relational | PostgreSQL using psycopg2 code sample | Python  | `link \u003ccode-samples/postgresql.py\u003e`__                                                               | `docs \u003chttps://www.postgresql.org/docs/\u003e`__                                                             |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| MongoDB       | Document   | MongoDB NoSQL database code sample    | Python  | `link \u003ccode-samples/mongo.py\u003e`__                                                                    | `docs \u003chttps://docs.mongodb.com/\u003e`__                                                                    |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| SQS           | Queue      | AWS Simple Queue Service operations   | Python  | `link \u003ccode-samples/sqs.py\u003e`__                                                                      | `docs \u003chttps://docs.aws.amazon.com/sqs/index.html\u003e`__                                                   |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| ActiveMQ      | Queue      | MQ Producer and MQ Consumer           | Python  | `link \u003ccode-samples/mq_producer.py\u003e`_, `link \u003ccode-samples/mq_consumer.py\u003e`_                        | `docs \u003chttps://activemq.apache.org/getting-started.html\u003e`__                                             |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| ActiveMQ      | Queue      | MQ Producer and MQ Consumer           | Java    | `link \u003ccode-samples/MQProducer.java\u003e`_, `link \u003ccode-samples/MQConsumer.java\u003e`_                      | `docs \u003chttps://activemq.apache.org/getting-started.html\u003e`__                                             |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| OracleDB      | Relational | OracleDB sample code                  | Python  | `link \u003ccode-samples/oracledb.py\u003e`_                                                                  | `docs \u003chttps://cx-oracle.readthedocs.io/en/latest/index.html\u003e`__                                        |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| Kinesis       | Stream     | AWS Kinesis stream sample code.       | Python  | `link \u003ccode-samples/kinesis_producer.py\u003e`_, `link \u003ccode-samples/kinesis_consumer.py\u003e`_              | `docs \u003chttps://docs.aws.amazon.com/streams/latest/dev/introduction.html\u003e`__                             |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| Redis         | In-memory  | Redis code sample in python.          | Python  | `link \u003ccode-samples/redis_python.py\u003e`_                                                              | `docs \u003chttps://redis.io/documentation\u003e`__                                                               |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| Neo4j         | Graph      | Graph database using neo4j-driver     | Python  | `link \u003ccode-samples/neo4j_sample.py\u003e`_                                                              | `docs \u003chttps://neo4j.com/docs/\u003e`__                                                                      |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| DynamoDB      | Document   | DynamoDB basic operations             | Python  | `link \u003ccode-samples/dynamodb.py\u003e`_                                                                  | `docs \u003chttps://docs.aws.amazon.com/dynamodb/index.html\u003e`__                                              |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| ElasticSearch | Search     | ElasticSearch basic operations        | Python  | `link \u003ccode-samples/elasticsearch_sample.py\u003e`_                                                      | `docs \u003chttps://www.elastic.co/guide/index.html\u003e`__                                                      |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| AWS Neptune   | Graph      | Connecting to AWS Neptune with Gremlin| Python  | `link \u003ccode-samples/aws_neptune.py\u003e`_                                                               | `docs \u003chttp://tinkerpop.apache.org/docs/current/reference/\u003e`__                                          |\n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| Cassandra     | Wide-column| Cassandra basic operations            | Python  | `link \u003ccode-samples/cassandra_sample.py\u003e`_                                                          | `docs \u003chttp://cassandra.apache.org/doc/latest/\u003e`__                                                      |         \n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n| Amazon Aurora | MySQL      | Basic Operations for Aurora DB        | Python  | `link \u003ccode-samples/aurora.py\u003e`_                                                                    | `docs \u003chttps://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html\u003e`__        |         \n+---------------+------------+---------------------------------------+---------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+\n\n\n\nDBMS comparison chart\n=====================\n\nThis section some characteristics and comparison points between different database technologies.\n\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n| Property        | Relational DB      | NoSQL DB            | Document DB         | In-memory DB     | Graph DB      | Search DB       | Time-series DB     | Ledger DB      | Queues            | Streams                   |\n+=================+====================+=====================+=====================+==================+===============+=================+====================+================+===================+===========================+\n| Type            | Relational         | Non-Relational      | Non-Relational      | Non-Relational   | Relational    | Non-Relational  | Relational         | Non-Relational | Non-Relational    | Non-Relational            |\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n| Data            | Structured         | Un-structured       | Un-structured       | Un-structured    | Un-structured | Semi-structured | Structured         | Chain          | Un-structured     | Un-structured             |\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n| Data format     | Records, tuples    | JSON                | JSON                | JSON             | N/A           | JSON            | JSON               | JSON           | Objects           | Objects                   |\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n| Scalability     | Vertical           | Horizontal          | Horizontal          | Horizontal       | Horizontal    | Horizontal      | Horizontal         | Horizontal     | Horizontal        | Horizontal                |\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n| Record type     | Flat               | Hierarchical        | Hierarchical        | Hierarchical     | Hierarchical  | Hierarchical    | Flat, Hierarchical | Hierarchical   | Objects           | Objects                   |\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n| Applications    | CRM, Finance       | Shopping cart       | Content Management  | Leaderboards     | Social media  | Product catalog | IoT applications   | Cryptocurrency | Queuing tasks     | Weather data              |\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n| Complex queries | Yes                | No                  | No                  | No               | No            | No              | No                 | No             | N/A               | N/A                       |\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n| Property        | ACID               | CAP theorem         | CAP theorem         | CAP theorem      | CAP theorem   | CAP theorem     | ACID               | N/A            | N/A               | N/A                       |\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n| Engine(s)       | MySQL, PostgresSQL | Cassandra, DynamoDB | MongoDB, DocumentDB | Redis, Memcached | Neo4j         | Elasticsearch   | InfluxDB           | AWS QLDB       | ActiveMQ, AWS SQS | Apache Kafka, AWS Kinesis |\n+-----------------+--------------------+---------------------+---------------------+------------------+---------------+-----------------+--------------------+----------------+-------------------+---------------------------+\n\n\nContributing\n============\n\nAnyone is welcomed to contribute to this repository. If you would like to make a change, open a pull request.\nFor issues and discussion visit the `Issue Tracker \u003chttps://github.com/hardikvasa/database-journal/issues\u003e`__. Additional articles and workshops can be found on `website \u003chttps://cloudbru.com/\u003e`__.\n\nDisclaimer\n==========\n\nThe contents of this repository is merely for educational purpose. The content may not be accurate or up-to-date.  ","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardikvasa%2Fdatabase-journal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardikvasa%2Fdatabase-journal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardikvasa%2Fdatabase-journal/lists"}