Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE Directors
- (
- Id INT NOT NULL PRIMARY KEY,
- DirectorName VARCHAR(50) NOT NULL,
- Notes VARCHAR(MAX)
- )
- CREATE TABLE Genres
- (
- Id INT NOT NULL PRIMARY KEY,
- GenreName VARCHAR(50) NOT NULL,
- Notes VARCHAR(MAX)
- )
- CREATE TABLE Categories
- (
- Id INT NOT NULL PRIMARY KEY,
- CategoryName VARCHAR(50) NOT NULL,
- Notes VARCHAR(MAX)
- )
- CREATE TABLE Movies
- (
- Id INT NOT NULL PRIMARY KEY,
- Title VARCHAR(50) NOT NULL,
- DirectorId INT NOT NULL,
- CopyrightYear DATE,
- Lenght INT NOT NULL,
- GenreId INT NOT NULL,
- CategoryId INT NOT NULL,
- Rating FLOAT,
- Notes VARCHAR(MAX)
- )
- INSERT INTO Directors(Id, DirectorName)
- VALUES (1, 'Steven Spielberg'),
- (2, 'Martin Scorsese'),
- (3, 'Alfred Hitchcock'),
- (4, 'Stanley Kubrick'),
- (5, 'Quentin Tarantino')
- INSERT INTO Genres(Id, GenreName, Notes)
- VALUES (1, 'Action', 'Something'),
- (2, 'Fantasy', 'Something else'),
- (3, 'Sci-Fi', 'Primerno'),
- (4, 'Western', 'Ne go znam'),
- (5, 'Romance', 'Velikolepnata sedmorka')
- INSERT INTO Categories(Id, CategoryName, Notes)
- VALUES (1, 'A', 'Something'),
- (2, 'S', 'Something else'),
- (3, 'G', 'Primerno'),
- (4, 'T', 'Ne go znam'),
- (5, 'F', 'Velikolepnata sedmorka')
- INSERT INTO Movies(Id, Title, DirectorId, Lenght, GenreId, CategoryId)
- VALUES (1, 'Star Wars', 1, 120, 3, 2),
- (2, 'Velikolepnata Sedmorka', 5, 120, 4, 4),
- (3, 'Fifty Shades Of Gray', 3, 90, 5, 5),
- (4, 'The wolf of wall street', 2, 90, 5, 4),
- (5, 'The Guardians Of The Galaxy', 4, 130, 3, 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement