1. DBMS :
在DBMS中,数据的性质是非易失性的,并且使用DBMS执行随机数据访问。它对一次查询进行操作,并提供该查询的确切输出。 DBMS使用无限的辅助存储来存储数据,并且在DBMS中,数据更新速率也很低。在几乎没有时间需求或没有时间需求的情况下使用DBMS。
DBMS的应用:
- 大学记录
- 供应链管理
- 人力资源管理
- 电信记录
- 铁路预订系统
下面的查询是DBMS查询的一个示例,它是一次性查询并给出了确切的答案。
SELECT Name, Role, City
FROM Employees
WHERE City = 'Bhubaneswar'
ORDER BY Name
上面的查询是一个非常简单的查询,它显示所在城市属于布巴内斯瓦尔的公司员工的姓名,角色,城市,并且输出/结果将按员工姓名排序。
2. DSMS:
在DSMS中,数据的本质是易失性数据流,并且使用DSMS执行顺序数据访问。它对连续查询进行操作,并提供该查询的准确/近似输出。 DBMS使用有限的主内存来存储数据,并且在DSMS中,数据更新速率也很高。有实时需求时使用DSMS。
DSMS的应用:
- 传感器网络
- 网络流量分析
- 财经新闻
- 网上拍卖
- 交易记录分析
下面的查询是DSMS查询的一个示例,它是一个连续查询,并给出确切/近似的答案。
SELECT Stream
Rowtime
MIN(Temp) Over W1 as Wmin_temp,
MAX(Temp) Over W1 as Wmax_temp,
AVG(Temp) Over W1 as Wavg_temp,
FROM Wheatherstream
Window W1 as (RANGE INTERVAL '2' SECOND PRECEDING);
上面的查询汇总了来自天气监控系统的传感器流。然后,它将汇总收集到的最低,最高和平均温度值。 Window子句创建一个持续时间为2秒的窗口(指的是延迟,可以更改),该窗口显示了具有零结果延迟的增量更新结果流。
DBMS和DSMS之间的区别:
S.No. | DBMS | DSMS |
---|---|---|
01. | DBMS refers to Data Base Management System. | DSMS refers to Data Stream Management System. |
02. | Data Base Management System deals with persistent data. | Data Stream Management System deals with stream data. |
03. | In DBMS random data access takes place. | In DSMS sequential data access takes place. |
04. | It is based on Query Driven processing model i.e called pull based model. | It is based on Data Driven processing model i.e called push based model. |
05. | In DBMS query plan is optimized at beginning/fixed. | DSMS is based on adaptive query plans. |
06. | The data update rates in DBMS is relatively low. | The data update rates in DSMS is relatively high. |
07. | In DBMS the queries are one time queries. | But in DSMS the queries are continuous. |
08. | In DBMS the query gives the exact answer. | In DSMS the query gives the exact/approximate answer. |
09. | DBMS provides no real time service. | DSMS provides real time service. |
10. | DBMS uses unbounded disk store means unlimited secondary storage. | DSMS uses bounded main memory means limited main memory. |