Advertisement
Guest User

hotel s pulen broi tochki

a guest
Jan 19th, 2020
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 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 varchar(50) not null,
  21. emergency_name varchar(50) not null,
  22. emergency_number varchar(50) 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', "1", 'sa', "1", 'dawda'),
  30. (2, 'sa', 'sa', "1", 'sa', "1", 'dawda'),
  31. (3, 'sa', 'sa', "1", 'sa', "1", 'dawda');
  32.  
  33. create table payments
  34. (
  35. id int primary key not null auto_increment,
  36. employee_id int not null,
  37. payment_date datetime not null,
  38. account_number int not null,
  39. first_date_occupied date not null,
  40. last_date_occupied date not null,
  41. total_days int not null,
  42. amount_charged int not null,
  43. tax_rate int not null,
  44. tax_amount int not null,
  45. payment_total int not null,
  46. notes blob not null
  47. );
  48.  
  49. insert into payments (id, employee_id, payment_date, account_number, first_date_occupied,
  50. last_date_occupied, total_days, amount_charged, tax_rate, tax_amount, payment_total, notes)
  51. values (1, 1, '2000-10-10', 5, '2000-10-10', '2000-10-10', 20, 10, 10, 10, 10, 'блоб'),
  52. (2, 1, '2000-10-10', 5, '2000-10-10', '2000-10-10', 20, 10, 10, 10, 10, 'блоб'),
  53. (3, 1, '2000-10-10', 5, '2000-10-10', '2000-10-10', 20, 10, 10, 10, 10, 'блоб');
  54.  
  55. create table occupancies
  56. (
  57. id int primary key not null auto_increment,
  58. employee_id int not null,
  59. date_occupied date not null,
  60. account_number int not null,
  61. room_number int not null,
  62. rate_applied int not null,
  63. phone_charge int not null,
  64. notes blob not null
  65. );
  66.  
  67. insert into occupancies(id, employee_id, date_occupied, account_number,
  68. room_number, rate_applied, phone_charge, notes)
  69. values (1, 1, '2000-10-10', 1, 5, 1, 1, 'dawd'),
  70. (2, 1, '2000-10-10', 1, 5, 1, 1, 'dawd'),
  71. (3, 1, '2000-10-10', 1, 5, 1, 1, 'dawd');
  72.  
  73.  
  74. create table room_status (
  75. room_status int not null,
  76. notes blob,
  77. primary key(room_status)
  78. );
  79. insert into room_status(room_status)values(1),(2),(3);
  80.  
  81. create table room_types(
  82. room_type INT not null,
  83. notes blob not null,
  84. primary key(room_type)
  85. );
  86. insert into room_types(room_type,notes)values(1,'sasas'),(2,'sasas'),(3,'sasasa');
  87.  
  88. create table bed_types(
  89. bed_type INT not null,
  90. notes blob not null,
  91. primary key(bed_type)
  92. );
  93. insert into bed_types(bed_type,notes)values(1,'sasas'),(2,'sasas'),(3,'sasasa');
  94.  
  95. create table rooms(
  96. room_number int not null,
  97. room_type varchar(50),
  98. bed_type varchar(50),
  99. rate varchar(50),
  100. room_status varchar(50),
  101. notes blob not null,
  102. primary key(room_number)
  103. );
  104. insert into rooms(room_number,notes)values(1,'sasas'),(2,'sasas'),(3,'sasasa');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement