Request into several DBMS simultaneously on DDL and DML

Поиск
Список
Период
Сортировка
От Kitter Georgiy
Тема Request into several DBMS simultaneously on DDL and DML
Дата
Msg-id 195471188276289@webmail10.yandex.ru
обсуждение исходный текст
Ответы Re: Request into several DBMS simultaneously on DDL and DML  (Richard Huxton <dev@archonet.com>)
Список pgsql-sql
(1)Let's allow to __connect into several DBMS__ at once,
last of them becomes DBMS 'by default'.
User assign any nickname to each database at connection,
except nickname 'all' and 'local', e.g. connect ra=database.remote.com username=Smith   password=pwds nickname=db1;
connectra=db.distination.com  username=Tomson  password=pwdt nickname=db2; connect ra=database.remote.com
username=Johnsonpassword=pwdj nickname=db3;
 
And user can change DBMS by default, e.g. local db2;
Each time, when __name of 
datatype, table, view, sequence, index,
trigger, function, procedure, user, role__
is used, it's implied, that object is in database by default, e.g. create  type      NAME ... alter   table     NAME
...drop    sequence  NAME ... create  index     NAME ... replace trigger   NAME ... drop    function  NAME ... insert
into     NAME ... select  ...  from NAME ... create  user      NAME ... create  role      NAME ... grant
NAMEto NAME
 
(2)Let's allow to specify __location of object by prefix__,
which is before name through colon. Prefix can be
(2.1) nickname of concrete database, e.g. select  ...  from db1:NAME ... insert  into      db3:NAME ...
(2.2) predicate "all:" (which designates all databases),
"local:" (which designate database by default), e.g. insert  into        all:NAME ... select  ...  from local:NAME ...
select ...  where fld > any (select ... from all:NAME ...
 
(2.3) marker - word, meaning all databases consecutively
(__any two markers never simultaneously mean the same database__).
Sign "%" is put before marker, e.g. insert  into %db1:NAME select * from %db2:NAME;

(3) As result, __new type of system information__ appears:
field, refering to other field by foreign key,
has additional bit except own value -
bit specifies, whether record, to which it refers,
is in the same or in other database.
It's necessary to not signalize about break of foreign key,
if remote database will not connected in next time.

(4) After all said, __replication__ of databases
by branded programs loss all sense -
always it's possible to make it
by extension of SQL, described above.


Document is stated on http://sql40.chat.ru/site/sql40/en/author/mc_eng.htm
Related ideas are on: http://sql40.chat.ru/site/sql40/en/author/mc2_eng.htm


Dmitry Turin
SQL4      (4.2.0)  http://sql40.chat.ru
HTML6     (6.4.0)  http://html60.chat.ru
Unicode2  (2.0.1)  http://unicode2.chat.ru
Computer2 (2.0.3)  http://computer20.chat.ru


В списке pgsql-sql по дате отправления:

Предыдущее
От: Kristo Kaiv
Дата:
Сообщение: Re: [GENERAL] table column vs. out param [1:0]
Следующее
От: Kitter Georgiy
Дата:
Сообщение: pg & Delphi