FivespeedDoc / BMS_Project

A Banquet Management System (BMS)
3 stars 0 forks source link

Can SpecialCuisine be NULL? #9

Closed FrankYang0610 closed 1 week ago

FrankYang0610 commented 1 week ago
CREATE TABLE IF NOT EXISTS MEALS (
    BIN INTEGER NOT NULL,
    ID INTEGER NOT NULL,
    Name VARCHAR(255) NOT NULL,
    Type VARCHAR(255) NOT NULL,
    Price DECIMAL(5,2) NOT NULL,
    SpecialCuisine VARCHAR(255) NOT NULL,
    CONSTRAINT MEALS_PK PRIMARY KEY (BIN, ID),
    CONSTRAINT MEALS_FK FOREIGN KEY (BIN) REFERENCES BANQUETS(BIN) ON DELETE CASCADE -- ON UPDATE CASCADE;
);