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 ...
随机推荐
- Think_php入口文件配置
think_php的入口模式有两种方式 1,一个入口文件对应一个项目应用 2,一个入口文件对应所有项目应用 默认情况,入口文件只需要require thinkphp文件夹就可以.比如thinkphp文 ...
- nodejs操作mongodb数据库封装DB类
这个DB类也算是我经历了3个实际项目应用的,现分享出来,有需要的请借鉴批评. 上面的注释都挺详细的,我使用到了nodejs的插件mongoose,用mongoose操作mongodb其实蛮方便的. 关 ...
- 使用OCR来帮助LR实现认证码识别
位字符或数字,如果不是继续刷新,从请求角度来说应该效率很理想了. Action() { int flen; //定义一个整型变量保存获得文件的大小 long filedes; //保存文件句柄 ]=& ...
- C#语言的基础
一.C#的引入 01..net和C#的区别 1)大概在2000年,微软推出了一种革命性的产品--.NET(战略) 目标:任何人,在任何地方,使用任何终端设备,都可以访问微软提供的服务. 2).net ...
- java多线程-同步块
Java 同步块(synchronized block)用来标记方法或者代码块是同步的.Java 同步块用来避免竞争.本文介绍以下内容: Java 同步关键字(synchronzied) 实例方法同步 ...
- something
var colors=['red','green','yellow']; console.log(colors)//['red','green','yellow'] console.log(color ...
- heX——基于 HTML5 和 Node.JS 开发桌面应用
heX 是网易有道团队的一个开源项目,允许你采用前端技术(HTML,CSS,JavaScript)开发桌面应用软件的跨平台解决方案.heX 是你开发桌面应用的一种新的选择,意在解决传统桌面应用开发中繁 ...
- 推荐几个jQuery插件
jQuery仿京东无限级菜单HoverTree http://www.cnblogs.com/jihua/p/hvtree.html 多级弹出菜单jQuery插件ZoneMenu http://www ...
- 【javascript激增的思考01】模块化编程
前言 之前我做过一个web app(原来可以这么叫啦),在一个页面上有很多小窗口,每个小窗口都是独立的应用,比如: ① 我们一个小窗口数据来源是腾讯微博,需要形成腾讯微博app小窗口 ② 我们一个小窗 ...
- delphi 事件和属性的绑定
TWindowState = (wsNormal, wsMinimized, wsMaximized); TScrollingWinControl = class(TWinControl) priva ...