Advertisement
Guest User

hotel4eto 66 points

a guest
Jan 19th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. create table employees
  2. (
  3. id int primary key not null auto_increment,
  4. first_name varchar(50) not null,
  5. last_name varchar(50) not null,
  6. title varchar(50) not null,
  7. notes blob not null
  8. );
  9.  
  10. insert into employees(id, first_name, last_name, title, notes)
  11. values (1, 'da', 'dwa', 'dad', 'dawda'),
  12. (2, 'da', 'dwa', 'dad', 'dawda'),
  13. (3, 'da', 'dwa', 'dad', 'dawda');
  14.  
  15. create table customers
  16. (
  17. account_number int primary key not null auto_increment,
  18. first_name varchar(50) not null,
  19. last_name varchar(50) not null,
  20. phone_number int not null,
  21. emergency_name varchar(50) not null,
  22. emergency_number int not null,
  23. notes blob not null
  24. );
  25. insert into customers(account_number,
  26. first_name, last_name,
  27. phone_number, emergency_name,
  28. emergency_number, notes)
  29. values (1, 'sa', 'sa', 21, 'sa', 123, 'dawda'),
  30. (2, 'sa', 'sa', 21, 'sa', 123, 'dawda'),
  31. (3, 'sa', 'sa', 21, 'sa', 123, 'dawda');
  32.  
  33. create table room_status
  34. (
  35. room_status int not null,
  36. notes blob not null
  37. );
  38.  
  39. insert into room_status(room_status, notes)
  40. values (1, 'daw'),
  41. (2, 'daw'),
  42. (3, 'daw');
  43.  
  44. create table room_types
  45. (
  46. room_type varchar(50),
  47. notes blob not null
  48. );
  49.  
  50. insert into room_types(room_type, notes)
  51. values ('zxc', 'daw'),
  52. ('zxc', 'daw'),
  53. ('zxc', 'daw');
  54.  
  55. create table bed_types
  56. (
  57. bed_type varchar(50),
  58. notes blob not null
  59. );
  60.  
  61. insert into bed_types(bed_type, notes)
  62. values ('top', 'da'),
  63. ('top', 'da'),
  64. ('top', 'da');
  65.  
  66. create table rooms
  67. (
  68. room_number int primary key not null auto_increment,
  69. room_type varchar(50) not null,
  70. bed_type varchar(50) not null,
  71. rate int not null,
  72. room_status int not null,
  73. notes blob not null
  74. );
  75. insert into rooms(room_number, room_type, bed_type, rate, room_status, notes)
  76. values (1, 'daw', 'da', 5, 32, 'dawd'),
  77. (2, 'daw', 'da', 5, 32, 'dawd'),
  78. (3, 'daw', 'da', 5, 32, 'dawd');
  79.  
  80. create table payments
  81. (
  82. id int primary key not null auto_increment,
  83. employee_id int not null,
  84. payment_date datetime not null,
  85. account_number int not null,
  86. first_date_occupied date not null,
  87. last_date_occupied date not null,
  88. total_days int not null,
  89. amount_charged int not null,
  90. tax_rate int not null,
  91. tax_amount int not null,
  92. payment_total int not null,
  93. notes blob not null
  94. );
  95.  
  96. insert into payments (id, employee_id, payment_date, account_number, first_date_occupied,
  97. last_date_occupied, total_days, amount_charged, tax_rate, tax_amount, payment_total, notes)
  98. values (1, 1, '2000-10-10', 5, '2000-10-10', '2000-10-10', 20, 10, 10, 10, 10, 'блоб'),
  99. (2, 1, '2000-10-10', 5, '2000-10-10', '2000-10-10', 20, 10, 10, 10, 10, 'блоб'),
  100. (3, 1, '2000-10-10', 5, '2000-10-10', '2000-10-10', 20, 10, 10, 10, 10, 'блоб');
  101.  
  102. create table occupancies
  103. (
  104. id int primary key not null auto_increment,
  105. employee_id int not null,
  106. date_occupied date not null,
  107. account_number int not null,
  108. room_number int not null,
  109. rate_applied int not null,
  110. phone_charge int not null,
  111. notes blob not null
  112. );
  113.  
  114. insert into occupancies(id, employee_id, date_occupied, account_number,
  115. room_number, rate_applied, phone_charge, notes)
  116. values (1, 1, '2000-10-10', 1, 5, 1, 1, 'dawd'),
  117. (2, 1, '2000-10-10', 1, 5, 1, 1, 'dawd'),
  118. (3, 1, '2000-10-10', 1, 5, 1, 1, 'dawd');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement