Experiment-11-Video Library Management System
Experiment-11-Video Library Management System
Customers Table
Videos Table
Genres Table
Rentals Table
Staff Table
-- Insert Genres
INSERT INTO genres (genre_name) VALUES ('Action');
INSERT INTO genres (genre_name) VALUES ('Comedy');
INSERT INTO genres (genre_name) VALUES ('Drama');
-- Insert Customers
INSERT INTO customers (first_name, last_name, email, phone, address)
VALUES ('Alice', 'Johnson', 'alice.johnson@example.com', '5551234567', '123
Main St');
INSERT INTO customers (first_name, last_name, email, phone, address)
VALUES ('Bob', 'Smith', 'bob.smith@example.com', '5557654321', '456 Oak
St');
-- Insert Videos
INSERT INTO videos (title, genre_id, release_date, available)
VALUES ('The Avengers', 1, DATE '2012-05-04', TRUE);
INSERT INTO videos (title, genre_id, release_date, available)
VALUES ('The Hangover', 2, DATE '2009-06-05', TRUE);
-- Insert Rentals
INSERT INTO rentals (customer_id, video_id, rental_date)
VALUES (1, 1, SYSDATE);
INSERT INTO rentals (customer_id, video_id, rental_date)
VALUES (2, 2, SYSDATE);
-- Insert Staff
INSERT INTO staff (first_name, last_name, position, phone)
VALUES ('Sarah', 'Lee', 'Manager', '5559876543');
INSERT INTO staff (first_name, last_name, position, phone)
VALUES ('James', 'Wright', 'Clerk', '5556543210');
Step 3: Queries
Retrieve Customer Details