{"id":20671702,"url":"https://github.com/davidchocholaty/libbitcoin-sqlite-task","last_synced_at":"2026-04-22T19:31:25.284Z","repository":{"id":235826192,"uuid":"789149680","full_name":"davidchocholaty/libbitcoin-sqlite-task","owner":"davidchocholaty","description":"This repository contains a small SQLite program in C++ for the stretch goal (libbitcoin organization, Summer of Bitcoin programme).","archived":false,"fork":false,"pushed_at":"2024-04-24T13:13:59.000Z","size":172,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T13:48:58.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/davidchocholaty.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-19T19:54:39.000Z","updated_at":"2024-04-24T13:18:17.000Z","dependencies_parsed_at":"2024-04-24T17:44:33.484Z","dependency_job_id":null,"html_url":"https://github.com/davidchocholaty/libbitcoin-sqlite-task","commit_stats":null,"previous_names":["davidchocholaty/libbitcoin-sqlite-task"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidchocholaty%2Flibbitcoin-sqlite-task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidchocholaty%2Flibbitcoin-sqlite-task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidchocholaty%2Flibbitcoin-sqlite-task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidchocholaty%2Flibbitcoin-sqlite-task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidchocholaty","download_url":"https://codeload.github.com/davidchocholaty/libbitcoin-sqlite-task/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242890841,"owners_count":20202236,"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":[],"created_at":"2024-11-16T20:29:01.874Z","updated_at":"2026-04-22T19:31:25.228Z","avatar_url":"https://github.com/davidchocholaty.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libbitcoin-sqlite-task\nThis repository contains a small SQLite program in C++ for the stretch goal (libbitcoin organization, Summer of Bitcoin programme) created in 2024.\n\n## Build and run\nFor the successful compilation, the ```Boost``` and ```SQLite3``` libraries are required. Then run the following commands:\n\nCreate the build directory:\n\n```\nmkdir build; cd build\n```\n\nRun cmake for configuration:\n\n```\ncmake ..\n```\n\nCompile with make by using:\n\n```\nmake\n```\n\nRun the application with:\n```\n./app\n```\n\n## Table scheme\nFor the small database table scheme, the example from the official website of the [Visual Paradigm](https://www.visual-paradigm.com/features/database-design-with-erd-tools/) program was chosen. The *Staff* table structure is as follows:\n\n![table_scheme.png](doc/table_scheme.png)\n\nThe examples of the table records are taken from the same source.\n\n## Program description\n\nThe program (created in the [main.cpp](main.cpp) source file) creates a new database in the ```dbschema.db``` file. After that, the *Staff* table is created and the example persons are inserted from the [file](people.csv) (as in the [table scheme](#table-scheme)). Then the following queries are proceed (in the same order):\n\n- Select and print people with a salary greater or equal to 3500.\n- Insert a new person. This person has the same last name as at least one person who already is stored in the table.\n- Print all persons from the table which has the last name mentioned in the previous point (LastName = Sloan).\n- Update the phone number for the person with a specific identifier (ID = 1).\n\nLastly, the table is dropped from the database and the whole database (the ```dbschema.db``` file) is deleted because of the only example purposes.\n\n## Program output\nIn order to simply view the example the program output is saved in [text file](program_output.txt) created by:\n\n```\n./app \u003e program_output.txt\n```\n\n## Code style\nBecause the used SQLite library functions is a C library and the original [libbitcoin database](https://github.com/libbitcoin/libbitcoin-database) is written in more a C style code too, I have decided to used this approach instead of using the [C++ style guide](https://google.github.io/styleguide/cppguide.html).\n\nSince this is only an example application, some values are \"hard-coded\" in the program.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidchocholaty%2Flibbitcoin-sqlite-task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidchocholaty%2Flibbitcoin-sqlite-task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidchocholaty%2Flibbitcoin-sqlite-task/lists"}