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分布式事务解决方案
适用环境
操作系统:windows 2003
数据库:sql server 2000/sql server 2005
使用链接服务器进行远程数据库访问的情况
一、 问题现象
在执行分布式事务时,在sql server 2005下收到如下错误:
消息 7391,级别 16,状态 2,过程 xxxxx,第 16 行
无法执行该操作,因为链接服务 ......
在微软的SQL Server系统中通过有效的使用索引可以提高数据库的查询性能,但是性能的提高取决于数据库的实现。在本文中将会告诉你如何实现索引并有效的提高数据库的性能。
在关系型数据库中使用索引能够提高数据库性能,这一点是非常明显的。用的索引越多,从数据库系统中得到数据的速度就越快。然而,需 ......
ALTER DATABASE AdventureWorks ADD FILEGROUP [2003Q3]
创建文件组后,使用 ALTER DATABASE 将文件添加到该文件组中。
ALTER DATABASE AdventureWorks
ADD FILE
(NAME = N'2003Q3',
FILENAME = N'C:\AdventureWorks\2003Q3.ndf',
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB)
TO FILEGR ......
--查询当前连接的实例名
select @@servername--察看任何数据库属性
sp_helpdb master
--设置单用户模式,同时立即断开所有用户
alter database Northwind set single_user with rollback immediate--恢复正常
alter database Northwind set multi_user
--察看数据库属性
sp_helpdb--察看数据库恢复模式
selec ......