CREATE DATABASE VideoCollection;

Use VideoCollection;

CREATE TABLE Videos (
	VideoID			INT		PRIMARY KEY,
	VideoTitle		VarCHAR(100),
	DateReleased	DATETIME
);

CREATE TABLE Performers (
	PerformerID		INT		PRIMARY KEY,
	FirstName		VarChar(30) NOT NULL,
	LastName		VarChar(50)
);

CREATE TABLE VideoRoles (
	VideoID			INT	REFERENCES Videos(VideoID),
	PerformerID		INT	REFERENCES Performers(PerformerID),
	CONSTRAINT VideoRoles_pk PRIMARY KEY (VideoID, PerformerID)
);
