dblabs2/scripts/002.sql

25 lines
945 B
MySQL
Raw Permalink Normal View History

2024-02-02 07:27:13 +01:00
-- Insert sample data into the Users table
2024-02-02 07:41:30 +01:00
INSERT OR IGNORE INTO Users (username, name, address, telephone)
VALUES ('john_doe', 'John Doe', '123 Main St', '555-1234'),
('jane_smith', 'Jane Smith', '456 Elm St', '555-5678');
2024-02-02 07:27:13 +01:00
-- Insert sample data into the Theaters table
2024-02-02 07:41:30 +01:00
INSERT OR IGNORE INTO Theaters (theater_id, name, seats)
VALUES (1, 'Theater A', 100),
(2, 'Theater B', 150);
2024-02-02 07:27:13 +01:00
-- Insert sample data into the Movies table
2024-02-02 07:41:30 +01:00
INSERT OR IGNORE INTO Movies (movie_id, name)
VALUES (1, 'Movie X'),
(2, 'Movie Y');
2024-02-02 07:27:13 +01:00
-- Insert sample data into the Shows table
2024-02-02 07:41:30 +01:00
INSERT OR IGNORE INTO Shows (show_id, movie_id, theater_id, show_date)
VALUES (1, 1, 1, '2022-01-01'),
(2, 2, 2, '2022-01-02');
2024-02-02 07:27:13 +01:00
-- Insert sample data into the Reservations table
2024-02-02 07:41:30 +01:00
INSERT OR IGNORE INTO Reservations (reservation_id, username, show_id, reservation_date)
VALUES (1, 'john_doe', 1, CURRENT_TIMESTAMP),
(2, 'jane_smith', 2, CURRENT_TIMESTAMP);