Guest User

Untitled

a guest
Jun 8th, 2021
68
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE `directors`(
  2. `id` INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  3. `director_name` VARCHAR(50) NOT NULL,
  4. `notes` TEXT
  5. );
  6. INSERT INTO `directors`(`id`,`director_name`, `notes`)
  7. VALUES
  8. ('1','Pesho',NULL),
  9. ('2','Ivan',NULL),
  10. ('3','Gosho',NULL),
  11. ('4','Tapata',NULL),
  12. ('5','Ali',NULL)
  13. ;
  14.  
  15. CREATE TABLE `genres`(
  16. `id` INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  17. `genre_name` VARCHAR(50) NOT NULL,
  18. `notes` TEXT
  19. );
  20.  
  21. INSERT INTO `genres` (`id`, `genre_name`, `notes`)
  22. VALUES
  23. ('1','Parody',NULL),
  24. ('2','Comedy',NULL),
  25. ('3','Drama',NULL),
  26. ('4','Action',NULL),
  27. ('5','Animation',NULL)
  28. ;
  29.  
  30. CREATE TABLE `categories`(
  31. `id` INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  32. `category_name` VARCHAR(50) NOT NULL,
  33. `notes` TEXT
  34. );
  35.  
  36. INSERT INTO `categories` (`id`, `category_name`, `notes`)
  37. VALUES
  38. ('1', '+0', NULL),
  39. ('2', '+6', NULL),
  40. ('3', '+12', NULL),
  41. ('4', '+16', NULL),
  42. ('5', '+18', NULL)
  43. ;
  44.  
  45. CREATE TABLE `movies`(
  46. `id` INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
  47. `title` VARCHAR(50) NOT NULL,
  48. `director_id` INT,
  49. `copyright_year` YEAR,
  50. `LENGTH` TIME,
  51. `genre_id` INT,
  52. `category_id` INT,
  53. `rating` DECIMAL(2,1),
  54. `notes` TEXT
  55. );
  56.  
  57. INSERT INTO `movies`(`id`, `title`, `director_id`, `copyright_year`,`LENGTH`, `genre_id`,`category_id`, `rating`, `notes`)
  58. VALUES
  59. ('1', 'No comment', '1', '1991', '00:05:00', '1','1', NULL, NULL),
  60. ('2', 'No comment', '2', '1992', '00:04:00', '2','5', NULL, NULL),
  61. ('3', 'No comment', '3', '1993', '00:03:00', '5','4', NULL, NULL),
  62. ('4', 'No comment', '4', '1994', '00:02:00', '4', '3', NULL, NULL),
  63. ('5', 'No comment', '4', '1995', '00:01:00', '3','2', NULL, NULL)
  64. ;
RAW Paste Data