Found anything Missing, in this Relationship Diagram.

Thread Starter

Shafty

Joined Apr 25, 2023
327
One of my schoolmate's relations is running a small Dairy. He asked me to develop an inventory cum software for him. I choose MS Access as the Base and escalate to further technologies if needed. This is my ever Database I am developing for a Dairy. Upon thinking. I have derived the following entities:
Customer (Living in a Particular Road Line of a City)
Item (5 items in general: Milk, Curd, Butter, Ghee and Khoa)
Subscription (Can be switched, Paused and Closed)
Adhoc Request (Can be done on the above 5 listed items)
and Finally Delivering the Same.
Main Subscription Form:
1747064250108.png


Delivery Drafts:
1747064296981.png


Why I call it Drafts:
Because its the form which loads all the deliverables from the database and make it acknowledged after Delivery.
SQL:
SELECT Customer.ID, [DD] AS Delivery_Date, Subscription.Session, Customer.NameVal, Item.ID, Item.NameVal, Subscription.Rate, Nz((SELECT LAST([Volume_Switch].[New_Volume]) FROM [Volume_Switch] WHERE [Subscription].ID=[Volume_Switch].[Subscription_ID] ),[Subscription].[Volume]) AS Delivery_Volume
FROM Item INNER JOIN (Customer INNER JOIN Subscription ON Customer.ID = Subscription.Customer) ON Item.ID = Subscription.Item
WHERE (((Subscription.Moment)<=[DD]) AND ((Subscription.ID) Not In (SELECT [Closure].[Subscription] from [Closure]) And (Subscription.ID) Not In (SELECT PAUSE.[Subscription] from pause where [Pause].[Subscription]=[Subscription].[ID] and ([DD] between [Pause].[From] and [Pause].[To]))))
ORDER BY Customer.ID, Subscription.Session DESC;
 
Top