Question: Debugging the following? CREATE TABLE genres ( name text UNIQUE position integer ) CREATE TABLE movies ( movie_id SERIAL PRIMARY KEY, title text, genre cube
Debugging the following? CREATE TABLE genres ( name text UNIQUE position integer ) CREATE TABLE movies ( movie_id SERIAL PRIMARY KEY, title text, genre cube ; CREATE TABLE actors ( actor_id SERIAL PRIMARY KEY, name text ); CREATE TABLE movies_actors ( movie_id integer REFERENCES movies NULL, actor_id integer REFERENCES actors NOT NULL, UNIQUE (movie_id, actor_id) ); CREATE INDEX movies_actors_movie_id ON movies_actors (movie_id) CREATE INDEX movies_actors_actor_id ON movies_actors (actor_id); CREATE INDEX movies_genres_cube ON movies USING gist (genre);
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
