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 ...
随机推荐
- 【Java每日一题】20161104
package Nov2016; public class Ques1104 { private String num; public void setNum(String num){ num = n ...
- Sql--列操作
Oracle的列操作(增加列,修改列,删除列),包括操作多列增加一列: alter table emp4 add test varchar2(10);修改一列: alter table emp ...
- 解决WindowsServer 2008 R2 未注册版一个小时自动强制关机
仅用来学习交流,请大家购买正版,尊重正版版权. 安装了win2008R2,试了很多激活方法,终于激活后,不知道什么原因,过了一段时间后,每隔一段时间就自动关机,查了一下,发现是 wlms.exe在作祟 ...
- 两个与spring事务相关的问题
有些spring相关的知识点之前一直没有仔细研究:比如spring的事务,并不是没有使用,也曾经简单的在某些需要事务处理的方法上通过增加事务注解来实现事务功能,仅仅是跟随使用(甚至并未测试过事务的正确 ...
- knowing abstract,virtual,override,new
If a class has at least one member which modified by "abstract",this class is an abstract ...
- 【循序渐进学Python】15.网络编程
Python 内置封装了很多常见的网络协议的库,因此Python成为了一个强大的网络编程工具,这里是对Python的网络方面编程的一个简单描述. 1. 常用的网络设计模块 在标准库中有很多网络设计相关 ...
- css知多少(3)——样式来源与层叠规则
上一节<css知多少(2)——学习css的思路>有几个人留言表示思路很好.继续期待,而且收到了9个赞,我还是比较欣慰的.没看过的朋友建议先去看看上一节. 这一节就开始实践上一节的思路! 1 ...
- 小伙伴们惊呆了!10行 JavaScript 实现文本编辑器
最近,我需要做一个非常基本的网页内容编辑功能.我不想使用 iframe ,我也不想要一个功能特别多的复杂编辑器,只需要很基本的内容编辑功能,例如粗体,斜体,列表,对齐等等. 您可能感兴趣的相关文章 分 ...
- ASP.NET多文件上传实例
在Web应用程序开发中,避免不了要用到上传文件这个功能,但以前上传文件是个很麻烦的事,现在有了.NET,文件上传变得轻而易举.下面的这个例子实现了多文件上传功能.可以动态添加输入表单,上传的文件数量没 ...
- JScript中的条件注释详解(转载自网络)
JScript中的条件注释详解-转载 这篇文章主要介绍了JScript中的条件注释详解,本文讲解了@cc_on.@if.@set.@_win32.@_win16.@_mac等条件注释语句及可用于条件编 ...