Sha256: d87ddb116d4aa3ab7ae90427b7844316f20092ce057c1aa2b64378f44f82fa39
Contents?: true
Size: 1009 Bytes
Versions: 5
Compression:
Stored size: 1009 Bytes
Contents
CREATE TABLE Meal ( -- Meal has MealId, MealId int IDENTITY NOT NULL, PRIMARY KEY(MealId) ) GO CREATE TABLE Service ( -- maybe Service earned a tip of Amount and Amount has AUDValue, AmountAUDValue decimal NULL, -- Service involves Meal and Meal has MealId, MealId int NOT NULL, -- Service involves Waiter and Waiter has WaiterNr, WaiterNr int NOT NULL, PRIMARY KEY(WaiterNr, MealId), FOREIGN KEY (MealId) REFERENCES Meal (MealId) ) GO CREATE TABLE WaiterTip ( -- WaiterTip involves Amount and Amount has AUDValue, AmountAUDValue decimal NOT NULL, -- WaiterTip involves Meal and Meal has MealId, MealId int NOT NULL, -- WaiterTip involves Waiter and Waiter has WaiterNr, WaiterNr int NOT NULL, PRIMARY KEY(WaiterNr, MealId), FOREIGN KEY (MealId) REFERENCES Meal (MealId) ) GO
Version data entries
5 entries across 5 versions & 1 rubygems