barakgt

מטלה בSQL

Dec 4th, 2020
693
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. INSERT INTO Patient VALUES
  2. (31625777, 'Barak', 'Gotesman','male', '01/24/1996'),
  3. (31225757, 'Herman', 'Grant','male', '09/03/1980'),
  4. (31625007, 'Elissa', 'Beaumont','female', '03/01/1996'),
  5. (32325177, 'Myron', 'Reese','female', '06/11/1992'),
  6. (21225757, 'Walter', 'Holland','male', '11/10/1976');
  7.  
  8. INSERT INTO Dept VALUES (1, 'dept a'),(2, 'dept b'),(3, 'dept c'),(4, 'dept d'),(5, 'dept e');
  9.  
  10. INSERT INTO Room VALUES(1, 'Critical care', 3, 'nice room', 1),
  11. (2, 'Regular', 7, 'big room', 2),
  12. (3, 'Critical care', 10, 'bad room', 3),
  13. (4, 'Regular', 6, 'hello room', 4),
  14. (5, 'Critical care', 9, 'very nice room', 5)
  15.  
  16. INSERT INTO Disease VALUES('Chest pain'),('CoronaVirus'),('Dehydration'),('Dementia'),('Depression'),('Malaria');
  17.  
  18. INSERT INTO DiseasesSymptoms VALUES
  19. ('Fever',1),('Sleepy',1),
  20. ('Blindness',2),('heartburn',2),
  21. ('anxiety',3),('Chills',3),
  22. ('alopecia',4),('confusion',4),
  23. ('Sweaty',5),('dry mouth',5);
  24.  
  25. INSERT INTO Diagnoses VALUES
  26. ('11/24/2020',31625777,1),
  27. ('09/14/2020',31225757,2),
  28. ('08/13/2020',31625007,3),
  29. ('10/12/2020',32325177,4),
  30. ('11/11/2020',21225757,5);
  31.  
  32. INSERT INTO Doctor VALUES
  33. (316571363,'david', 'bkamdd' ,1,3),
  34. (326571363,'mor', 'bkamdd' ,2,3),
  35. (316574363,'moria', 'ebmurmad' ,5,2),
  36. (316771303,'david', 'david' ,4,3),
  37. (116571323,'rotem', 'gotesman' ,1,4),
  38.  
  39. (435464532,'Leighton', 'Mercado',2,5),
  40. (235642489, 'Rosina', 'Curtis', 2, 1),
  41. (357620597, 'Maureen', 'Wilks',1, 4),
  42. (343674354, 'Anees', 'Hines',1,2),
  43. (246629555, 'Mikey', 'Peck', 1,5);
  44.  
  45. INSERT INTO Intern VALUES
  46. (316571363),
  47. (326571363),
  48. (435464532),
  49. (235642489),
  50. (357620597);
  51.  
  52.  
  53. INSERT INTO CertifiedDoctors VALUES
  54. (543240, 316574363),
  55. (263146, 316771303),
  56. (563216, 116571323),
  57. (246732, 343674354),
  58. (123566, 246629555);
  59.  
  60. INSERT INTO Expertise VALUES
  61. (3255,'Cancer'),
  62. (3155,'Plastics'),
  63. (3153,'Ear, Nose and Throat'),
  64. (3516,'Urologic'),
  65. (35713,'Eye and Vision');
  66.  
  67. INSERT INTO HasExpertise VALUES
  68. ('rambam', '01/24/1996', 3255, 316571363 ),
  69. ('Mgdal hamak', '01/22/1996', 3155, 316571363 ),
  70. ('Nahariya hositpel', '03/24/2000', 3153, 326571363 ),
  71. ('Zvulon', '01/22/2010', 3155, 326571363 ),
  72. ('tel hasomer', '03/30/2001', 35713, 316574363 ),
  73. ('rambam', '01/11/2010', 3516, 316574363 ),
  74. ('rambam', '03/30/2011', 35713, 316771303 ),
  75. ('rambam', '01/11/2019', 3155, 316771303 );
  76.  
  77. INSERT INTO Cares VALUES
  78. (316571363, 1,31625777 ),
  79. (326571363, 2,31225757 ),
  80. (316574363, 3,31625007 ),
  81. (316771303, 4,32325177 ),
  82. (116571323, 5,21225757 );
  83.  
  84. INSERT INTO Hosted VALUES
  85. ('01/24/2020','01/26/2020','',1,1,31625777),
  86. ('02/24/2020','02/26/2020','',2,2,31225757),
  87. ('03/24/2020','03/26/2020','',3,3,31225757),
  88. ('04/24/2020','04/26/2020','',4,4,31625007),
  89. ('05/24/2020','05/26/2020','',5,5,31225757);
  90.  
  91. INSERT INTO Medicine VALUES
  92. (2341,'Kadcyla'),
  93. (1341,'Wellbutrin XR'),
  94. (5321,'Bamyxin'),
  95. (5301,'Abacavir'),
  96. (2440,'Acamol');
  97.  
  98. INSERT INTO MedicineConflicts VALUES
  99. (2341,1341),
  100. (2341,5321),
  101. (1341,5321),
  102. (1341,5301),
  103. (1341,2440),
  104. (2341,5301),
  105. (2341,2440),
  106. (2440,5321);
  107.  
  108. INSERT INTO Perscribes VALUES
  109. (1, 2341, 316571363, 31625777, '01/24/2020', 3),
  110. (2, 2341, 326571363, 31225757, '02/24/2020', 2),
  111. (3, 1341, 316574363, 31625007, '01/24/2020', 1),
  112. (4, 2341, 316571363, 32325177, '05/24/2020', 5),
  113. (5, 2341, 316574363, 21225757, '12/11/2020', 1),
  114. (6, 1341, 316571363, 31625777, '01/24/2020', 3),
  115. (7, 2440, 316771303, 21225757, '06/23/2020', 2),
  116. (8, 5321, 316571363, 31625777, '02/04/2020', 2);
  117.  
RAW Paste Data