{"id":21898235,"url":"https://github.com/asfer-dev/huda-db-project","last_synced_at":"2026-05-12T07:36:22.030Z","repository":{"id":241152187,"uuid":"804032540","full_name":"Asfer-dev/huda-db-project","owner":"Asfer-dev","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-22T18:35:20.000Z","size":4988,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T06:12:30.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Asfer-dev.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}},"created_at":"2024-05-21T20:31:14.000Z","updated_at":"2024-05-22T18:35:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9469b4f-bd40-4eec-93f0-87d0404ed02f","html_url":"https://github.com/Asfer-dev/huda-db-project","commit_stats":null,"previous_names":["asfer-dev/huda-db-project"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asfer-dev%2Fhuda-db-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asfer-dev%2Fhuda-db-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asfer-dev%2Fhuda-db-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asfer-dev%2Fhuda-db-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Asfer-dev","download_url":"https://codeload.github.com/Asfer-dev/huda-db-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244909128,"owners_count":20530175,"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-28T14:24:56.629Z","updated_at":"2026-05-12T07:36:21.958Z","avatar_url":"https://github.com/Asfer-dev.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/saurabhkishor"],"categories":[],"sub_categories":[],"readme":"\n\n\n\u003ch1 style=\"text-align: center\"\u003e      Ecommerce Database Management System       \u003c/h1\u003e\n\nAs a part of our University PTU Curriculum, I made this project for Database Management Systems (DBMS)\u003cbr\u003e\nThis project contains theoretical as well as implementation in backend-SQL and FrontEnd-ReactJs.\u003cbr\u003e\nIf you liked the repo do :star: it.  \n\n\u003cbr\u003e\n\n# *********************   FrontEnd   *************************\n\nFrontend implementation of an e-commerce platform built using React. It provides users with an intuitive interface to browse products, add them to the cart, and proceed to checkout. Leveraging React's component-based architecture, it offers a seamless user experience with dynamic updates and efficient state management.\n\n## Key Features\n- **Product Catalog:** Displaying a wide range of products with detailed information.\n- **User Authentication:** Secure authentication and registration functionalities.\n- **Shopping Cart:** Easy management of selected products before checkout.\n- **Checkout Process:** Streamlined process for payment and order placement.\n\nThis project aims to deliver a modern and responsive web application for e-commerce businesses, allowing for easy customization and scalability.\n\n\u003cbr\u003e\n\n### LoginPage\u003cbr\u003e\n![user Login](https://github.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/blob/main/FrontEnd/Asset/Login.png?raw=true)\n\n\n### Product Page\u003cbr\u003e\n![All Products](https://raw.githubusercontent.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/main/FrontEnd/Asset/Product.png)\n\n### User Dashboard Page\u003cbr\u003e\n![User Dashboard](https://raw.githubusercontent.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/main/FrontEnd/Asset/UserDashboard.png)\n\n### Admin Dashboard\u003cbr\u003e\n![Admin Dashboard-CRUD Operation](https://raw.githubusercontent.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/main/FrontEnd/Asset/AdminDashboard.png)\n\n### Cart Page\u003cbr\u003e\n![Add to cart](https://github.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/blob/main/FrontEnd/Asset/Cart.png)\n\n### Filter Page\u003cbr\u003e\n![Filter -Search functionality](https://github.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/blob/main/FrontEnd/Asset/filter.png)\n\n\u003cbr\u003e\n\n# *********************** BackEnd  **********************\n\n## Pre-requisite\nMariaDB  \n\n## Contents\n- Project Description\n- Basic structure\n  - Functional requirements\n  - Entity Relation (ER) diagram and constraints\n  - Relational database schema\n- Implementation\n  - Creating tables\n  - Inserting data\n  \n- Queries\n  - Basic queries\n  - PL/SQL function\n  - Trigger function\n  - Stored procedures \n  - Functions \n  - Transactions\n\n\n## 1. Project Description\nIn this new modern era of online shopping no seller wants to be left behind and every seller  want to the shift from offline selling model to an online selling model for a rampant growth.\u003cbr\u003e\nTherefore, as an software engineer our job is to ease the path of this transition for the seller.\nAmongst many things that an online site requires the most important is a database system. Hence in this project we are planning to design a database where small sellers can sell their product online.\n\n**The Prime Objective of our database project is to design a robust E-commerce database by performing operations such as**\n - Viewing orders \n - Placing orders \n  - Updating database \n  - Reviewing products\n  - Maintaining data consistency across tables \n\n\n### 2. REQUIREMENTS \n - A Customer can see the account details and can update if required. \n - Customer can search the products according to the category. \n - Customer can add his wishlist to the cart and can see the total amount. \n - Customer can update the cart whenever required.\n-  Customer can choose the mode of payment.\n-  Customer can keep track of the order by seeing order status.\n-  Customer can review the products which have been purchased. \n-  Seller can update the stock of a particular product whether it is available    or not. \n-  Seller can keep track of total sales of his products. \n-  Seller can know the sales on a particular day or month or year.  \n\n### 2.1 Functional Requirements\n- A Customer cannot access the Seller details and vice-versa. \n- There should not be any inconsistency in the data. \n- There should not be any loss of data. \n\n### 3.  Relational Database Schema - e commerce \n![Relational Schema_Diagram](https://github.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/blob/main/Relational_Schema-Screenshot.jpg)\nFor more clear view, click here\n[Relational Schema Pdf](https://github.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/blob/main/Relational%20Database%20Schema2.pdf)\n\n### 4. Entities and their Attributes\n\n| ENTITIES |  ATTRIBUTES                                                                       |    ATTRIBUTE TYPE                                                 |Entity Type|\n| ---------|:-------------:                                                                    |   -----:                                                          |-------    |\n| Customer |Customer_CustomerId\u003cbr\u003eName\u003cbr\u003eEmail\u003cbr\u003eDateOfBirth\u003cbr\u003ePhone\u003cbr\u003eAge                |Simple\u003cbr\u003eComposite\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eMultivalued\u003cbr\u003eDerived  | Strong    |\n| Order    |OrderId\u003cbr\u003eShippingDate\u003cbr\u003eOrderDate\u003cbr\u003eOrderAmount\u003cbr\u003eCart_CartID                 |Simple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple                     | Strong    |\n| OrderItem|Order_OrderId (PK)\u003cbr\u003eProduct_ProductId(FK)\u003cbr\u003eMRP\u003cbr\u003eQuantity                     |Simple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple                               |  Weak     | \n| Product  |productId (PK)\u003cbr\u003eProductName\u003cbr\u003esellerId\u003cbr\u003eMRP\u003cbr\u003eCategoryID\u003cbr\u003eStock\u003cbr\u003eBrand   |Simple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple |Strong     | \n| Review   |ReviewId(PK)\u003cbr\u003eDescription\u003cbr\u003eRatings\u003cbr\u003eProduct_ProductId\u003cbr\u003eCustomer_CustomerID |Simple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple                               |Strong     |\n| Cart     |cartId (PK)\u003cbr\u003eCustomer_customerId(FK)\u003cbr\u003eGrandTotal\u003cbr\u003eItemsTotal                 | Simple\u003cbr\u003eSimple\u003cbr\u003eDerived\u003cbr\u003eDerived                            |Strong     | \n| Category |CategoryID(PK)\u003cbr\u003eCategoryName\u003cbr\u003eDESCRIPTION                                      | Simple\u003cbr\u003eSimple\u003cbr\u003eSimple                                        |Strong     |\n| seller   |sellerId (PK)\u003cbr\u003eName\u003cbr\u003ePhone\u003cbr\u003eTotal_Sales                                      | Simple\u003cbr\u003eSimple\u003cbr\u003eMultivalued\u003cbr\u003eDerived                        |Strong     |\n| Payment     |payment_id\u003cbr\u003eOrder_OrderId\u003cbr\u003ePaymentMode\u003cbr\u003eCustomer_CustomerId\u003cbr\u003ePaymentDate   | Simple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple\u003cbr\u003eSimple                    |Strong     |\n\n### 5. Entities and Relations \n| ENTITIES |RELATION |   CARDINALITY                                          | TYPE OF PARTICIPATION|\n| ---------|:-------------:                                                                    |   -----:                                                          |-------    |\n|Customer\u003cBR\u003eAddress| Stays At| OneToOne |    Total\u003cBR\u003ePartial  |\n|Customer\u003cBR\u003eCart|Shops| OneToOne|Partial\u003cBR\u003eTotal  |\n|Customer\u003cbr\u003eOrder|Places| OneToMany| Partial\u003cBR\u003eTotal |\n|Customer \u003cBR\u003ePayment| Makes| OneToMany|Partial\u003cbr\u003eTotal |\n|Customer\u003cBR\u003eReview| Write| OneToMany|Partial\u003cbr\u003eTotal  |\n|Seller\u003cbr\u003eProduct| Sells|ManyToMany| Partial\u003cbr\u003eTotal |\n|Category\u003cbr\u003eProduct|Categorizes|OneToMany|Partial\u003cbr\u003eTotal  |\n|Cart\u003cbr\u003eProduct|Contains|ManyToMany| Partial\u003cbr\u003ePartial |\n|Product\u003cbr\u003eOrderltem| Includes|OneToMany|Partial\u003cbr\u003eTotal|\n|Order\u003cbr\u003eOrderltem| Includes|OneToOne|Partial\u003cbr\u003eTotal|\n|Payment\u003cbr\u003eOrder| For|OneToOne|Total\u003cbr\u003eTotal|\n\n\n### 6. ER-Diagram\u003cbr\u003e\n![ER-Diagram img](https://github.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/blob/main/ER-diagram.jpg)\nfor more clear view, click here\n[ER Diagram pdf](https://github.com/Saurabh-pec/Ecommerce-Management-DBMS_Project-/blob/main/ECommerce.pdf)\n\n### 7. QUERIES ON THE ABOVE RELATIONAL SCHEMA\n **1.** Stored procedure for the details of the customer.\u003cbr\u003e\n **2.** View for getting sales by category of products.\u003cbr\u003e\n **3.** Using triggers to update the no.of products as soon as the payment is made.\u003cbr\u003e\n **4.** Trigger to update the total amount of user everytime he adds something to payment table.\u003cbr\u003e\n **5.** Stored procedure for getting order history.\u003cbr\u003e\n **6.** Processing an order\n   -  To process an order, one should check whether those items are in stock.\n   -  If items are in stock, they need to be reserved so that they go in hands of those who have expressed them in wishlist/order.\n   - Once ordered the available quantity must be reduced to reflect the correct value in the stock. \n   - Any items not in stock cannot be sanctioned; this requires confirmation from the seller. \n   - The customer needs to be informed as to which items are in stock (and can be shipped immediately) and which are cancelled.\n\n**7.** Check whether the specified customer exists \n  - IF NOT EXISTS add him/her\n  - COMMIT  the info\n  - Fetch the customer id\n  - INSERT a row to Order tables\n  - If unable to do so,ROLLBACK;\n  - Fetch the new orderid in orders table\n  - INSERT row to the order table for every product ordered\n  - If adding tuples to orderitems fails ROLL BACK all tuples of products  added for and the tuple in order row\n\n**QUERY 1:** Customers to find products with highest ratings for a given category.\u003cbr\u003e\n**QUERY 2:** Customers to filter out the products according to their brand and price.\u003cbr\u003e\n**QUERY 3:** If a customer want to know the total price for all product present in the cart.\u003cbr\u003e\n**QUERY 4:** Customers to find the best seller of a particular product.\u003cbr\u003e\n\n**QUERY 5:** List the orders which are to be delivered at a particular pincode.\u003cbr\u003e\n\n**QUERY 6:** List the product whose sale is the highest on a particular day.\u003cbr\u003e\n\n**QUERY 7:** List the category of product which has been sold the highest on a particular day.\u003cbr\u003e\n\n**QUERY 8:** List the customers who bought products from a particular seller the most.\u003cbr\u003e\n\n**QUERY 9:** List all the orders whose payment mode is not CoD and yet to be delivered.\u003cbr\u003e \n**QUERY 10:**  List all orders of customers whose total amount is greater than 5000.\n**QUERY 11:**  If customer wants to modify the cart that is he want to delete some products from the cart.\n**QUERY 12:**  List the seller who has the highest stock of a particular product. \n**QUERY 13:** Customers to compare the products based on their ratings and reviews.\n\n\u003cbr\u003e\u003cbr\u003e \n\n**To get implemented part of above queries  and other details, you can mail me: [abhinav221sk@gmail.com](mailto:abhinav221sk@gmail.com).\u003cbr\u003e For any personalized and expedited support, feel free to ping me on [my telegram](https://t.me/qxvjm). (please do mention subject as this repo name). thanks**\u003cbr\u003e\n\n#### Contributors\n[SAURABH KISHOR](https://github.com/Saurabh-pec) \n\n##### Want to support my coding journey? Buy me a coffee and keep the code flowing! [Buy me a Coffee!](https://www.buymeacoffee.com/saurabhkishor ).\nThanks and I highly appreciate your support.\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasfer-dev%2Fhuda-db-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasfer-dev%2Fhuda-db-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasfer-dev%2Fhuda-db-project/lists"}