Comparison of SQL and MDX Syntax
Comparison of SQL and MDX Syntax
The Multidimensional Expressions (MDX) syntax is similar to the syntax of Structured Query Language (SQL). In many ways, the functionality supplied by MDX is also similar to that of SQL; with effort, you can even duplicate some of the functionality provided by MDX in SQL.
However, there are some striking differences between SQL and MDX. Here we provide a guide to these conceptual differences between SQL and MDX, from the perspective of an SQL developer.
Dimensions
The principal difference between SQL and MDX is the ability of MDX to reference multiple dimensions. Although it is possible to use SQL exclusively to query cubes in SQL Server 2000, MDX provides commands that are designed specifically to retrieve data as multidimensional data structures with almost any number of dimensions.
SQL refers to only two dimensions when processing queries: columns and rows. Because SQL was designed to handle only two-dimensional tabular data, the terms "column" and "row" have meaning in SQL syntax.
MDX, in comparison, can process one, two, three, or more dimensions in queries. Each dimension is referred to as an axis. The terms "column" and "row" in MDX are used only as aliases for the first two axis dimensions in an MDX query. Other dimensions are also aliased, but the aliases "column" and "row" hold no meaning to MDX. MDX supports such aliases for display purposes; many OLAP tools are incapable of displaying a result set with more than two dimensions. MDX can even process "zero-axis" queries that return only one cell from a cube, determined by a tuple constructed from the default member of each dimension in the cube.
SELECT and WHERE Clauses
In SQL, the SELECT clause is used to define the column layout for a query, and the WHERE clause is used to define the row layout. However, in MDX the SELECT clause can be used to define several axis dimensions, while the WHERE clause is used to r
相关文档:
2000发布与订阅
预备工作
1.发布服务器,订阅服务器都创建一个同名的windows用户,并设置相同的密码,做为发布快照文件夹的有效访问用户
--管理工具
--计算机管理
--用户和组
--右键用户
--新建用户
--建立一个隶属于administrator组的登陆windows的用户(SynUser)
2.在发布服务器上,新建一个共享目录 ......
在微软的SQL Server系统中通过有效的使用索引可以提高数据库的查询性能,但是性能的提高取决于数据库的实现。在本文中将会告诉你如何实现索引并有效的提高数据库的性能。
在关系型数据库中使用索引能够提高数据库性能,这一点是非常明显的。用的索引越多,从数据库系统中得到数据的速度就越快。然而,需 ......
由于处于系统开发的后期,需要给客户演示。发现大量的表,存在大量的测试数据。需要清除,用“delete from tablename” --> 晕死。后来发现居然有这么强大的东东。 :)
EXECUTE sp_msforeachtable 'delete from ?'
......
备份
DECLARE @strPath NVARCHAR(200)
set @strPath = convert(NVARCHAR,getdate(),120)
set @strPath='hq'+rtrim(left(replace(@strPath,'-',''),8))
set @strPath = 'D:\sqlback\mydb\' + @strPath + '.bak'
BACKUP DATABASE [mydb] TO DISK = @strPath WITH NOFORMAT, NOINIT, NAME = N'mydb-完整 数据库 备份', ......
前段时间做了一个虚拟组织的创建。这个虚拟组织的创建是从现有的组织中读取数据然后进行分析保存到虚拟组织表中。保存之后写日志方便同步到其它系统中。公司使用的主要技术是SSH。由于是新人没有什么经验,加之时间比较紧迫,最后使用一般的逻辑思想通过递归在hibernate下顺利创建了。可是从现有的组织� ......