SharePoint Content Database简介
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简介的更多相关文章
- EXTRACT FILES AND IMAGES FROM A SHAREPOINT CONTENT DATABASE
If you ever had the problem where you need to extract files from a SharePoint Content Database or no ...
- This content database has a schema version which is not supported in this farm.
I want to move the website to another server. The new server has reinstall Sharepoint2013 serv ...
- 如何从SharePoint Content DB中查询List数据
SharePoint用来维护基础数据非常方便,只需要建立自定义列表,然后使用InfoPath自定义一下维护界面,就可以实现在线的增删改查,开发效率很高.如果维护的数据需要进行审批,还可以加入工作流功能 ...
- SharePoint Config database Log file too big – reduce it!
SharePoint Config database logs are one thing to keep an eye on since they do have a tendency to gro ...
- Android Content Provider简介
Content Provider是Android的四大组件之一,与Activity和Service相同,使用之前需要注册: Android系统中存在大量的应用,当不同的应用程序之间需要共享数据时,可以 ...
- sharepoint content type publishing
1. Create 1 Project Team sites (Site1) on SharePoint(可以用普通site)2. Go to http://<PCName>:8080/_ ...
- DEDECMS5.5怎样调用{dede:field.content/}做简介之类的单独页面?
很多时候,如果用dede来做一些企业公司网站,或者一些部门网站的时候.需要某些栏目是一个单页的文章,用于公司简介或者企业文化之类的.那么就要用到栏目功能的栏目内容,也就是dede的content标签. ...
- SharePoint 2010 安装简介及相关补丁下载
转:http://www.cnblogs.com/jianyus/archive/2011/10/28/2228212.html 1.安装Windows Server 2008 系统,这个我就不说了, ...
- [SharePoint] SharePoint 错误集 2
1 Run command “New-SPConfigurationDatabase" Feature Description: error message popup after run ...
随机推荐
- No.016:3Sum Closest
问题: Given an array S of n integers, find three integers in S such that the sum is closest to a given ...
- HDU 3328 Flipper 栈 模拟
首先想说,英语太烂这题读了很长时间才读懂......题意是说输入有几张牌,然后输入这些牌的初始状态(是面朝上还是面朝下),然后输入操作方式,R表示翻一下右边的牌堆,L表示翻一下左边的牌堆,直到最后摞成 ...
- Python中类的定义
class Student(object): # 有点类似其它高级语言的构造函数 def __init__(self,name,score): self.name = name self.score ...
- spring amqp rabbitmq fanout配置
基于spring amqp rabbitmq fanout配置如下: 发布端 <rabbit:connection-factory id="rabbitConnectionFactor ...
- (转)T-SQL查询处理执行顺序(一)
对于T-SQL编程,用得最广泛的,莫过于查询(Querying).要想写出高质量.高性能的查询语句,必须深入地了解逻辑查询处理. 一.逻辑查询处理的各个阶段 (5)SELECT DISTINCT TO ...
- 免费素材:包含 250+ 组件的 DO UI Kit
DO UI kit 现在可以免费用于 Photoshop 和 Sketch 了.它有超过130个屏幕,10个完整的主题以及250+的组件混合以创造惊人的应用.他们都是再混合和视网膜.最重要的是他们看起 ...
- div水平居中
1.先给它外层的div定位并left:position:absolute;left:50%; 2.获取当前元素div的宽度,并除以2 3.改变它的css:margin-left:-(获取当前元素div ...
- document.querySelector和querySelectorAll方法
querySelector和querySelectorAll是W3C提供的新的查询接口,其主要特点如下: 1.querySelector只返回匹配的第一个元素,如果没有匹配项,返回null. 2.q ...
- JavaScript学习06 JS事件对象
JavaScript学习06 JS事件对象 事件对象:当事件发生时,浏览器自动建立该对象,并包含该事件的类型.鼠标坐标等. 事件对象的属性:格式:event.属性. 一些说明: event代表事件的状 ...
- Android 视频播放器 VideoView 的使用,播放本地视频 和 网络 视频
1.布局文件 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:and ...