{"id":25239357,"url":"https://github.com/gokulgowthams/zomato_data_insights","last_synced_at":"2026-05-06T11:36:43.405Z","repository":{"id":272583368,"uuid":"917083997","full_name":"GokulGowthamS/Zomato_Data_Insights","owner":"GokulGowthamS","description":"An interactive interface for performing CRUD operations (Create, Read, Update, Delete) on a MySQL database related to Zomato data.","archived":false,"fork":false,"pushed_at":"2025-01-20T11:38:21.000Z","size":49,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T08:43:56.544Z","etag":null,"topics":["data-analytics","data-engineering","object-oriented-programming","python","relational-databases","sql","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GokulGowthamS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-01-15T10:21:57.000Z","updated_at":"2025-04-22T06:57:21.000Z","dependencies_parsed_at":"2025-06-03T06:05:18.815Z","dependency_job_id":null,"html_url":"https://github.com/GokulGowthamS/Zomato_Data_Insights","commit_stats":null,"previous_names":["gokulgowthams/zomato_data_insights"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GokulGowthamS/Zomato_Data_Insights","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GokulGowthamS%2FZomato_Data_Insights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GokulGowthamS%2FZomato_Data_Insights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GokulGowthamS%2FZomato_Data_Insights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GokulGowthamS%2FZomato_Data_Insights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GokulGowthamS","download_url":"https://codeload.github.com/GokulGowthamS/Zomato_Data_Insights/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GokulGowthamS%2FZomato_Data_Insights/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32692369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["data-analytics","data-engineering","object-oriented-programming","python","relational-databases","sql","streamlit"],"created_at":"2025-02-11T18:27:34.964Z","updated_at":"2026-05-06T11:36:43.399Z","avatar_url":"https://github.com/GokulGowthamS.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Overview  \n\nThe Zomato Data Insights Application provides an interactive interface for performing CRUD operations (Create, Read, Update, Delete) on a MySQL database related to Zomato data.The application uses Streamlit for the web interface, and the core functionality is handled through a **DatabaseManager** class for database interactions and a **CRUDOperations** class for handling SQL operations.The main objective of this project is to provide an easy-to-use platform for database manipulation, allowing users to interact with the Zomato data efficiently and effectively.\n\n# Pages  \n\nThis Folder contains files used for the front end of the Streamlit application.   \n\n- CRUD.py  \n- Query.py  \n- Table.py  \n\n### CRUD.py  \nThis Python file is used for CRUD operations for the application by connecting to the MYSQL Database.   \n\n**Create**: Add new records to a table.  \n**Read**: Retrieve and display records with optional filters.  \n**Update**: Modify records based on conditions.  \n**Delete**: Remove records using specified criteria.  \n**Alter**: Add, modify, or drop table columns.  \n**Insert**: Insert records into existing tables.  \n\n- The database connection is managed via **DatabaseManager**, and **CRUDOperations** handles the operations.  \n- Errors are caught and displayed to ensure usability.  \n- It includes an option to close the database connection and exit the app.\n\n### Query.py  \nThis Python file has all 20 queries structured to show the result data by connecting to a MySQL database and provides a dropdown menu to execute predefined SQL queries.  \n\n**Database Connection**: Connects to new_tab database using MySQL.  \n**Query Selection**: Users choose from 21 queries, each targeting specific insights (e.g., peak ordering locations, customer segmentation, average delivery time).  \n**Query Execution**: The selected query is executed using cursor.execute(), and results are fetched using Pandas for display in a DataFrame.  \n**Interactive UI**: Displays query results in an interactive table within the app.  \n\nEach query is mapped to an operation, focusing on customer trends, delivery metrics, and order patterns.  \n\n### Table.py  \n\nThis Python file allows users to view datasets interactively by selecting from predefined table options.  \n\n**Title**: Displays the title \"Table View.\"  \n**Table Selection**: Users can choose between \"Customers,\" \"Restaurants,\" \"Orders,\" and \"Deliveries.\"  \n**Data Display**: The corresponding CSV file is loaded and displayed in a scrollable, interactive table format based on the selection.  \n\nEach table corresponds to a dataset stored locally, providing a convenient way to explore Zomato data insights.  \n\n# Scripts  \n\nThis Folder has all the data that is used for Database connectivity and Data Generation.  \n\n### Data Sets.py  \n\n- This Python script generates synthetic data for a Zomato-like business scenario using the Faker library and randomization.  \n- It creates datasets for **customers**, **restaurants**, **orders**, and **deliveries**, with each dataset containing 10 records.  \n- The generated data includes attributes like customer details, restaurant information, order specifics, and delivery details.  \n- Finally, the script saves each dataset into separate CSV files for further use.  \n\n### SQLconnection.py  \n\n- This Python script connects to a MySQL database and creates tables for managing a business dataset, including __Customers__, __Restaurants__, __Orders__, and __Deliveries__.  \n- It defines the schema for each table and sets up relationships through foreign keys.  \n- The script reads data from respective CSV files, processes them, and inserts the data into the created tables using SQL **INSERT** statements.  \n- After completing the data insertion, it closes all database connections.   \n- Finally, it prints confirmation messages for the successful creation of tables and data insertion.  \n\n# class_CRUD.py  \n\n- The **CRUDOperations** class provides a structured approach to managing database operations.  \n- It leverages a db_manager object to execute queries and includes methods for the following operations,\n\n          Create: Inserts a new record into a specified table using key-value pairs for column names and values.\n          Insert: Similar to the create method, it adds records to a table with specified data.\n          Alter: Modifies a table by adding, modifying, or dropping columns based on the operation type.\n          Read: Retrieves data from a specified table with optional filtering conditions.\n          Update: Updates records in a table based on specified data and conditions.\n          Delete: Removes records from a table based on given conditions.\n  \n- Each method handles exceptions and provides feedback on success or failure.\n\n# class_DataManager.py  \n\n- The **DatabaseManager** class manages MySQL database connections and queries. It includes methods for,  \n\n          Connection: Establishes a connection to the database, retrying a specified number of times in case of failure.\n          fetch_tables: Retrieves a list of all tables in the connected database.\n          fetch_columns: Fetches the columns of a specified table.\n          execute_query: Executes a SQL query with optional parameters, committing changes to the database.\n          fetch_data: Retrieves data from the database based on a query.\n          fetch_data_as_dataframe: Fetches data as a pandas DataFrame.\n          close_connection: Closes the cursor and database connection.\n          Context Manager: Implements context management methods (__enter__ and __exit__) for automatic connection handling.\n  \n- Each method handles exceptions and ensures proper connection management.\n\n# main.py  \n\nThis python file just provides the front page of the whole application.\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokulgowthams%2Fzomato_data_insights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgokulgowthams%2Fzomato_data_insights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgokulgowthams%2Fzomato_data_insights/lists"}