
DFD= Data Flow Diagram,数据流图 数据流图(Data Flow Diagram,DFD)是一种能全面地描述信息系统逻辑模型的主要工具,它可以用少数几种符号综合地反映出信息在系统中的流动、处理和存储情况。 DFD由数据流、加工、数据存储和外部实体4个要素构成。外部实体是指存在于软件系统之外的人员或组织,它指出系统所需数据的发源地和系统所产生数据的归宿地。>
select客户名称,sum(产品价格数量)
from(
selectc客户名称,p产品价格,dd数量from客户表c
innerjoin订单表donc客户编号=d订单客户编号
innerjoin订单明细表ddondd订单编号=d订单编号
innerjoin产品表ponp产品编号=dd产品编号
wherec客户名称='客户1'
)
用adoquery 控件,先连接数据库。在adoquery的conniection或connectionstring属性中连接数据库。
with adoquery do
begin
Close;
SQLClear;
SQLAdd('select a from A where id=:id ');
ParametersParamByName('id')Value :='1';//若id子段为数字型,则不需要引号
open;
if recordcount>0 then
begin
st:=trim(adoquery1fisldbyname('a')asstring);
end
else
begin
applicationMessageBox('信息为空','提示信息',mb_ok);
end;
end;
数据库管理系统(database
management
system)是一种 *** 纵和管理数据库的大型软件,是用于建立、使用和维护数据库,简称dbms。它对数据库进行统一的管理和控制,以保证数据库的安全性和完整性。用户通过dbms访问数据库中的数据,数据库管理员也通过dbms进行数据库的维护工作。它提供多种功能,可使多个应用程序和用户用不同的方法在同时或不同时刻去建立,修改和询问数据库。它使用户能方便地定义和 *** 纵数据,维护数据的安全性和完整性,以及进行多用户下的并发控制和恢复数据库。
按功能划分,数据库管理系统大致可分为6个部分:
(1)模式翻译:提供数据定义语言(ddl)。用它书写的数据库模式被翻译为内部表示。数据库的逻辑结构、完整性约束和物理储存结构保存在内部的数据字典中。数据库的各种数据 *** 作(如查找、修改、插入和删除等)和数据库的维护管理都是以数据库模式为依据的。
(2)应用程序的编译:把包含着访问数据库语句的应用程序,编译成在dbms支持下可运行的目标程序。
(3)交互式查询:提供易使用的交互式查询语言,如sql。dbms负责执行查询命令,并将查询结果显示在屏幕上。
(4)数据的组织与存取:提供数据在外围储存设备上的物理组织与存取方法。
⑸事务运行管理:提供事务运行管理及运行日志,事务运行的安全性监控和数据完整性检查,事务的并发控制及系统恢复等功能。
(6)数据库的维护:为数据库管理员提供软件支持,包括数据安全控制、完整性保障、数据库备份、数据库重组以及性能监控等维护工具。
基于关系模型的数据库管理系统已日臻完善,并已作为商品化软件广泛应用于各行各业。它在各户服务器结构的分布式多用户环境中的应用,使数据库系统的应用进一步扩展。随着新型数据模型及数据管理的实现技术的推进,可以预期dbms软件的性能还将更新和完善,应用领域也将进一步地拓宽。
它所提供的功能有以下几项:
(1)数据定义功能。dbms提供相应数据语言来定义(ddl)数据库结构,它们是刻画数据库框架,并被保存在数据字典中。
(2)数据存取功能。dbms提供数据 *** 纵语言(dml),实现对数据库数据的基本存取 *** 作:检索,插入,修改和删除。
(3)数据库运行管理功能。dbms提供数据控制功能,即是数据的安全性、完整性和并发控制等对数据库运行进行有效地控制和管理,以确保数据正确有效。
(4)数据库的建立和维护功能。包括数据库初始数据的装入,数据库的转储、恢复、重组织,系统性能监视、分析等功能。
(5)数据库的传输。dbms提供处理数据的传输,实现用户程序与dbms之间的通信,通常与 *** 作系统协调完成。
著名数据库管理系统
ms
sql
sybase
db2
oracle
mysql
access
vf
常见的数据库管理系统
目前有许多数据库产品,如oracle、sybase、informix、microsoft
sql
server、microsoft
access、visual
foxpro等产品各以自己特有的功能,在数据库市场上占有一席之地。下面简要介绍几种常用的数据库管理系统。
l 数据库(DB):DB是与一个企业(或组织)的各项应用有关的全部数据的集合。DB分成两类,一类是应用数据的集合,称为物理数据库,它是数据库的主体;另一类是各级数据结构的描述,称为描述数据库,由DD系统管理。l 硬件:这一部分包括中央处理机、内存、外存、输人输出设备等硬件设备。在DBS中特别要关注内存、外存、I/O存取速度、可支持终端数和性能稳定性等指标,同时还要考虑支持连网的能力和配备必要的后备存储器等因素。此外,还要求系统有较高的通道能力,以提高数据的传输速度。l 软件:这一部分包括DBMS、OS、各种主语言和应用开发支撑软件等程序。DBMS是DBS的核心软件,要在OS支持下才能工作。为了开发应用系统,需要各种主语言,如COBOL、C、PL/I等;有些是属于面向对象程序设计语言,譬如 Visual C++、Java等语言点亮LIVE 11:42:33。l 应用开发支撑软件是为应用开发人员提供的高效率、多功能的交互式程序设计系统,一般包括报表生成器、表格系统、图形系统、具有数据库访问和表格I/O功能的软件、数据字典系统等。它们为应用程序的开发提供了良好的环境,可提高生产率20-100倍。目前,典型的数据库应用开发工具有Visual Basic 60、PowerBuilder 70和Delphi 50等系统。l 数据库管理员:要想成功地运转数据库,就要在数据处理部门配备管理人员一数据库管理员(记为DBA)。
在文件系统下用dd备份文件头部做测试
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/oradata/upgr/system01dbf
/oradata/upgr/sysaux01dbf
/oradata/upgr/undotbs01dbf
/oradata/upgr/users01dbf
SQL>
SQL> set lines 156 pages 100
SQL> col dd_backup_cmd for a156
SQL> col dd_restore_cmd for a156
SQL> select 'dd if='||name||' of=/backup/'||substr(name,instr(name,'/',-1)+1)||'FH bs='||block_size||' count=2' dd_backup_cmd from v$datafile;
DD_BACKUP_CMD
--------------------------------------------------------------------------------
dd if=/oradata/upgr/system01dbf of=/backup/system01dbfFH bs=8192 count=2
dd if=/oradata/upgr/sysaux01dbf of=/backup/sysaux01dbfFH bs=8192 count=2
dd if=/oradata/upgr/undotbs01dbf of=/backup/undotbs01dbfFH bs=8192 count=2
dd if=/oradata/upgr/users01dbf of=/backup/users01dbfFH bs=8192 count=2
SQL> select 'dd of='||name||' if=/backup/'||substr(name,instr(name,'/',-1)+1)||'FH bs='||block_size||' count=2 conv=notrunc' dd_restore_cmd from v$datafile;
DD_RESTORE_CMD
------------------------------------------------------------------------------------------
dd of=/oradata/upgr/system01dbf if=/backup/system01dbfFH bs=8192 count=2 conv=notrunc
dd of=/oradata/upgr/sysaux01dbf if=/backup/sysaux01dbfFH bs=8192 count=2 conv=notrunc
dd of=/oradata/upgr/undotbs01dbf if=/backup/undotbs01dbfFH bs=8192 count=2 conv=notrunc
dd of=/oradata/upgr/users01dbf if=/backup/users01dbfFH bs=8192 count=2 conv=notrunc
SQL>
[oracle@db1 ~]$ dd if=/oradata/upgr/system01dbf of=/backup/system01dbfFH bs=8192 count=2
2+0 records in
2+0 records out
16384 bytes (16 kB) copied, 0000412654 s, 397 MB/s
破坏数据文件头部
[oracle@db1 ~]$ dd if=/dev/zero of=/oradata/upgr/system01dbf bs=8192 count=2 conv=notrunc
2+0 records in
2+0 records out
16384 bytes (16 kB) copied, 0000434433 s, 377 MB/s
[oracle@db1 ~]$ sqlplus / as sysdba
SQLPlus: Release 112040 Production on Thu Jun 16 15:23:33 2016
Copyright (c) 1982, 2013, Oracle All rights reserved
Connected to an idle instance
SQL> startup
ORACLE instance started
Total System Global Area 313159680 bytes
Fixed Size 2252824 bytes
Variable Size 167776232 bytes
Database Buffers 138412032 bytes
Redo Buffers 4718592 bytes
Database mounted
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/oradata/upgr/system01dbf'
SQL> shutdown abort
ORACLE instance shut down
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 112040 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
恢复数据文件头部
[oracle@db1 ~]$ dd of=/oradata/upgr/system01dbf if=/backup/system01dbfFH bs=8192 count=2 conv=notrunc
2+0 records in
2+0 records out
16384 bytes (16 kB) copied, 0000574576 s, 285 MB/s
[oracle@db1 ~]$ sqlplus / as sysdba
SQLPlus: Release 112040 Production on Thu Jun 16 15:24:32 2016
Copyright (c) 1982, 2013, Oracle All rights reserved
Connected to an idle instance
SQL> startup
ORACLE instance started
Total System Global Area 313159680 bytes
Fixed Size 2252824 bytes
Variable Size 167776232 bytes
Database Buffers 138412032 bytes
Redo Buffers 4718592 bytes
Database mounted
Database opened
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 112040 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
[oracle@db1 ~]$
在ASM情况下用dd备份文件头部做测试
SQL> select ' dd '||
2 ' if=/backup/'||egroup_kffxp||'_'||edisk_kffxp||'_'||afile_number||'FH'||
3 ' of='||dpath||
4 ' bs='||callocation_unit_size||
5 ' seek='||eau_kffxp||
6 ' count=1 conv=notrunc' dd_restore_cmd
7 from
8 v$asm_alias a,
9 v$asm_file b,
10 v$asm_diskgroup c,
11 v$asm_disk d,
12 x$kffxp e
13 where afile_number=enumber_kffxp
14 and agroup_number=egroup_kffxp
15 and bgroup_number=agroup_number
16 and dgroup_number=cgroup_number
17 and egroup_kffxp=dgroup_number
18 and afile_number=bfile_number
19 and ddisk_number=edisk_kffxp
20 and asystem_created='Y'
21 and btype='DATAFILE'
22 and exnum_kffxp=0
23 order by afile_number
24 /
DD_RESTORE_CMD
--------------------------------------------------------------------------------------------
dd if=/backup/1_3_283FH of=/dev/oracleasm/disks/ASMDISK7 bs=1048576 seek=21 count=1 conv=notrunc
dd if=/backup/1_4_285FH of=/dev/oracleasm/disks/ASMDISK8 bs=1048576 seek=262 count=1 conv=notrunc
dd if=/backup/1_2_287FH of=/dev/oracleasm/disks/ASMDISK6 bs=1048576 seek=266 count=1 conv=notrunc
dd if=/backup/1_1_288FH of=/dev/oracleasm/disks/ASMDISK5 bs=1048576 seek=299 count=1 conv=notrunc
dd if=/backup/1_3_291FH of=/dev/oracleasm/disks/ASMDISK7 bs=1048576 seek=163 count=1 conv=notrunc
SQL>
SQL> select ' dd'||
2 ' if='||dpath||
3 ' of=/backup/'||egroup_kffxp||'_'||edisk_kffxp||'_'||afile_number||'FH'||
4 ' bs='||callocation_unit_size||
5 ' skip='||eau_kffxp||
6 ' count=1' dd_backup_cmd
7 from
8 v$asm_alias a,
9 v$asm_file b,
10 v$asm_diskgroup c,
11 v$asm_disk d,
12 x$kffxp e
13 where afile_number=enumber_kffxp
14 and agroup_number=egroup_kffxp
15 and bgroup_number=agroup_number
16 and dgroup_number=cgroup_number
17 and egroup_kffxp=dgroup_number
18 and afile_number=bfile_number
19 and ddisk_number=edisk_kffxp
20 and asystem_created='Y'
21 and btype='DATAFILE'
22 and exnum_kffxp=0
23 order by afile_number
24 /
DD_BACKUP_CMD
---------------------------------------------------------------------------------------------------------------
dd if=/dev/oracleasm/disks/ASMDISK7 of=/backup/1_3_283FH bs=1048576 skip=21 count=1
dd if=/dev/oracleasm/disks/ASMDISK8 of=/backup/1_4_285FH bs=1048576 skip=262 count=1
dd if=/dev/oracleasm/disks/ASMDISK6 of=/backup/1_2_287FH bs=1048576 skip=266 count=1
dd if=/dev/oracleasm/disks/ASMDISK5 of=/backup/1_1_288FH bs=1048576 skip=299 count=1
dd if=/dev/oracleasm/disks/ASMDISK7 of=/backup/1_3_291FH bs=1048576 skip=163 count=1
SQL>
备份ASM中数据文件头部
[oracle@ohs1 ~]$ dd if=/dev/oracleasm/disks/ASMDISK7 of=/backup/1_3_283FH bs=1048576 skip=21 count=1
1+0 records in
1+0 records out
1048576 bytes (10 MB) copied, 000664794 seconds, 158 MB/s
破坏ASM中数据文件头部
[oracle@ohs1 ~]$ dd if=/dev/zero of=/dev/oracleasm/disks/ASMDISK7 seek=21 count=1 conv=notrunc bs=1M
1+0 records in
1+0 records out
1048576 bytes (10 MB) copied, 0000517497 seconds, 20 GB/s
[oracle@ohs1 ~]$ sqlplus / as sysdba
SQLPlus: Release 112030 Production on Thu Jun 16 14:58:53 2016
Copyright (c) 1982, 2011, Oracle All rights reserved
Connected to an idle instance
SQL> startup
ORACLE instance started
Total System Global Area 318046208 bytes
Fixed Size 1344680 bytes
Variable Size 188746584 bytes
Database Buffers 121634816 bytes
Redo Buffers 6320128 bytes
Database mounted
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '+DATA_PGOLD/racdb/system01dbf'
ORA-01210: data file header is media corrupt
SQL> shut abort
ORACLE instance shut down
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 112030 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
恢复ASM中数据文件头部
[oracle@ohs1 ~]$ dd if=/backup/1_3_283FH of=/dev/oracleasm/disks/ASMDISK7 bs=1048576 seek=21 count=1 conv=notrunc
1+0 records in
1+0 records out
1048576 bytes (10 MB) copied, 000153561 seconds, 683 MB/s
[oracle@ohs1 ~]$ sqlplus / as sysdba
SQLPlus: Release 112030 Production on Thu Jun 16 15:00:08 2016
Copyright (c) 1982, 2011, Oracle All rights reserved
Connected to an idle instance
SQL> startup
ORACLE instance started
Total System Global Area 318046208 bytes
Fixed Size 1344680 bytes
Variable Size 188746584 bytes
Database Buffers 121634816 bytes
Redo Buffers 6320128 bytes
Database mounted
Database opened
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL>
生成备份数据文件头部所需要的dd脚本(数据库用户)
set lines 156 pages 100
col dd_backup_cmd for a156
col dd_restore_cmd for a156
select 'dd if='||name||' of=/backup/'||substr(name,instr(name,'/',-1)+1)||'FH bs='||block_size||' count=2' dd_backup_cmd from v$datafile;
select 'dd of='||name||' if=/backup/'||substr(name,instr(name,'/',-1)+1)||'FH bs='||block_size||' count=2 conv=notrunc' dd_restore_cmd from v$datafile;
生成备份ASM数据文件头部所需要的dd脚本(在GI用户下ASM实例)
set lines 156 pages 100
col dd_backup_cmd for a156
col dd_restore_cmd for a156
select ' dd'||
' if='||dpath||
' of=/backup/'||egroup_kffxp||'_'||edisk_kffxp||'_'||afile_number||'FH'||
' bs='||callocation_unit_size||
' skip='||eau_kffxp||
' count=1' dd_backup_cmd
from
v$asm_alias a,
v$asm_file b,
v$asm_diskgroup c,
v$asm_disk d,
x$kffxp e
where afile_number=enumber_kffxp
and agroup_number=egroup_kffxp
and bgroup_number=agroup_number
and dgroup_number=cgroup_number
and egroup_kffxp=dgroup_number
and afile_number=bfile_number
and ddisk_number=edisk_kffxp
and asystem_created='Y'
and btype='DATAFILE'
and exnum_kffxp=0
order by afile_number
/
select ' dd '||
' if=/backup/'||egroup_kffxp||'_'||edisk_kffxp||'_'||afile_number||'FH'||
' of='||dpath||
' bs='||callocation_unit_size||
' seek='||eau_kffxp||
' count=1 conv=notrunc' dd_restore_cmd
from
v$asm_alias a,
v$asm_file b,
v$asm_diskgroup c,
v$asm_disk d,
x$kffxp e
where afile_number=enumber_kffxp
and agroup_number=egroup_kffxp
and bgroup_number=agroup_number
and dgroup_number=cgroup_number
and egroup_kffxp=dgroup_number
and afile_number=bfile_number
and ddisk_number=edisk_kffxp
and asystem_created='Y'
and btype='DATAFILE'
and exnum_kffxp=0
order by afile_number
/
生成备份ASM磁盘头部所需要的dd脚本(在GI用户下ASM实例)
set lines 150
set pages 1000
select
'dd if='||path||
' of=/backup/'||substr(path,instr(path,'/',-1)+1)||'_'||group_number||'_'||disk_number||'DH bs=1M count=100'
from v$asm_disk asm_header_backup
where header_status='MEMBER'
order by group_number,disk_number;
select 'dd if=/backup/'||substr(path,instr(path,'/',-1)+1)||'_'||group_number||'_'||disk_number||'DH'||
' of='||path||' bs=1M count=100 conv=notrunc'
from v$asm_disk asm_header_restore
where header_status='MEMBER'
order by group_number,disk_number;
生成asmcmd cp命令(数据库用户下执行)
select 'asmcmd cp '||name||' /backup/'||substr(name,instr(name,'/',-1)+1) asmcmd_cp from v$controlfile
union all
select 'asmcmd cp '||name||' /backup/'||substr(name,instr(name,'/',-1)+1) from v$datafile
union all
select 'asmcmd cp '||member||' /backup/'||thread#||'_'||agroup#||'_'||substr(member,instr(member,'/',-1)+1)
from v$log a, v$logfile b where agroup# = bgroup#;
ASMCMD_CP
--------------------------------------------------------------------------------
asmcmd cp +DATA_PGOLD/racdb/control01ctl /backup/control01ctl
asmcmd cp +DATA_PGOLD/racdb/control02ctl /backup/control02ctl
asmcmd cp +DATA_PGOLD/racdb/system01dbf /backup/system01dbf
asmcmd cp +DATA_PGOLD/racdb/sysaux01dbf /backup/sysaux01dbf
asmcmd cp +DATA_PGOLD/racdb/undotbs01dbf /backup/undotbs01dbf
asmcmd cp +DATA_PGOLD/racdb/users01dbf /backup/users01dbf
asmcmd cp +DATA_PGOLD/racdb/undotbs02dbf /backup/undotbs02dbf
asmcmd cp +DATA_PGOLD/racdb/redo02log /backup/1_2_redo02log
asmcmd cp +DATA_PGOLD/racdb/redo01log /backup/1_1_redo01log
asmcmd cp +DATA_PGOLD/racdb/redo03log /backup/2_3_redo03log
asmcmd cp +DATA_PGOLD/racdb/redo04log /backup/2_4_redo04log
11 rows selected
SQL>
然后执行以上命令即可
生成rman copy命令(数据库用户下执行)
select 'copy current controlfile to ''/tmp/'||substr(name,instr(name,'/',-1)+1)||''';' rman_copy from v$controlfile
union all
select 'copy datafile '||file#||' to ''/backup/'||substr(name,instr(name,'/',-1)+1)||''';' from v$datafile;
RMAN_COPY
--------------------------------------------------------------------------------
copy current controlfile to '/tmp/control01ctl';
copy current controlfile to '/tmp/control02ctl';
copy datafile 1 to '/backup/system01dbf';
copy datafile 2 to '/backup/sysaux01dbf';
copy datafile 3 to '/backup/undotbs01dbf';
copy datafile 4 to '/backup/users01dbf';
copy datafile 5 to '/backup/undotbs02dbf';
7 rows selected
SQL>
然后使用rman这些以上命令
以上就是关于信息系统课程里面的DFD和DD是什么名词的缩写全部的内容,包括:信息系统课程里面的DFD和DD是什么名词的缩写、数据库数据查询、请问delphi 中,提取SQL SERVER数据库dd中,表A中,当ID为1时字段a的值等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)