Максим Грамин КРОК. В поисках идеального инструмента

Similar documents
Pl Sql Copy Table From One Schema To Another

Database Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Edition-Based Redefinition

Copy Data From One Schema To Another In Sql Developer

Sample Database Table Schemas 11g Release 2 Pdf

SQL Commands & Mongo DB New Syllabus

Data Modeling Diagram Open Source Tool Oracle

Security Benefits of Implementing Database Vault. -Arpita Ghatak

1. Data Model, Categories, Schemas and Instances. Outline

Alter Change Default Schema Oracle Sql Developer

ISV Migrating to Oracle9i/10g

Oracle Associate User With Schema Export Full

Sql Server 2005 Create Script To Copy Database Schema And All The Objects

Manipulating Data. Copyright 2004, Oracle. All rights reserved.

Product Review: James F. Koopmann Pine Horse, Inc. SoftTree s SQL Assistant. Product Review: SoftTree s SQL Assistant

Mysql Query Browser Export Table Structure

Assignment 6. This lab should be performed under the Oracle Linux VM provided in the course.

Schema Management with Flyway

ОБЪЕКТНО- ОРИЕНТИРОВАННОЕ ПРОГРАММИРОВАНИЕ. Лекция 1 / г.

Click to edit H06the title text format

Sql 2008 Copy Tables Structure And Database To Another

Introduction to MySQL. Database Systems

Relational databases and SQL

Карта «Кофейные регионы Эфиопии» Коллеги из Trabocca любезно предоставили нам карту кофейных регионов Эфиопии, за что

MySQL Introduction. By Prof. B.A.Khivsara

MongoDB An Overview. 21-Oct Socrates

BIS Database Management Systems.

MIS Database Systems.

Data Manipulation Language

Oracle Sql Describe Schema Query To Find Table

Oracle Streams: Step by Step

Index. Bitmap Heap Scan, 156 Bitmap Index Scan, 156. Rahul Batra 2018 R. Batra, SQL Primer,

Institute of Aga. Network Database LECTURER NIYAZ M. SALIH

Database Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

SQL language. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2018

How To Change Existing Table Schema In Sql Server 2008

How To Create New Schema In Oracle 10g Using Toad

New ways to migrate from Oracle

Oracle 1Z Oracle Database 11g SQL Fundamentals I. Download Full Version :

Introduction to MySQL. Database Systems

Táblák tartalmának módosítása. Copyright 2004, Oracle. All rights reserved.

Including Dynamic Images in Your Report

Visual Studio Schema Compare Does Not Support The Specified Database

Database System Concepts and Architecture

How To Create A Simple Database Schema Diagram In Visual Studio 2012 >>>CLICK HERE<<<

Institute of Aga. Microsoft SQL Server LECTURER NIYAZ M. SALIH

ORACLE 12C NEW FEATURE. A Resource Guide NOV 1, 2016 TECHGOEASY.COM

Баум Виталий Sr. SharePoint Developer Conteq

Database Foundations. 6-1 Introduction to Oracle Application Express. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

DATABASES SQL INFOTEK SOLUTIONS TEAM

Chapter 13 : Informatics Practices. Class XI ( As per CBSE Board) SQL Commands. New Syllabus Visit : python.mykvs.in for regular updates

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Get Table Schema In Sql Server 2008 To Add Column If Not Exists >>>CLICK HERE<<<

G64DBS Database Systems. G64DBS Module. Recommended Textbook. Assessment. Recommended Textbook. Recommended Textbook.

Database migration under control.

Oracle 1z z0-146 Oracle Database 11g: Advanced PL/SQL. Practice Test. Version QQ:

DatabaseRESTAPI

Full version is >>> HERE <<<

Migrating to DB2 Tasks and Tools

RMOUG Training Days 2018

T-sql Check If Index Exists Information_schema

Mysql Workbench Restore No Database Selected

Postgres for Developers

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2016

Today Learning outcomes LO2

Course Details Duration: 3 days Starting time: 9.00 am Finishing time: 4.30 pm Lunch and refreshments are provided.

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2-1

Oral Questions and Answers (DBMS LAB) Questions & Answers- DBMS

Monitoring and Resolving Lock Conflicts. Copyright 2004, Oracle. All rights reserved.

Database System Concepts and Architecture

IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps://

Introduction. Performance

Bonus Content. Glossary

Série n 6 Bis : Ateliers SQL Data Modeler (Oracle)

Persistence Performance Tips

Creating Other Schema Objects

Sql Server 2008 Query Table Schema Name In

CS313D: ADVANCED PROGRAMMING LANGUAGE

Mysql Using Php Script

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved.

Database Programming with SQL

Mysql Workbench Import Sql No Database. Selected >>>CLICK HERE<<<

Tools for Oracle Oracle Tutorials 2013 Przemyslaw Radowiecki CERN IT-DB

Sample Question Paper

Course Overview. Copyright 2010, Oracle and/or its affiliates. All rights reserved.

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2016

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time

USER GUIDE Azure Factory

IT360: Applied Database Systems. SQL: Structured Query Language DDL and DML (w/o SELECT) (Chapter 7 in Kroenke) SQL: Data Definition Language

Course Outline. MySQL Database Administration & Design. Course Description: Pre-requisites: Course Content:

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved.

Lecture 7: Web hacking 3, SQL injection, Xpath injection, Server side template injection, File inclusion

Accelerate MySQL for Demanding OLAP and OLTP Use Cases with Apache Ignite. Peter Zaitsev, Denis Magda Santa Clara, California April 25th, 2017

Building Database-Centric Web Applications Using. Oracle HTML DB

Nina Popova, St.Petersburg Polytechnic University Liudmila Devel, St.Petersburg University of Culture.

Using Relational Databases for Digital Research

Tools for Oracle Databases

Data Base Concepts. Course Guide 2

HIBERNATE MOCK TEST HIBERNATE MOCK TEST IV

Transcription:

Максим Грамин КРОК В поисках идеального инструмента

Disclaimer Личное мнение на личном опыте

Немного о себе

Немного о себе

Немного о себе

Немного о себе

Немного о себе

Одинаковые проблемы Версионность метаданных Версионность данных Совместная разработка Выбор инструментов

Что будет в докладе Анамнез средств разработки БД Поиск путей решения Анализ одного из вариантов

Чего не будет 100%-го готового решения «Silver Bullet» Рекламы Антирекламы

Основные инструменты разработки БД Version Control Dump tools Migration tools CLI GUI IDE

Version Control

Version Control Кто удалил мой индекс...??

Version Control Необходимо использовать

Version Control Необходимо использовать Сложно

Version Control Необходимо использовать Сложно Все используют по разному

Version Control Необходимо использовать Сложно Все используют по разному только инкремент (миграции) снапшот БД на дату на уровне модели (ORM, db designer etc)

Version Control Необходимо использовать Сложно Все используют по разному Где-то вообще не используют

https://stackoverflow.com/questions/1961674

https://stackoverflow.com/questions/1961674

https://stackoverflow.com/questions/115369

https://stackoverflow.com/questions/173

Проблемы Не все используют Не все используют правильно Не понятно как правильно

DB Dump Tools

Dump tools pg_dump mysqldump dbms_datapump, export/import cqlsh - describe schema

Dump tools Мощный и крутой инструмент

Dump tools Мощный и крутой инструмент Администрирование

Dump tools Мощный и крутой инструмент Администрирование Разработка

Dump tools Я думал дамп с прода будет поменьше!!

Command Line Utilities psql sqlplus mysql cqlsh mongo shell

Migration tools Liquibase Flyway Phinx Cassandra Migration

GUI IDE

Кнопка просмотра плана запроса должна быть где то здесь!.

GUI IDE

GUI IDE

GUI IDE

pgadmin DevCenter dbforge MySQL Workbanch Robomongo Navicat phpmyadmin Neo4j browser Toad IBExpert HareDB HeidiSQL SQL Developer PLSQL Developer Dbeaver

SQL, *QL, JDBC, ODBC, ADO.NET, OCI, etc GUI IDE

SQL (DML, DDL, DCL, TCL) SQL, *QL, JDBC, ODBC, ADO.NET, OCI, etc GUI IDE

Проблемы «All inclusive»

Проблемы «All inclusive» Вторичность кода

Проблемы «All inclusive» Вторичность кода Платные/закрытые

Проблемы «All inclusive» Вторичность кода Платные/закрытые Расширяемость

Проблемы «All inclusive» Вторичность кода Платные/закрытые Расширяемость Интеграция

Проблемы «All inclusive» Интеграция Вторичность кода Платформозависимость Платные/закрытые Расширяемость

Проблемы «All inclusive» Интеграция Вторичность кода Платформозависимость Платные/закрытые Много Расширяемость

Итого «Polyglot Persistence» «Лихие 90-е» «Импортозамещение»

«критикуешь предлагай»

Как бы он мог выглядеть??

Как бы он мог выглядеть?? Полностью конфигурируемый Прозрачный (transparent) Любой flow (code first, db first, model first)

«EVERYTHING AS A CODE»

«Everything as a Code»

«Everything as a Code»

«Everything as a Code»

«Everything as a Code»

«Everything as a Code»

И причем тут базы данных?

«Everything as a Code»

«Everything as a Code» Исходный код объектов БД

«Everything as a Code» Исходный код объектов БД Код манипуляции объектами БД

«Everything as a Code» Исходный код объектов БД Код манипуляции объектами БД Структура

«Everything as a Code» Исходный код объектов БД Код манипуляции объектами БД Структура Шаблоны

«Everything as a Code». SQL. Postgresql select, from where and and t.table_schema as "schema" t.table_name as "table" information_schema.tables t t.table_type = 'BASE TABLE' t.table_schema like '$schema' t.table_name like '$table'

«Everything as a Code». SQL. Oracle select, from where and t.owner as "schema" t.table_name as "table" all_tables t t.owner like '$schema' t.table_name like '$table'

«Everything as a Code». SQL. Cassandra select, from where and keyspace_name as "schema" columnfamily_name as "table" system.schema_columnfamilies keyspace_name = '$schema' columnfamily_name = '$table'

«Everything as a Code». SQL alter table persons add column (age number); alter table persons disable all triggers; drop table persons; exec dbms_stats.gather_stats('hr', 'persons');

«Everything as a Code». SQL alter database open read only; alter system flush buffer_cache; alter tablespace users offline; alter session set sql_trace = true;

«Everything as a Code». Структура <type name="schema"> <type name="table"> <type name="column"/> <type name="pk"/> <type name="index"/> </type> <type name="view"/> <type name="procedure"/> </type>

«Everything as a Code». Структура <type name="schema"> <type name="table"> <type name="column"/> <type name="pk"/> <type name="index"/> </type> <type name="view"/> <type name="procedure"/> </type>

«Everything as a Code». Структура <type name="schema"> <type name="table"> <type name="column"/> <type name="pk"/> <type name="index"/> </type> <type name="view"/> <type name="procedure"/> </type>

«Everything as a Code». Files <database_1> <schema_1> <table_1> <ddl.sql> <pk.sql> <indexes.sql> <data.sql> <test_data.sql> <views> <table_1_vw.sql> <procedues> <get_all_data_prc.sql>...

«Everything as a Code». Шаблоны

«Everything as a Code». Rest

«Everything as a Code». Rest Объекты БД как ресурсы Человекопонятный Простая интеграция Расширяемый Прозрачное кеширование

JDBC URI REST API

JDBC URI REST API

JDBC URI REST API

JDBC URI REST API

JDBC URI REST API

JDBC URI REST API

REST API JDBC URI REST API

JDBC URI REST API

URI schema

URI schema type/resource_path method

URI schema type/resource_path method

URI schema type/resource_path method schema

URI schema type/resource_path method schema table

URI schema type/resource_path method schema table idx

URI schema type/resource_path method schema table idx etc

URI schema type/resource_path method schema table idx etc

URI schema type/resource_path method schema table idx etc /hr

URI schema type/resource_path method schema table idx etc /hr /hr.persons

URI schema type/resource_path method schema table idx etc /hr /hr.persons /hr.persons.prs_idx

URI schema type/resource_path method schema table idx etc /hr /hr.persons /hr.persons.prs_idx etc

URI schema type/resource_path method schema table idx etc /hr /hr.persons /hr.persons.prs_idx etc

URI schema type/resource_path method schema table idx etc /hr /hr.persons /hr.persons.prs_idx etc -X GET

URI schema type/resource_path method schema table idx etc /hr /hr.persons /hr.persons.prs_idx etc -X GET -X POST

URI schema type/resource_path method schema table idx etc /hr /hr.persons /hr.persons.prs_idx etc -X GET -X POST -X DELETE

URI schema type/resource_path method schema table idx etc /hr /hr.persons /hr.persons.prs_idx etc -X GET -X POST -X DELETE etc

curl X GET api/index/bookings.tickets*.*_idx select,, from where and and i.schemaname as "schema" i.tablename as "table" i.indexname as "index" pg_catalog.pg_indexes i i.schemaname like 'bookings' i.tablename like 'tickets%' i.indexname like '%_idx'

curl X GET api/index/bookings.tickets*.*_idx select,, from where and and i.schemaname as "schema" i.tablename as "table" i.indexname as "index" pg_catalog.pg_indexes i i.schemaname like 'bookings' i.tablename like 'tickets%' i.indexname like '%_idx'

curl X GET api/index/bookings.tickets*.*_idx select,, from where and and i.schemaname as "schema" i.tablename as "table" i.indexname as "index" pg_catalog.pg_indexes i i.schemaname like 'bookings' i.tablename like 'tickets%' i.indexname like '%_idx'

curl X GET api/index/bookings.tickets*.*_idx select,, from where and and i.schemaname as "schema" i.tablename as "table" i.indexname as "index" pg_catalog.pg_indexes i i.schemaname like 'bookings' i.tablename like 'tickets%' i.indexname like '%_idx'

curl X GET api/index/bookings.tickets*.*_idx select,, from where and and i.schemaname as "schema" i.tablename as "table" i.indexname as "index" pg_catalog.pg_indexes i i.schemaname like 'bookings' i.tablename like 'tickets%' i.indexname like '%_idx'

GET index/bookings.tickets*.*_idx <bookings> <tables> <tickets> <indexes> <ticket_no_idx.sql> <ticket_passid_idx.sql> <ticket_bookref_idx.sql> <ticket_flights> <indexes> <tcktflights_no_idx.sql> <tcktflights_flid_idx.sql> <idx_tcktflights_no.sql>...

GET index/bookings.tickets*.*_idx <bookings> <tables> <tickets> <indexes> <ticket_no_idx.sql> <ticket_passid_idx.sql> <ticket_bookref_idx.sql> <ticket_flights> <indexes> <tcktflights_no_idx.sql> <tcktflights_flid_idx.sql> <idx_tcktflights_no.sql>...

GET index/bookings.tickets*.*_idx <bookings> <tables> <tickets> <indexes> <ticket_no_idx.sql> <ticket_passid_idx.sql> <ticket_bookref_idx.sql> <ticket_flights> <indexes> <tcktflights_no_idx.sql> <tcktflights_flid_idx.sql> <idx_tcktflights_no.sql>...

GET index/bookings.tickets*.*_idx <bookings> <tables> <tickets> <indexes> <ticket_no_idx.sql> <ticket_passid_idx.sql> <ticket_bookref_idx.sql> <ticket_flights> <indexes> <tcktflights_no_idx.sql> <tcktflights_flid_idx.sql> <idx_tcktflights_no.sql>...

GET index/bookings.tickets*.*_idx <bookings> <tables> <tickets> <indexes> <ticket_no_idx.sql> <ticket_passid_idx.sql> <ticket_bookref_idx.sql> <ticket_flights> <indexes> <tcktflights_no_idx.sql> <tcktflights_flid_idx.sql> <idx_tcktflights_no.sql>...

GET index/bookings.tickets*.*_idx <bookings> <tables> <tickets> <indexes> <ticket_no_idx.sql> <ticket_passid_idx.sql> <ticket_bookref_idx.sql> <ticket_flights> <indexes> <tcktflights_no_idx.sql> <tcktflights_flid_idx.sql> <idx_tcktflights_no.sql>...

Шаблоны

Шаблон CREATE TABLE "${table.schema}"."${table.name}"( <#list table.columns as column> "${column.name}" ${column.type} ${column.size}, </#list> ); CREATE TABLE "HR"."EMPLOYEES"( "EMPLOYEE_ID" NUMBER(6,0), "FIRST_NAME" VARCHAR2(20), "LAST_NAME" VARCHAR2(25), "EMAIL" VARCHAR2(25), "PHONE_NUMBER" VARCHAR2(20), "HIRE_DATE" DATE, "JOB_ID" VARCHAR2(10), "SALARY" NUMBER(8,2));

curl X GET table/hr.*/relations select, from join join where s.relname as master_table t.relname as slave_table pg_catalog.pg_constraint c pg_catalog.pg_class s on s.oid = c.confrelid pg_catalog.pg_class t on t.oid = c.conrelid c.contype = 'f' and s.relkind = 'r' digraph DbObjectsRelations { <#list tables as table> "${table.master_table}" -> "${table.slave_table}" </#list> }

curl X GET table/hr.*/relations digraph DbObjectsRelations { "aircrafts" -> "flights" "airports" -> "flights" "airports" -> "flights" "aircrafts" -> "seats" "flights" -> "ticket_flights" "tickets" -> "ticket_flights" "bookings" -> "tickets" "ticket_flights" -> "boarding_passes" }

curl X POST -H "Accept: image/png" table/hr.*/relations

«предлагаешь делай»

Ядро

Конфигурации

«Reader»

«Reader»

«Reader» SqlReader GitReader JdbcReader HgReader FileSystemReader SvnReader RestReader etc

«Generator»

«Generator» PlainTextGenerator FileBaseGenerator SqlGenerator

«Aggregator» TextAggregator JsonAggregator XmlAggregator HtmlAggregator ZipAggregator

Dockerfile FROM mgramin/sql-boot ADD conf conf/postgresql RUN curl https://jdbc.postgresql.org/.../postgresql.jar

Собственная конфигурация

Перспективы Language Server Protocol

Выводы Everything As a Code Transparency Open Source Community

Вопросы? github.com/mgramin/sql-boot mgramin@gmail.com