当前位置:网站首页>(1)达梦数据库模型分析
(1)达梦数据库模型分析
2022-07-21 03:58:00 【thubier(段新建)】
当我们安装完dm数据库后,进入管理端将看到如下信息:
整个体系来看,与我们常用的数据库类似。上周使用sqlserver的数据库脚本进行小改后能完成std_upp的构建,从这个角度来说,dm与sqlserver的语法基本是兼容的。
sqlserver采用了数据库名称作为分区隔离,dm数据库直接采用了表空间进行分区隔离。
当我们想进行模型分析时,在system表空间中发现了数据库自我描述信息。
基于这个模型分析,dm与sqlserver更为接近,我们在upp项目中,采用了数据库模型对象来检测表与列是否存在,使得我们必须在dm中找到类似的模型提供数据源。根据system模型,我们大体分析出了相应的对象。
整个体系以Sysobjects对象为主对象管理,区分了相应的对象类型:
select distinct type$ From sysobjects
根据进一步分析,我们本次构建的对象将基于SCHOBJ与TABOBJ进行展开。
TABOBJ核心信息管理着约束与索引。
select distinct subtype$ From sysobjects where type$='TABOBJ';
SCHOB管理的主要是表/视图等对象:
select distinct subtype$ From sysobjects where type$='SCHOBJ';
基于以上分析,dm的系统模型管理对象与sqlserver确实非常类似,所以可以参照sqlserver的版本进行兼容构建。存在细节内容再进行特性定制。
我们在产品中对数据类型的使用保持着谨慎的态度,为支持多数据库尽可能使用通用的数据类型,但时间对象是较为突出的对象,必须简化处理,下面将提供通用的日期对象:
select curdate()
select curtime()
select getdate;
select sysdate
select ADD_DAYS( getdate(), 1)
select ADD_MONTHS( getdate(), 1)
select ADD_WEEKS( getdate(), 1);
从对系统时间的提取来看,确实兼容了sqlserver、oracle、mysql的写法.............
边栏推荐
- OSPF Foundation
- 其他正则验证规则web launch app
- L1-003 single digit statistics
- The first lesson of programmers is "Hello word". Do you know the first lesson of network engineering?
- onmousemove=alert(1) style='width
- MYSQL08_ Overview of sub query, single row, multi row, related sub query
- C what are the output points of DSP core resample of digital signal processing toolkit
- Implementation method of SuperMap iclient for openlayers layer group control
- Distributed Base theory
- China phosphorus pentachloride Market Research and investment forecast report (2022 Edition)
猜你喜欢
Verilog语法基础HDL Bits训练 03
C# 数字信号处理工具包 DSP-Core 重采样(Resample)输出点数是多少
Thread pool Thread number setting
Comparison of four bean copying tools
蚓激酶白蛋白纳米粒/红细胞膜定向包裹血红蛋白-白蛋白纳米粒的研究制备
Day009 circular structure (exercise)
Web APIs DOM page special effects element size and position
Distributed Cap theory
分布式.负载均衡
Distributed High performance
随机推荐
Verilog语法基础HDL Bits训练 03
Strcspn, strchr special character verification
Introduction to ESP privilege isolation mechanism
How to realize the data structure of nested tables in SQL
Metahuman face shader summary
Loop structure: while and do while structures
分布式.容量评估
深度学习——(4)VGG16 图像分类
L1-003 single digit statistics
Preparation of paclitaxel combined with 2-methoxyestradiol albumin nanoparticles / Piper longum amide albumin nanoparticles
Day009 circular structure (exercise)
SAP IDOC教程:定义,结构,类型,格式和表格-019
MYSQL06_ Seven join operations and union all of sql99
Clickhouse in-depth disclosure
Teach you how to install MySQL database by hand
Distributed Base theory
List容器的系列操作( 详解 )
FTXUI基础笔记(checkbox复选框组件)
h5在微信内自定义分享遇到的坑
L1-008 求整数段和