load.sql 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'African');
  2. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'American');
  3. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Chinese');
  4. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'French');
  5. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'German');
  6. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Greek');
  7. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Indian');
  8. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Italian');
  9. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Japanese');
  10. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Mexican');
  11. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Middle Eastern');
  12. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'None');
  13. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Slavic');
  14. INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Thai');
  15. INSERT INTO measurement_system (systemid,value_) VALUES (1,'USA');
  16. INSERT INTO measurement_system (systemid,value_) VALUES (2,'Metric');
  17. --INSERT INTO system (systemid,value_) VALUES (3,'Imperial');
  18. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'small','sm',null,0,0,FALSE);
  19. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'medium','med',null,0,0,FALSE);
  20. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'large','lg',null,0,0,FALSE);
  21. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'unit','ea',null,0,0,FALSE);
  22. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'slice','sli',null,0,0,FALSE);
  23. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'clove','clv',null,0,0,FALSE);
  24. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'pinch','pn',null,0,0,FALSE);
  25. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'package','pk',null,0,0,FALSE);
  26. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'can','cn',null,0,0,FALSE);
  27. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'drop','dr',null,0,0,FALSE);
  28. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'bunch','bn',null,0,0,FALSE);
  29. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'dash','ds',null,0,0,FALSE);
  30. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'carton','ct',null,0,0,FALSE);
  31. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'sprig','sprig',null,0,0,FALSE);
  32. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'leaf','leaf',null,0,0,FALSE);
  33. -- US volumes
  34. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Teaspoon','t',
  35. (SELECT systemid FROM measurement_system WHERE value_ = 'USA'),1,5,FALSE);
  36. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Tablespoon','T',
  37. (SELECT systemid FROM measurement_system WHERE value_ = 'USA'),3,15,FALSE);
  38. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Ounce (fluid)','fl. oz',
  39. (SELECT systemid FROM measurement_system WHERE value_ = 'USA'),6,29.56,FALSE);
  40. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Cup','c',
  41. (SELECT systemid FROM measurement_system WHERE value_ = 'USA'),48,236,FALSE);
  42. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Pint','pt',
  43. (SELECT systemid FROM measurement_system WHERE value_ = 'USA'),96,473,FALSE);
  44. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Quart','q',
  45. (SELECT systemid FROM measurement_system WHERE value_ = 'USA'),192,946,FALSE);
  46. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Gallon','gal',
  47. (SELECT systemid FROM measurement_system WHERE value_ = 'USA'),768,3785.4,FALSE);
  48. -- US mass
  49. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Ounce','oz',
  50. (SELECT systemid FROM measurement_system WHERE value_ = 'USA'),1,28.35,TRUE);
  51. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Pound','lb',
  52. (SELECT systemid FROM measurement_system WHERE value_ = 'USA'),16,454,TRUE);
  53. -- Metric volumes
  54. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'milliliter','ml',
  55. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),0.203,1,FALSE);
  56. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'cubic centimeter','cc',
  57. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),0.203,1,FALSE);
  58. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'tea spoon','tsp',
  59. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),1.015,5,FALSE);
  60. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'centiliter','cl',
  61. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),2.03,10,FALSE);
  62. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'table spoon','Tbsp',
  63. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.045,15,FALSE);
  64. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'deciliter','dl',
  65. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),20.3,100,FALSE);
  66. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'cup','cup',
  67. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),50.75,250,FALSE);
  68. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'liter','L',
  69. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),203,1000,FALSE);
  70. -- Metric mass
  71. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'milligram','mg',
  72. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-5,1,TRUE);
  73. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'decagram','dg',
  74. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-4,10,TRUE);
  75. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'hectogram','hg',
  76. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-3,100,TRUE);
  77. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'gram','g',
  78. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-2,1000,TRUE);
  79. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'kilogram','kg',
  80. (SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),34.48275862,1000000,TRUE);
  81. /*
  82. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Tablespoon','Tbsp',
  83. (SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
  84. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Teaspoon','tsp',
  85. (SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
  86. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Pound','lb',
  87. (SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
  88. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Ounce','oz',
  89. (SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
  90. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Pint','pt',
  91. (SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
  92. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Quart','q',
  93. (SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
  94. INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Gallon','gal',
  95. (SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
  96. */
  97. update unit set toimperial = 0 where toimperial is null;
  98. ALTER TABLE unit ALTER COLUMN tometric SET NOT NULL;
  99. ALTER TABLE unit ALTER COLUMN tous SET NOT NULL;
  100. ALTER TABLE unit ALTER COLUMN toimperial SET NOT NULL;
  101. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Beef');
  102. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Bread');
  103. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Dairy');
  104. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Egg');
  105. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Fruit');
  106. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Grain');
  107. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Lamb');
  108. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Other');
  109. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Pasta');
  110. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Pork/Ham');
  111. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Poultry');
  112. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Seafood');
  113. INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Vegetable');
  114. INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'0 Minutes');
  115. INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'1-10 Minutes');
  116. INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'10-30 Minutes');
  117. INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'30-60 Minutes');
  118. INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'60+ Minutes');
  119. INSERT INTO difficulty (difficultyid,value_) VALUES (nextval('hibernate_integer_seq'),'Easy');
  120. INSERT INTO difficulty (difficultyid,value_) VALUES (nextval('hibernate_integer_seq'),'Intermediate');
  121. INSERT INTO difficulty (difficultyid,value_) VALUES (nextval('hibernate_integer_seq'),'Difficult');
  122. INSERT INTO difficulty (difficultyid,value_) VALUES (nextval('hibernate_integer_seq'),'Expert');
  123. INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Breakfast');
  124. INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Snack');
  125. INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Lunch');
  126. INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Appetizer');
  127. INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Side Dish');
  128. INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Entree');
  129. INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Dessert');
  130. INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Beverage');
  131. INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'N/A');