- Spring Boot
- Spring JDBC
- Maven
- MySQL
- JavaScript and JQuery
- Junit
- Install Java
- Install Maven
- Install MySQL Server
- Create database in MySQL with name 'phone_book'
- Change user's password and name for MySQL in application.yml
SQL scripts for creating tables contacts and phones:
CREATE TABLE `contacts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8
CREATE TABLE `phones` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`phone_number` varchar(255) NOT NULL,
`contact_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `contact_id_idx` (`contact_id`),
CONSTRAINT `contact_id` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8