dbTalk Databases Forums  

Request into several DBMS simultaneously on DDL and DML

comp.databases.theory comp.databases.theory


Discuss Request into several DBMS simultaneously on DDL and DML in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dmitry Turin
 
Posts: n/a

Default Request into several DBMS simultaneously on DDL and DML - 08-24-2007 , 10:21 PM






(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;
connect ra=db.distination.com username=Tomson password=pwdt
nickname=db2;
connect ra=database.remote.com username=Johnson password=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 NAME to 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.by.ru/site/sql40/en/author/mc_eng.htm
Related ideas are on:
http://sql40.by.ru/site/sql40/en/author/mc2_eng.htm


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.