daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create table countries (
  2.     country_id int auto_increment,
  3.     country_name varchar(40),
  4.     primary key (country_id)
  5. );
  6.  
  7. create table cities (
  8.     city_id int auto_increment,
  9.     city_name varchar(40) not null,
  10.     country_id int,
  11.     primary key (city_id),
  12.     foreign key (country_id) references countries(country_id)
  13. );
  14.  
  15. create table body_types (
  16.     body_type_id int auto_increment,
  17.     body_type_name varchar(40),
  18.     primary key (body_type_id)
  19. );
  20.  
  21. create table hair_colors (
  22.     hair_color_id int auto_increment,
  23.     hair_color_name varchar(40),
  24.     primary key (hair_color_id)
  25. );
  26.  
  27. create table breast_sizes (
  28.     breast_size_id int auto_increment,
  29.     breast_size_name varchar(40),
  30.     primary key (breast_size_id)
  31. );
  32.  
  33. create table availabilities (
  34.     availability_id int auto_increment,
  35.     availability_name varchar(40),
  36.     primary key (availability_id)
  37. );
  38.  
  39. create table persons (
  40.     person_id int auto_increment,
  41.     person_email nvarchar(50) not null,
  42.     person_password nvarchar(40) not null,
  43.     person_name nvarchar(40) not null,
  44.     person_birth_date date,
  45.     person_height int,
  46.     person_phone_number varchar(4),
  47.     person_city_id int,
  48.     person_body_type_id int,
  49.     person_hair_color_id int,
  50.     person_breast_size_id int,
  51.     person_availability_id int,
  52.     person_comment nvarchar(15000) not null,
  53.     person_profile_picture varchar(255) not null,
  54.     primary key (person_id),
  55.    
  56.     foreign key (person_city_id) references cities(city_id),
  57.     foreign key (person_body_type_id) references body_types(body_type_id),
  58.     foreign key (person_hair_color_id) references hair_colors(hair_color_id),
  59.     foreign key (person_breast_size_id) references breast_sizes(breast_size_id),
  60.     foreign key (person_availability_id) references availabilities(availability_id)
  61. );
  62.  
  63.  
  64.  
  65. insert into countries(country_name) values('Georgia');
  66. insert into cities(city_name, country_id) values('Tbilisi', 1);
  67. insert into cities(city_name, country_id) values('Batumi', 1);
  68. insert into cities(city_name, country_id) values('Kutaisi', 1);
  69.  
  70. insert into body_types(body_type_name) values("Chubby");
  71. insert into body_types(body_type_name) values("Skinny");
  72. insert into body_types(body_type_name) values("Athlete");
  73. insert into body_types(body_type_name) values("Medium");
  74.  
  75. insert into breast_sizes(breast_size_name) values("(A) Small");
  76. insert into breast_sizes(breast_size_name) values("(B) Medium");
  77. insert into breast_sizes(breast_size_name) values("(C) Big");
  78.  
  79. insert into hair_colors(hair_color_name) values("Blonde");
  80. insert into hair_colors(hair_color_name) values("Black");
  81. insert into hair_colors(hair_color_name) values("Brunette");
  82. insert into hair_colors(hair_color_name) values("Red");
  83. insert into hair_colors(hair_color_name) values("Honey Brown");
  84. insert into hair_colors(hair_color_name) values("Gold");
  85. insert into hair_colors(hair_color_name) values("Silver");
  86.  
  87. insert into availabilities(availability_name) values ("Incall");
  88. insert into availabilities(availability_name) values ("Outcall");
  89. insert into availabilities(availability_name) values ("Incall/Outcall");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top