Compare commits
No commits in common. "ba81f91189d92ef36c6bc2118f882c11fa79b9fa" and "941c5be8f3c0b1b6cb05b92e77c4cd6a8383fb89" have entirely different histories.
ba81f91189
...
941c5be8f3
|
@ -102,8 +102,8 @@ module.exports = {
|
||||||
// editLinkText: 'Ви можете покращити цю сторінку'
|
// editLinkText: 'Ви можете покращити цю сторінку'
|
||||||
|
|
||||||
},
|
},
|
||||||
title: 'Xpertise',
|
title: 'Expertise',
|
||||||
description: 'Лабораторні роботи з дисципліни "Організація баз даних"',
|
description: 'Лабораторні роботи з дисципліни "Розподілені інформаційні системи"',
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
|
|
@ -28,11 +28,11 @@ entity Responce <<ENTITY>>
|
||||||
entity Responce.value <<TEXT>>
|
entity Responce.value <<TEXT>>
|
||||||
|
|
||||||
entity Link <<ENTITY>>
|
entity Link <<ENTITY>>
|
||||||
entity Link.usageLimit <<INT>>
|
entity Link.usageLimit
|
||||||
entity Link.responceLimit <<INT>>
|
entity Link.responceLimit
|
||||||
entity Link.uses <<INT>>
|
entity Link.uses
|
||||||
entity Link.responces <<INT>>
|
entity Link.responces
|
||||||
entity Link.path <<TEXT>>
|
entity Link.path
|
||||||
|
|
||||||
Account.username --* Account
|
Account.username --* Account
|
||||||
Account.password --* Account
|
Account.password --* Account
|
||||||
|
@ -115,16 +115,3 @@ Responce "0,*" --> "0,1" Account
|
||||||
@enduml
|
@enduml
|
||||||
|
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
## Реляційна схема
|
|
||||||
|
|
||||||
<center style="
|
|
||||||
border-radius:4px;
|
|
||||||
border: 1px solid #cfd7e6;
|
|
||||||
box-shadow: 0 1px 3px 0 rgba(89,105,129,.05), 0 1px 1px 0 rgba(0,0,0,.025);
|
|
||||||
padding: 1em;"
|
|
||||||
>
|
|
||||||
|
|
||||||
![relational_schema](./relational_scheme.png)
|
|
||||||
|
|
||||||
</center>
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 49 KiB |
|
@ -1,113 +1,3 @@
|
||||||
# Реалізація інформаційного та програмного забезпечення
|
# Реалізація інформаційного та програмного забезпечення
|
||||||
|
|
||||||
## SQL-скрипт для створення та початкового наповнення бази даних
|
|
||||||
|
|
||||||
```sql
|
|
||||||
-- MySQL Workbench Forward Engineering
|
|
||||||
|
|
||||||
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
|
|
||||||
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
|
||||||
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Schema mydb
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Schema mydb
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET utf8 ;
|
|
||||||
USE `mydb` ;
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Account`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Account` (
|
|
||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
||||||
`username` CHAR(255) NOT NULL,
|
|
||||||
`password` CHAR(255) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
|
|
||||||
UNIQUE INDEX `username_UNIQUE` (`username` ASC) VISIBLE)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Survey`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Survey` (
|
|
||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
||||||
`isPaused` TINYINT UNSIGNED NOT NULL,
|
|
||||||
`isNamed` TINYINT UNSIGNED NOT NULL,
|
|
||||||
`name` CHAR(255) NULL,
|
|
||||||
`duration` CHAR(255) NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
|
|
||||||
CONSTRAINT `fk_Survey_Account1`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Account` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Question`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Question` (
|
|
||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
||||||
`Text` CHAR(255) NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
|
|
||||||
CONSTRAINT `fk_Question_Survey1`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Survey` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Response`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Response` (
|
|
||||||
`id` INT UNSIGNED NULL AUTO_INCREMENT,
|
|
||||||
`Value` VARCHAR(16384) NULL,
|
|
||||||
UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
CONSTRAINT `fk_Response_Question`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Question` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION,
|
|
||||||
CONSTRAINT `fk_Response_Account1`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Account` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Link`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Link` (
|
|
||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
||||||
`uses` INT NOT NULL,
|
|
||||||
`responces` INT NOT NULL,
|
|
||||||
`usageLimit` INT NULL,
|
|
||||||
`responceLimit` INT NULL,
|
|
||||||
`path` CHAR(32) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
CONSTRAINT `fk_Link_Survey1`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Survey` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
SET SQL_MODE=@OLD_SQL_MODE;
|
|
||||||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
|
||||||
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
|
||||||
```
|
|
|
@ -1,3 +1,2 @@
|
||||||
# JS-скрипти
|
# програмні коди
|
||||||
|
В цьому розділі розміщені програмні коди.
|
||||||
В цьому розділі розміщені програмні коди javascript.
|
|
|
@ -1,3 +0,0 @@
|
||||||
# SQL-скрипти
|
|
||||||
|
|
||||||
В цьому розділі розміщені сирцеві коди для створення бази даних.
|
|
|
@ -1,107 +0,0 @@
|
||||||
-- MySQL Workbench Forward Engineering
|
|
||||||
|
|
||||||
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
|
|
||||||
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
|
||||||
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Schema mydb
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Schema mydb
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE SCHEMA IF NOT EXISTS `mydb` DEFAULT CHARACTER SET utf8 ;
|
|
||||||
USE `mydb` ;
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Account`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Account` (
|
|
||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
||||||
`username` CHAR(255) NOT NULL,
|
|
||||||
`password` CHAR(255) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
|
|
||||||
UNIQUE INDEX `username_UNIQUE` (`username` ASC) VISIBLE)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Survey`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Survey` (
|
|
||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
||||||
`isPaused` TINYINT UNSIGNED NOT NULL,
|
|
||||||
`isNamed` TINYINT UNSIGNED NOT NULL,
|
|
||||||
`name` CHAR(255) NULL,
|
|
||||||
`duration` CHAR(255) NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
|
|
||||||
CONSTRAINT `fk_Survey_Account1`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Account` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Question`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Question` (
|
|
||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
||||||
`Text` CHAR(255) NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
|
|
||||||
CONSTRAINT `fk_Question_Survey1`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Survey` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Response`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Response` (
|
|
||||||
`id` INT UNSIGNED NULL AUTO_INCREMENT,
|
|
||||||
`Value` VARCHAR(16384) NULL,
|
|
||||||
UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
CONSTRAINT `fk_Response_Question`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Question` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION,
|
|
||||||
CONSTRAINT `fk_Response_Account1`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Account` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `mydb`.`Link`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
CREATE TABLE IF NOT EXISTS `mydb`.`Link` (
|
|
||||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
||||||
`uses` INT NOT NULL,
|
|
||||||
`responces` INT NOT NULL,
|
|
||||||
`usageLimit` INT NULL,
|
|
||||||
`responceLimit` INT NULL,
|
|
||||||
`path` CHAR(32) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
CONSTRAINT `fk_Link_Survey1`
|
|
||||||
FOREIGN KEY (`id`)
|
|
||||||
REFERENCES `mydb`.`Survey` (`id`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE NO ACTION)
|
|
||||||
ENGINE = InnoDB;
|
|
||||||
|
|
||||||
|
|
||||||
SET SQL_MODE=@OLD_SQL_MODE;
|
|
||||||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
|
||||||
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
|
Loading…
Reference in New Issue