SharePoint作为微软主打的企业Portal平台,功能强大,使用简单,非常的方便。对于很多关系数据,我们可以使用自定义列表来维护,如果是非关系数据,可以使用文档库来维护。另外还可以在上面进行版本维护,工作流审批,而这一切可以不用写一行代码,只需要在界面和SharePoint Designer中进行设置即可完成。

虽然SharePoint很简单,很容易上手,但是对于开发人员来说,维护在其中的数据又怎么和其他系统进行集成呢,我们可以使用3种方法:

  • 在SharePoint Server使用C#程序,调用SharePoint对象模型,读取其中的各种数据。
  • 在客户端调用SharePoint的WebService,读取其中的数据。
  • 直连SQL Server SharePoint Content数据库,使用SQL来读取其中的数据。

前面两种方法,都是官方推荐的,文档详细,介绍较多,我就不讲了,我接下来主要研究如何直接读取SharePoint Content DB的数据。微软官方肯定是不推荐使用这种方法的,因为这个太底层了,完全脱离了SharePoint的控制,如果对其中数据进行直接的修改,那么可能会产生SharePoint无法预期的数据值。不过做数据库应用开发的都明白,这种方法执行效率最高,灵活性最大。为了避免写入无法预期的数据导致SharePoint崩溃,所以我们只是读取SharePoint Content DB,不做任何Update和Delete操作。要读取SharePoint Content DB的数据,首先要对其表结构做给基本的了解。

从网上(http://blogs.technet.com/b/praveenh/archive/2010/12/20/inside-a-sharepoint-content-db.aspx)找的一个简介的表格,介绍了主要的几个SharePoint Content DB Table:

Features Table that holds information about all the activated features for each site collection or site.
Sites Table that holds information about all the site collections for this content database.
Webs Table that holds information about all the specific sites (webs) in each site collection.
UserInfo Table that holds information about all the users for each site collection.
Groups Table that holds information about all the SharePoint groups in each site collection.
Roles Table that holds information about all the SharePoint roles (permission levels) for each site.
All Lists Table that holds information about lists for each site.
GroupMembership Table that holds information about all the SharePoint group members.
AllUserData Table that holds information about all the list items for each list.
AllDocs Table that holds information about all the documents (and all list items) for each document library and list.
RoleAssignment Table that holds information about all the users or SharePoint groups that are assigned to roles.
Sched Subscriptions Table that holds information about all the scheduled subscriptions (alerts) for each user.
ImmedSubscriptions Table that holds information about all the immediate subscriptions (alerts) for each user.

另外再配上了一个图,说明其中的关系。

其中最最重要的就是AllUserData这个表,我们可以从微软MSDN找的一些对几个核心表的介绍:

http://msdn.microsoft.com/en-us/library/hh625524(v=office.12).aspx

这个文档介绍的是最新的SharePoint2013的数据库结构,如果使用SharePoint2010或者07也不用担心,大部分字段都是一样的。如果SharePoint2003,还可以参考官方的另一个文档:

http://msdn.microsoft.com/en-us/library/dd587562(v=office.11).aspx

当然,仅仅有这么几个表还不够,在实际使用中,我们还需要关联其他的表进行联合查询,才能完成我们想要的东西。接下来我会写几个Case,一个一个的分析如何查询对应的表。

【转】SharePoint Content Database简介相关推荐

  1. 彻底删除SharePoint 2010 Content Database

    前几天遇到一个问题,在CA中在Remove content database后,并不是真的从Database上删除数据,而是仅仅从逻辑上移动的Content database.从CA上添加同名的Con ...

  2. 【转】如何从SharePoint Content DB中查询List数据***

    SharePoint用来维护基础数据非常方便,只需要建立自定义列表,然后使用InfoPath自定义一下维护界面,就可以实现在线的增删改查,开发效率很高.如果维护的数据需要进行审批,还可以加入工作流功能 ...

  3. 如何从SharePoint Content DB中查询List数据

    SharePoint用来维护基础数据非常方便,只需要建立自定义列表,然后使用InfoPath自定义一下维护界面,就可以实现在线的增删改查,开发效率很高.如果维护的数据需要进行审批,还可以加入工作流功能 ...

  4. sharepoint 2013/2010/2007 复制工具:SharePoint Content Deployment Wizard

    推荐工具:SharePoint Content Deployment Wizard 可以将网站集.网站.列表.列表项数据在站点间(或服务器间)进行复制,使用了SharePont的Content Mig ...

  5. sharepoint ECMA

    在使用SharePoint ECMAScript之前,我们需要引入几个JS文件: SP.js SP.Core.js SP.Runtime.js SP.js:包含主要的能够用来获取sharepoint数 ...

  6. Sharepoin学习笔记—架构系列--08 Sharepoint的数据模型(DataModel)、数据管理(Data Management)与查询(Query System)

    Sharepoint Foundation中的首要数据结构就是列表(List), 每个List属于某种List Type,与此类似,每个列表中的列(Column)属于某种FieldType,而每一条列 ...

  7. sharepoint数据库研究

    一.程序文件及IIS配置       二.SPS数据库对象分析              2 1.主要数据库表              2 2.主要表及字段              2 3.Win ...

  8. windows wss协议_Windows SharePoint Services(WSS)和SharePoint Server(MOSS)之间有什么区别...

    windows wss协议 Windows SharePoint Services和Microsoft Office SharePoint Server简介 (An Introduction to W ...

  9. Backup and Restore in SharePoint 2010

    参考资料: http://www.mssharepointtips.com/tip.asp?id=1040 http://www.mssharepointtips.com/tip.asp?id=104 ...

最新文章

  1. 用二叉树来理解树状数组
  2. IO对象不可以复制或者赋值
  3. Mysql 查询统计练习
  4. android 新的布局,Android新布局方式ConstraintLayout快速入门教程
  5. Angular 2 之七 依赖注入
  6. 大数据开发面试知识点总结
  7. 使用wget命令镜像网站
  8. android 时间水印相机,水印相机时间打卡
  9. 电脑版微信公众号文章加载不出来,空白的可能解决办法
  10. 金融笔记:货币的概念
  11. 关于各种网站音频mp3的外链地址,真实的外链播放地址
  12. 动环监控串口,动环监控系统接口
  13. PHP内核源码阅读过程(四)
  14. COM总结 - 转自知乎
  15. python : 超参数优化工具笔记 Tune with PyTorch Quick Start+基础概念
  16. 【解决】ArgumentException: GetComponent requires that the requested component ‘XX‘ derives from...
  17. excel 工具的使用---导入txt数据
  18. C语言大作业:车辆管理系统
  19. java程序实现剪刀石头布功能_基于JAVA的剪刀石头布游戏设计——Java课程设计报告_...
  20. js打印数组,js打印对象的方法(100遍)

热门文章

  1. if else的使用以及如何从键盘获取数值
  2. Hibernate查询方式
  3. MySQL中order by中关于NULL值的排序问题
  4. 九度oj题目1518:反转链表
  5. 出口同比中国经济三大怪状折射出啥危机?
  6. CodeForces - 660C Hard Process
  7. HDOJ-1257 最少拦截系统
  8. 【发现问题】IDEA设置全局新创建文件默认换行符
  9. 鳗鱼刺多怎么处理图像_怎么在做鱼前去除鳗鱼刺?
  10. tableau地图城市数据_举个栗子!Tableau 技巧(156):在地图分析中创建缓冲区