{"id":20393493,"url":"https://github.com/alexandroskyriakakis/database","last_synced_at":"2025-04-12T12:05:53.080Z","repository":{"id":37642005,"uuid":"263430483","full_name":"AlexandrosKyriakakis/DataBase","owner":"AlexandrosKyriakakis","description":"A Market analytics website created from scratch.","archived":false,"fork":false,"pushed_at":"2023-07-02T16:21:58.000Z","size":22798,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-04T19:50:51.247Z","etag":null,"topics":["bootstrap","database","ece-ntua","flask","javascript","market-basket-analysis","mysql","mysql-connector","python","sql","web-development","website"],"latest_commit_sha":null,"homepage":"https://damp-thicket-93938.herokuapp.com/","language":"JavaScript","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/AlexandrosKyriakakis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://revolut.me/kyriakakisalex"]}},"created_at":"2020-05-12T19:19:36.000Z","updated_at":"2023-08-27T20:11:18.000Z","dependencies_parsed_at":"2025-04-12T12:04:24.628Z","dependency_job_id":null,"html_url":"https://github.com/AlexandrosKyriakakis/DataBase","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/AlexandrosKyriakakis%2FDataBase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandrosKyriakakis%2FDataBase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandrosKyriakakis%2FDataBase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexandrosKyriakakis%2FDataBase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexandrosKyriakakis","download_url":"https://codeload.github.com/AlexandrosKyriakakis/DataBase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565064,"owners_count":21125415,"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":["bootstrap","database","ece-ntua","flask","javascript","market-basket-analysis","mysql","mysql-connector","python","sql","web-development","website"],"created_at":"2024-11-15T03:49:04.540Z","updated_at":"2025-04-12T12:05:53.069Z","avatar_url":"https://github.com/AlexandrosKyriakakis.png","language":"JavaScript","funding_links":["https://revolut.me/kyriakakisalex"],"categories":[],"sub_categories":[],"readme":"# Database Project\n\n\n![Python](https://img.shields.io/badge/python-v3.6+-blue.svg)\n[![Build Status](https://img.shields.io/badge/mysql-v8.0.19+-red.svg)](https://img.shields.io/badge/mysql_connector-v2.2.9-blue.svg)\n![Dependencies](https://img.shields.io/badge/flask-v1.1.2-blue)\n[![GitHub Issues](https://img.shields.io/badge/numpy-v1.17.4-green.svg)](https://img.shields.io/badge/pandas-v0.25.3-yellow.svg)\n![mysql_connector](https://img.shields.io/badge/mysql_connector-v2.2.9-blue.svg)\n[![pandas](https://img.shields.io/badge/pandas-v0.25.3-yellow.svg)](https://opensource.org/licenses/MIT)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n## Overview\n\n[Serious Company](https://damp-thicket-93938.herokuapp.com/) is a website built from scratch for an academic project on lesson NTUA-DATABASES at Nation Technical University of Athens. The website contains random data simulating market database.\n\n## [Requirements](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/requirements.txt)\n\n- mysql 8.0.19\n- flask 1.1.2\n- mysql_connector 2.2.9\n- numpy 1.17.4\n- pandas 0.25.3\n\n## ER-Diagram\n\n![](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/img/er-diagram.png?raw=true)\n\n## Relational Model\n\n![](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/img/relationalModel.png?raw=true)\n\n## Installation\n\n1. At first, initialize a mysql database at either a [localhost](https://dev.mysql.com/doc/mysql-getting-started/en/) or a [server](https://aws.amazon.com/rds/)\n2. Then, run the folowing command in terminal, using your credentials in order to connect in mysql host:\n\n```bash\n\t $ mysql -h \"server-name\" -u \"your_username\" -p \"your_password\"\n```\n\n### Run the following inside mysql command prompt, strictly at this order,\n\n3. [AlexJohnChris.sql](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/sql/AlexJohnChris.sql) to create the database.\n4. [indexes.sql](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/sql/Indexes/indexes.sql) to create the indexes.\n5. [view1.sql](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/sql/views/view1.sql) and [view2.sql](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/sql/views/view2.sql) to create the views.\n6. [past_price_trigger.sql](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/sql/trigers/past_price_trigger.sql) to create the trigger for auto-update past prices.\n7. [addStores.sql](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/sql/addStores/addStores.sql) to add all the stores.\n\n### Back in the terminal\n\n8. Run,\n\n```bash\n\t$ git clone https://github.com/AlexandrosKyriakakis/DataBase.git\n\t$ cd DataBase\n\t$ git clone https://github.com/AlexandrosKyriakakis/MarketDataset.git\n```\n\n9. Add your database credentials at the top '\\*\\*\\*\\*' of each of the following files,\n   - [addCustomersAndPhone.py](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/addData/addCustomersAndPhone.py)\n   - [addProductsPastPricesHas.py](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/addData/addProductsPastPricesHas.py)\n   - [addTransactionsBought.py](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/addData/addTransactionsBought.py)\n   - [server_guest.py](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/server_guest.py)\n10. Run the following strictly at this order,\n\n```bash\n\t$ pip3 install -r requirements.txt\n\t$ python3 ./addData/addCustomersAndPhone.py\n\t$ python3 ./addData/addProductsPastPricesHas.py\n\t$ python3 ./addData/addTransactionsBought.py\n```\n\n11. Now, that the database is full with random generated data, start the back-end server to finish the installation,\n\n```bash\n\t$ python3 server_guest.py\n```\n\n12. Open your favorite browser and type \u003chttp://localhost:8587/\u003e to preview the website.\n\n## Sql Queries\n\nQueries to construct database,\n\n- [AlexJohnChris](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql)\n- [Indexes](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql/Indexes)\n- [Trigers](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql/trigers)\n- [Add Stores](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql/addStores)\n\nHere we show all the [queries](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql) used in the site at each page,\n\n- [SearchPerCondition](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql/SearchPerCondition) for page [/search](https://damp-thicket-93938.herokuapp.com/search)\n- [CustomerData](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql/CustomerData) for pages [/customers_visit_data](https://damp-thicket-93938.herokuapp.com/customers_visit_data) and [/customers](https://damp-thicket-93938.herokuapp.com/customers)\n- [ProductData](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql/ProductData) for pages at [Product Data](https://damp-thicket-93938.herokuapp.com)\n- [Views](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql/views) for pages [/customer_info](https://damp-thicket-93938.herokuapp.com/customer_info) and [/sales_category_store](https://damp-thicket-93938.herokuapp.com/sales_category_store)\n- [EditData](https://github.com/AlexandrosKyriakakis/DataBase/tree/master/sql/EditData) for pages at [Edit Data](https://damp-thicket-93938.herokuapp.com)\n\n## Authors\n\n- [Alexandros Kyriakakis](https://github.com/AlexandrosKyriakakis)\n- [Ioannis Alexopoulos](https://github.com/galexo)\n## YouTube\nExplaining in Greek language how to use our Site.\u003cbr /\u003e\n\u003chttps://www.youtube.com/watch?v=YaeIKbiKvYA\u0026feature=youtu.be\u003e\n\n## Licence\n\nThis project uses [MIT license](https://github.com/AlexandrosKyriakakis/DataBase/blob/master/LICENCE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandroskyriakakis%2Fdatabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandroskyriakakis%2Fdatabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandroskyriakakis%2Fdatabase/lists"}