SQL application to implement one-to-one association (mandatory + bidirectional)
- Order Data: Order Date and Total Amount.
- Invoice Data: Invoice Number and Issue Date.
- An order cannot exist without an invoice.
- An invoice cannot exist without an order.
- Customers needs to see their invoices while checking orders.
- Accounts executives needs to see orders while checking invoices.
- Conceptual Data Model
- Logical Data Model
- Physical Data Model
- create tables
- insert records for 5 orders and 5 invoices
- each invoice belongs to a single order
- get all orders along with their invoices
- find a particular order's invoice
- get all invoices along with their orders
- find a particular invoice's order
Follow these steps to get a local repository up and running:
-
Clone the repository on local machine:
git clone https://github.com/Codegnan-HYD/sql-app-11.git -
Create a new branch for your work:
git branch <your-branch-name> -
Switch to your branch:
git checkout <your-branch-name>
-
Create files and save the ER Diagrams with Conceptual Data Model:
ERD-Conceptual.png -
Create a file and save the ER Diagram with Logical Data Model:
ERD-Logical.png -
Create a file and save the ER Diagram with Physical Data Model:
ERD-Physical.png -
Create a file and save all the DDL SQL statements:
DDL.sql -
Create a file and save all the DML SQL statements:
DML.sql -
Create a file and save all the DQL SQL statements:
DQL.sql -
Add all the files to the staging area:
git add ERD-Conceptual.pnggit add ERD-Logical.pnggit add ERD-Physical.pnggit add DDL.sqlgit add DML.sqlgit add DQL.sql -
Commit your changes:
git commit -m <your commit message> -
Push your branch to the remote repository:
git push https://github.com/Codegnan-HYD/sql-app-11.git <your-branch-name>
- draw.io
- MySQL Database Server 9.7.0
- MySQL Workbench 8.0.47