元数据关联的表

--元数据所做的工作
发布元数据会导致以下表中产生数据
执行脚本即执行建表语句
下面只介绍发布元数据所产生的数据
--先根据表名查出发布的元数据的组件id ,之后的查询都是通过compentid来查询数据
新开发的模块
还要导出 md_module表数据

假设表名是pt_app_account
select componentid from md_class where defaulttablename='pt_app_account';
 --f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf
---md_table
 select * from  md_table where id in 
 (select defaulttablename from md_class where id in 
 (select id from md_class where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf'));
---枚举
 select * from  MD_ENUMVALUE where id in 
 (select id from md_class where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf');
----列数据
 select * from  md_column where tableid in 
 (select defaulttablename from md_class where id in 
 (select id from md_class where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf'));
 --主子表关联关系表
 select * from md_db_relation where startattrid in 
 (select id from  md_property where classid in 
 (select id from md_class where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf'));
 --属性表
 select * from  md_property where classid in 
 (select id from md_class where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf'); 
 select * from  md_association where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf';
--
 select * from  MD_ACCESSORPARA where id in 
  (select id from md_class where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf');
---class表
 select * from  md_bizitfmap where classid in 
  (select id from md_class where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf');
 --
select * from  md_ormap where classid in 
 (select id from md_class where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf');
---class表
 select * from  md_class where componentid='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf';
---组件
 select * from  md_component where id='f1d9ad1e-70ff-428e-a58b-67a0fb8bdbdf';

---------------------------------
--删除语句
DELETE  from md_class where defaulttablename='so_testprice';
DELETE from  md_table where id in 
 (select defaulttablename from md_class where id in 
 (select id from md_class where componentid='fec27012-126e-4617-b34b-aa69ed3edb58'));

 DELETE from  md_column where tableid in 
 (select defaulttablename from md_class where id in 
 (select id from md_class where componentid='fec27012-126e-4617-b34b-aa69ed3edb58'));
 
  --主子表关联关系表
DELETE from md_db_relation where startattrid in 
 (select id from  md_property where classid in 
 (select id from md_class where componentid='fec27012-126e-4617-b34b-aa69ed3edb58'));
 --属性表
 DELETE from  md_property where classid in 
 (select id from md_class where componentid='fec27012-126e-4617-b34b-aa69ed3edb58'); 
 select * from  md_association where componentid='fec27012-126e-4617-b34b-aa69ed3edb58';
--
DELETE from  MD_ACCESSORPARA where id in 
  (select id from md_class where componentid='fec27012-126e-4617-b34b-aa69ed3edb58');
---class表
 DELETE from  md_bizitfmap where classid in 
  (select id from md_class where componentid='fec27012-126e-4617-b34b-aa69ed3edb58');
 --
DELETE from  md_ormap where classid in 
 (select id from md_class where componentid='fec27012-126e-4617-b34b-aa69ed3edb58');
---class表
 DELETE from  md_class where componentid='fec27012-126e-4617-b34b-aa69ed3edb58';
---组件
DELETE from  md_component where id='fec27012-126e-4617-b34b-aa69ed3edb58';

--------------其他一些关联表
md_accessorpara
MD_PROPERTY
md_bizitfmap
md_association
md_ormap
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值