Ashamed to say, our SharePoint Intranet Portal ran for 2 years, overwhelmed, the amount of data is not very large, the library has about 60GB, data volume tens of thousands of, in short, for a variety of reasons, the website speed is very slow, specific problems studied for a long time, also can not solve, all consider using NET Web site, Data migration also leads to the problem of data migration.
Thinking: Because SharePoint architecture and net have different characteristics, and SharePoint database design is unknown (of course, we can understand some, but not complete), although it is also based on the net architecture, but we are very difficult to do SQL to SQL way. So, you can only consider the server-side object model, the way you insert it into the database, in which the manager gives a reasonable suggestion that the SharePoint data be sorted into the intermediate library and then consolidated into the new Web site database. In later practice, it is found that this method is very helpful for data migration and checking, avoiding errors in many SharePoint object models, but not correcting them.
Intermediate Library Design:
In view of the original intranet portal has a list, document library, picture library three main types (special list special treatment), so created two database tables, respectively, to save list and doclib, You can also create two table images and attachment to save the pictures and list attachments in the body of the list (document library documents as list attachments).
A table that is used to store the contents of the list--table [dbo]. [List]
[ID] [int] IDENTITY (1,1) NOT NULL,--primary key ID
[WebID] [nvarchar] (max) NULL,--the GUID of the Web site
[listid] [nvarchar] (max) Null,--the GUID of the list containing
[listname] [nvarchar] (max) null,--list name
[ContentType] [nvarchar] (max) null,--the owning content type
[ ItemID] [nvarchar] (max) NULL,--list ID
[approvalstate] [int] null,--approval Status
[title] [nvarchar] (max) null,--title
[subtitle] [nchar] (a) NULL,--subtitle
[Itemcontent] [nvarchar] (max) Null,--content
[Creator] [nvarchar] (max) null,--creator LoginName
[Creatorid] [nvarchar] (max) null,--creator UserID
[dispcreator] [nvarchar] (max) NULL,--creator username
[Modifier] [nvarchar] (max) Null,--modifier loginname
[modifierid] [nvarchar] (max) null,--modifier userid
[dispmodifier] [nvarchar] (max) null,-- Modified by username
[Creattime] [datetime] NULL,--creation time
[Modifytime] [datetime] NULL,--modified
[Transferdate] [ DATETIME] NULL,--Data Migration time
Tables used to store the document library/Picture library-table [dbo]. [DocLib]
[ID] [int] IDENTITY (1,1) NOT NULL,--primary key ID
[WebID] [nvarchar] (max) NULL,--the GUID of the Web site
[listid] [nvarchar] (max) Null,--the GUID of the list containing
[listname] [nvarchar] (max) null,--list name
[ListType] [nvarchar] (max) NULL,--list type (document library/Picture library)
[ItemID] [nvarchar] (max) NULL,--ID
inside the list [Approvalstate] [INT] Null,--Approval Status
[title] [nvarchar] (max) null,--title
[Creator] [nvarchar] (max) null,--creator LoginName
[Creatorid ] [nvarchar] (max) null,--creator UserID
[dispcreator] [nvarchar] (max) null,--creator username
[Modifier] [nvarchar] (max) Null,--modifier loginname
[modifierid] [nvarchar] (max) null,--modifier userid
[dispmodifier] [nvarchar] (max) null,-- Modifier username
[Creattime] [datetime] NULL,--creation time
[Modifytime] [datetime] NULL,--modify Time
[URL] [nvarchar] ( max) null,--the URL of the document
[transferdate] [datetime] NULL,--Data Migration time
A table for storing body pictures--table [dbo]. [Image]
[ID] [int] IDENTITY (1,1) NOT NULL,--primary key ID
[WebID] [nvarchar] (max) NULL,--the GUID of the web where it resides
[websuburl] [nvarchar] (max Null,--the relative Weburl
[listid] [nvarchar] (max) null,--the Web, the GUID
[listname] [nvarchar] (max) null,--list name
[ItemID] [nvarchar] (max) NULL,--ID
inside the list [IMAGEURL] [nvarchar] (max) NULL,--The URL of the content picture, multiple pictures, comma separated
The table used to store the attachment set-table [dbo]. [Attachment]
[ID] [int] IDENTITY (1,1) NOT NULL,--primary key ID
[WebID] [nvarchar] (max) NULL,--the GUID of the web where it resides
[websuburl] [nvarchar] (max Null,--the relative Weburl
[listid] [nvarchar] (max) null,--the Web that contains the GUID
[listname] [nvarchar] (max) null--list name
[ItemID] [nvarchar] (max) NULL,--ID
inside the list [Attachurl] [nvarchar] (max) NULL,--The URL of the attachment, multiple times, comma-delimited
Code Method Segment:
The first is that the object model reads the list and then the object model reads the document library/Picture library inserts the DocLib table, reads the field the code to be relatively simple, we do not have too much introduction, introduced in the meantime to encounter several problems, also avoids the code too many too multifarious.