This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TRIGGER IF EXISTS `project_bd`.`employee_BEFORE_INSERT`; | |
DELIMITER $$ | |
USE `project_bd`$$ | |
CREATE DEFINER = CURRENT_USER TRIGGER `project_bd`.`employee_BEFORE_INSERT` BEFORE INSERT ON `employee` FOR EACH ROW | |
BEGIN | |
if new.rank <> 'Отсутствует' then | |
signal sqlstate '45000' set message_text = 'Звание у работника должно отсутствовать.'; | |
end if; | |
END$$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Для таблицы Attestation | |
CREATE UNIQUE INDEX `id_attestation_UNIQUE` ON `project_bd`.`attestation` (`id_attestation` ASC) VISIBLE; | |
CREATE UNIQUE INDEX `num_of_admis_order_UNIQUE` ON `project_bd`.`attestation` (`num_of_admis_order` ASC) VISIBLE; | |
Для таблицы Rank | |
CREATE UNIQUE INDEX `name_UNIQUE` ON `project_bd`.`rank` (`name` ASC) VISIBLE; | |
Для таблицы Position |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Для таблицы Attestation | |
INSERT INTO `project_bd`.`attestation` (`id_attestation`, `status_to_work_SIZOD`, `date_of_test`, `date_of_admis_order`, `num_of_admis_order`) VALUES ('1', 'готов', '2021.02.02', '2021.02.09', '12345'); | |
INSERT INTO `project_bd`.`attestation` (`id_attestation`, `status_to_work_SIZOD`, `date_of_test`, `date_of_admis_order`, `num_of_admis_order`) VALUES ('2', 'готов', '2021.02.02', '2021.02.09', '12346'); | |
INSERT INTO `project_bd`.`attestation` (`id_attestation`, `status_to_work_SIZOD`, `no_SIZOD_reason`, `date_of_test`) VALUES ('3', 'не готов', 'Не явился на аттестацию.', '2021.02.02'); | |
Для таблицы Rank | |
INSERT INTO `project_bd`.`rank` (`initial_prepar_period`, `name`) VALUES ('5', 'Рядовой состав (рядовой).'); | |
INSERT INTO `project_bd`.`rank` (`initial_prepar_period`, `name`) VALUES ('5', 'Младший офицерский состав (лейтенанты).'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL Script generated by MySQL Workbench | |
-- Thu Jun 12 17:21:40 2024 | |
-- Model: New Model Version: 1.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'; | |
-- ----------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL Script generated by MySQL Workbench | |
-- Sun May 12 15:50:49 2024 | |
-- Model: New Model Version: 1.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'; | |
-- ----------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ----------------------------------------------------- | |
-- Data for table `sr3_3.1`.`game` | |
-- ----------------------------------------------------- | |
START TRANSACTION; | |
USE `sr3_3.1`; | |
INSERT INTO `sr3_3.1`.`game` (`id_game`, `name_game`, `manufacturer`, `min_players`, `max_players`, `min_year`) VALUES (1, 'Интуиция', 'Dream Makers', 4, 8, 12); | |
INSERT INTO `sr3_3.1`.`game` (`id_game`, `name_game`, `manufacturer`, `min_players`, `max_players`, `min_year`) VALUES (2, 'Манчкин', 'Hobby Word', 3, 6, 12); | |
INSERT INTO `sr3_3.1`.`game` (`id_game`, `name_game`, `manufacturer`, `min_players`, `max_players`, `min_year`) VALUES (3, 'Бэнг!', 'Hobby Word', 4, 7, 8); | |
INSERT INTO `sr3_3.1`.`game` (`id_game`, `name_game`, `manufacturer`, `min_players`, `max_players`, `min_year`) VALUES (4, 'Интуиция', 'Origami', 3, 6, 18); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL Script generated by MySQL Workbench | |
-- Fri May 10 22:51:19 2024 | |
-- Model: New Model Version: 1.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'; | |
-- ----------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ----------------------------------------------------- | |
-- Data for table `ЛР6`.`manufacturer` | |
-- ----------------------------------------------------- | |
START TRANSACTION; | |
USE `ЛР6`; | |
INSERT INTO `ЛР6`.`manufacturer` (`name_manufacturer`, `web-site`) VALUES ('Seagate', 'https://www.seagategov.com'); | |
INSERT INTO `ЛР6`.`manufacturer` (`name_manufacturer`, `web-site`) VALUES ('Lenovo', 'https://www.lenovo.com'); | |
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MySQL Script generated by MySQL Workbench | |
-- Mon Apr 29 18:28:21 2024 | |
-- Model: New Model Version: 1.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'; | |
-- ----------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 ex2 | |
-- ----------------------------------------------------- |
NewerOlder