You are on page 1of 40

SharePoint

Database Schemas

James Sturms
Agenda
 Caveats
 Configuration database
 Content databases
 Best practices
 Hints and Tips
 Conclusion
Caveats
 Direct database access is unsupported!
 Upgrades will break your solution
 Upgrade may delete your data/schema
 Some changes will break SharePoint
 Use the object model if possible!
 Windows MSDE is restricted
 For use by Windows system components
 Only signed schema allowed
 Upgrade Beta2 w/MSDE will delete foreign objects
Configuration Database

 Core Configuration Load Balancing


 Sites
 Virtual Servers
 Databases Web Web Web
 Web Farm
 Services
Config
 Servers DB DB
 Global tables
Core Configuration

 Virtual server has many databases


 Databases have many site collections
Configuration Database

 Core Configuration Load Balancing


 Sites
 Virtual Servers
 Databases Web Web Web
 Web Farm
 Services
Config
 Servers DB DB
 Global tables
Web Farm

 Servers can host multiple services


(database & web)
 Multiple servers for each virtual server
instance
 IIS virtual server ID to SharePoint ID in
registry
Configuration Database

 Core Configuration Load Balancing


 Sites
 Virtual Servers
 Databases Web Web Web
 Web Farm
 Services
Config
 Servers DB DB
 Global tables
Global Config Tables
 Globals (farm-wide configuration)
 Anti Virus Vendors
 Custom Templates
 Web Part Packages
 What’s available in the farm
 Installed Web Part Packages
 What’s available in each virtual server on
each machine in the farm
Content Databases
 Core content
Load Balancing
 Web parts
 Alerts
 Security Web Web Web

 Doc management
Config
 Web management DB DB
 Global tables
Core Content
 Sites
 Site collections

Sites Webs Docs


 Webs
 Web sites
 Docs
User
Lists
Data
 Files & folders
 Lists
 List metadata
 User Data
 List items
Sites
 ID  Configuration DB
 Full URL
 Creation time name
 Owner & 2nd Contact
 Not security!
 Quotas
 Disk, users
 Bandwidth not used
 Search optimization
 Last change time stamps
Webs
 Server-relative URL
 Parent web ID
 Site Settings
 FrontPage
 Navigation, usage, etc.
 Usage
 MetaInfo
 Theme
 ACL (security)
Docs
 Path
 Directory Name
 Leaf Name (file)
 Size (quotas)
 Shared content
 Setup path
 Content on demand
 Check in/out
 Sandboxed edits
 Trigger for deletes (quota)
Lists
 Name & description
 Type
 Doc library, survey, etc.
 Fields
 ACL (security)
 List-level access control
 Event handler
 Email inserts
User Data
 Built-in fields
 Version
 Author/Editor
 Create/Modify date & time
 Quota (size)
 Custom fields
 Very wide table
 Sparsely populated
 Trigger for deletes (quota)
Content Databases
 Core content
Load Balancing
 Web parts
 Alerts
 Security Web Web Web

 Doc management
Config
 Web management DB DB
 Global tables
Web Parts
 Web Parts
Web
 Shared parts
Docs
Parts  Personal parts
 View CAML

 Personalization
 Personalized
Personalization
properties
Web Parts
 Page URL
 What page contains part
 Zone
 Where on the page
 Order within zone
 Personal parts (User ID)
 View parts
 CAML for SharePoint views
Personalization
 User
 Zone
 Ordering
 Part properties
 Specific to part
Content Databases
 Core content
Load Balancing
 Web parts
 Alerts
 Security Web Web Web

 Doc management
Config
 Web management DB DB
 Global tables
Alerts
 Event Cache
 All “alertable”
Event Immed events
Cache Subscriptions
 Skipped if no alerts
 Event Log
 Events for
scheduled alerts
Sched Event
Subscriptions Log (not immediate)
 Immed
Subscriptions
 Immediate alerts
 Sched
Immediate Alerts
 Immediate Alerts
Timer Job
Event Immed
Cache Subscriptions  Every 5 minutes
 Join cache and
subscriptions
Timer  Send email with
Job
results

Alert Email
Scheduled Alerts
 Immediate Alerts
Event Sched Timer Job
Cache Subscriptions
 Every 5 minutes
 Join cache and
subscriptions
Timer  Queue alerts to log
Job
 Flush cache
 Send Alerts
 Daily
Event Timer Alert
Log Jobs Email  Weekly
Content Databases
 Core content
Load Balancing
 Web parts
 Alerts
 Security Web Web Web

 Doc management
Config
 Web management DB DB
 Global tables
Security
Site
 User Info
Site
Groups
Group
Membership
 Display information
User  Site collection admin
Info

Web Web
 Web Members
Group
Groups Membership
 User to Web map
Web
 STS Token
Members  Web Groups
 NT Users & Groups
 Site Groups
 Site Groups
 NT Users and Groups
User Info
 Login name
 Title
 Email
 System ID
 NT User Token
 Delete and recreate user

 No deletes!
SharePoint Groups

 Web groups can contain:


 NT users and groups (User Info)
 Cross-site groups (Site Groups)
Content Databases
 Core content
Load Balancing
 Web parts
 Alerts
 Security Web Web Web

 Doc management
Config
 Web management DB DB
 Global tables
Document Management
Doc HT
Links Categories ComMd Deps
Versions Cache

 Document hyperlinks (Links)


Docs  Categories
 Discussions (ComMd)
 Dependencies (Deps)
 Version History (DocVersions)
 HTML Transformations (HT_Cache)
Content Databases
 Core content
Load Balancing
 Web parts
 Alerts
 Security Web Web Web

 Doc management
Config
 Web management DB DB
 Global tables
Web Managemnt
 NavNodes
 FrontPage navigation structure
 WebCat
 FrontPage web categories
Content Databases
 Core content
Load Balancing
 Web parts
 Alerts
 Security Web Web Web

 Doc management
Config
 Web management DB DB
 Global tables
Global Tables
 Welcome Names
 http://server  http://server/default.aspx
 SharePoint does not honor IIS settings
 Timer Lock
 Which web server is handling timer jobs
 Time of last lock refresh
 Disk Warning Date
 Time of last quota warning timer job
 System Version
 Build-to-build upgrades
 HT Settings
 HTML Transformations settings
Portal Areas
 CatDef – Area definitions
 CatJoint – Area listings
 CatKeyword – Area Keyword
 CatGroup – Area group
 CatPath – Area hierarchy
 CatOrgleList – Audience
targeting
 PortalPermDelta – Security
cache invalidation
 CatPredefined – Cache
optimization
 CatBucketInfo – Index
optimization
 PortalPerm – Area ACL
 PortalPermInfo – Area ACE
Portal Databases
 Profile Database
 Personal profiles, audience targeting
 Services Database
 Search and indexing support
 Subscriptions and subscriptions results
 Single Sign-On Database
Best Practices
 Read-only
 Editing SharePoint data directly is dangerous
 Data integrity not enforced by schema
 Additive changes
 New tables
 Beware adding foreign keys to SharePoint tables
 Multiple-user performance testing
 Beware the table scan (query using indexes)
 Don’t mess with SharePoint indexes!
 Beware locking characteristics (e.g. dead locks)
Hints and Tips
 SQL Profiler
 Watch SharePoint and learn!
 Restart IIS to flush configuration cache

 Query Analyzer
 Show Execution Plan
Conclusion
 Direct database access
 Lots of power available
 Lots of danger to SharePoint
 Lots of danger to your solution
 Upgrades will break
 SharePoint upgrades will break your application
 Your changes may break SharePoint’s upgrade
 Test the impact of your changes at scale
 Multiple user performance (how fast)
 Scalability (how many)

You might also like