While connected to MYDB in ij, you can create the table either by issuing individual CREATE TABLE statements, or by using the run command to run an entire set of SQL statements contained in a file.
- 1. Issue the following statements to create your tables in the menu schema.
DDL for the menu application
CREATE TABLE menu.food (id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name VARCHAR(128), description VARCHAR(1024)); CREATE TABLE menu.prices (id INTEGER, price DECIMAL(5,2), CONSTRAINT prices_fk FOREIGN KEY (id) REFERENCES menu.food(id)); CREATE TABLE menu.pictures (id INTEGER, picture BLOB(256K), CONSTRAINT pictures_fk FOREIGN KEY (id) REFERENCES menu.food(id));