Register

/* create table users ( ID int NOT NULL AUTO_INCREMENT, Name varchar(30) NULL, Email varchar(30) NULL, Pass varchar(30) NULL, Role int DEFAULT 0, PRIMARY KEY (ID) ) create table countries ( ID int NOT NULL AUTO_INCREMENT, Name varchar(30) NULL COLLATE utf8mb4_general_ci, Code varchar(3) not null, PRIMARY KEY (ID) ) create table regions ( ID int NOT NULL AUTO_INCREMENT, Country int not null, Name varchar(100) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table settlements ( ID int NOT NULL AUTO_INCREMENT, Region int not null, SetType int not null, Longitude real NULL, Latitude real NULL, Name varchar(100) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) SetType --> 1 - village, 2 - city create table districts ( ID int NOT NULL AUTO_INCREMENT, Settlement int not null, Name varchar(30) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table streets ( ID int NOT NULL AUTO_INCREMENT, District int not null, Name varchar(30) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) create table buildings ( ID int NOT NULL AUTO_INCREMENT, StreetID int not null, Longitude real NULL, Latitude real NULL, Build int not null, Floors int not null, Material int not null, Name varchar(300) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) Material --> 1 - tree, 2 - stone, 3 - brick, 3 - concrete block create table apartments ( ID int NOT NULL AUTO_INCREMENT, Settlement int not null, Rooms int default NULL, Floor int DEFAULT NULL, TotalArea real null, LivingArea real null, Address varchar(100) NULL COLLATE utf8mb4_general_ci, ApType int default null, ApDate datetime, Comment varchar(1000) NULL COLLATE utf8mb4_general_ci, PRIMARY KEY (ID) ) drop TABLE countries; drop TABLE regions; drop TABLE settlements; drop TABLE districts; drop TABLE streets; drop TABLE buildings; drop TABLE appartments; */