Interpretation ASP.NET Portal Starter Kit (1) - Database

xiaoxiao2021-03-05  24

The ASP.NET Portal Starter Kit database structure is generally consisting of a core table (user table, role table and role table) of the website engine and various user modules. The core table stores configuration information for user permissions of the entire website (detailed usage and instructions will be placed in "role authentication articles"). Each user module stores information of each functional module. Each user function module table is independent. This is conducive to the new module extension. At the same time, the tables of each function module can be deployed to different databases in different databases to improve the high scalability and scalability of the program. The access method of data is performed through the stored procedure. The benefits of doing this: 1. Improve the performance of the database; 2, eliminate SQL injection attacks (should be on my understanding); 3, the permissions that can connect to the SQL Server database user can only be configured You can perform operations for the specified stored procedure so that the security of the database is further improved.

Table in the database:

Portal_announcements: Announcement Information Form (used in the announcement information module)

Field Name Type Meaning Remarks ItemIDINT Link ID Primary Key (Auto Number) ModuleIDINT The module ID determines that the announcement is displayed in that module (module ID: User profile portalcfg.xml module table ID, below) CreatedByusernvarchar (100) creation Record Create and Modify User CreatedDatedateTime Create Time Record Creating and Modifying This Announcement Time TitleNVarchar (100) Name MoreLinknvarchar (150) More Details Link MobileMoreLinknvarchar (150) Mobile Detail Link Address On "Mobile device browser" More details Link Address EXPIREDATEDATETIME Effective Date DescriptionNVARCHAR (2000) Description

Portal_Contacts: Contact information table (used in contact modules)

Field Name Type Meaning Remarks ItemIDINT Link ID Primary Key (Auto Number) ModuleIDINT The module ID determines that the contact information shows CREATEDBYUSERNVARCHAR (100) creator record creates and modify the contact information Create time record creation and modify the contact Method time NAMENVARCHAR (50) Contact Name Rolenvarchar (100) Contact Role Unlike the role in the system frame, understand the position more suitable Emailnvarchar (100) Contact Email Contact1nvarchar (250) Contact 1 Contact2nvarchar (250) Contact 2

Portal_Discussion: User Discussion Message Meter (User Discussion Module)

Field Name Type Meaning Remarks ItemIDINT Link ID Primary Key (Auto Number) ModuleIDint The module ID determines that the discussion shows TitleNVarchar (50) discussion Title CreatedDatedateTime Create time record to create the discussion Bodynvarchar (100) Message content CreatedByusernvarchar (100) The creator record creates and modifies the discussion of the discussion of the discussion of the discussion to record the time of the discussion of the reply and the time submitted by itself (can be used as a discussion message sorting and display reply)

Portal_Documents: User Upload Document Meter (used in display document information module)

Field Name Type Meaning Remarks ItemIDINT Link ID Primary Key (Auto Number) ModuleIDINT The module ID determines that the contact information shows CREATEDBYUSERNVARCHAR (100) creator record creates and modify the contact information Create time record creation and modify the contact Way FileNameurlnVarchar (250) Upload FileFriendlyNamenvarchar (150) Document Name in the server Different in the system frame, understand the position more suitable CategoryNVARCHAR (50) Category ContentImage content (binary) Upload content in the database ContentTypenvarchar (50) Type Type Upload file Type ContentSIZEINT Size Upload Size Portal_Events: Event Meter (used in modules show event information)

Field Name Type Meaning Remarks ItemIDINT Link ID Primary Key (Auto Number) ModuleIDint The module ID determines that the event is displayed in that module CreateDByUsernvarchar (100) creator record Create and modify the event of the event to create and modify the event. TITLENVARCHAR (100) Event Name Wherennvarchar (150) Procedure Descriptionnvarchar (2000) Description ExpiredatedateTime Effective Date

Portal_htmlText: Static HTML information table (used in modules showing static static HTML, available for display news, etc.)

Field Name Type Meaning Remarks ModuleIDINT The module ID determines that the static HTML is displayed in that module (primary key, limited one module only corresponds to a static HTML file) DesktophtmlnText Desktop HTML content MobileSummaryNText Mobile Summary MobileDetailSntext displayed on the "Mobile device browser" Details displayed on the "Mobile Device Browser"

Portal_links: Link Information Table (Quick Link Module and Connection Module)

Field Name Type Meaning Remarks ItemIDINT Link ID Primary Key (Auto Number) ModuleIDint The module ID determines that the link display CreateDByUsernvarchar (100) creation and modify the user createDateTime creation time record Create and modify the link time TITLENVARCHAR (100) Name URLNVARCHAR (250) Link Address Mobileurlnvarchar (250) Mobile Link Addorderint Sort Number DescriptionNvarChar (2000) Description

Portal_Roles: Role Information Table (Portal Engine Core Table)

Field Name Type Meaning Remarks ROLLIDINT Role ID Primary Key (Auto Number) Portalidint Portal URL ID Candle Sets Multiple Portal Site and Sharing a database, distinguishing the RoleNamenvarchar (50) role name with MD5 encryption by PortalID

Portal_UserRoles: User Role Relational Table (Portal Engine Table)

Field Name Type Meaning Remarks UserIDint User ID Association User Information Table (Portal_Roles) RoleIDint Role ID Management Role Information Table (Portal_Users)

Portal_Users: User Information Table (Portal Engine Table)

Field Name Type Meaning Remarks UserIDint User ID Primary Key (Auto Number) NAMENVARCHAR (50) User Name Passwordnvarchar (50) Password Adding Emailnvarchar (100) User Email User Email User Email User Email User Email User Email User Email, and Set to Unique Index (Prevent Registration Same Email, after setting the program, when there is the same Email insertion, the program will throw an exception, capture this exception, it can determine whether the email is repeated, so that the code to determine if the email is repeated) The stored procedure in the database:

Stored Procedures Name Description Portal_AddAnnouncement Add a new announcement Portal_AddContact Add New Contact Portal_AddEvent add a new event to add a new link Portal_AddMessage new Portal_AddLink a new discussion message, which is the parameter @ParentID reply mail Id, find DisplayOrder the message by the ID, Plus the new message is the new message of the DISPLAYORDER.

Portal_AddRole add role information Portal_AddUser add a new user, add the user returns the user's role IdPortal_AddUserRole relationship Portal_DeleteAnnouncement delete information bulletin (Note: The following section unless otherwise noted delete the specified ItemID are deleted information) Portal_DeleteContact Contact Portal_DeleteDocument delete delete users to upload documents Portal_DeleteEvent deleting the event information Portal_DeleteLink delete the link information Portal_DeleteModule when removing a module, linkage to delete all information Portal_DeleteRole the module related to delete role information Portal_DeleteUser delete user Portal_DeleteUserRole delete a role customer relationship Portal_GetAnnouncements ModuleID (module ID) returns bulletin information Portal_GetAuthRoles like within the validity period in accordance with It is not used to store the stored procedure, and the stored procedure is not in the table database (similar in the user profile), you need to study Portal_GetContacts in-depth research returning contactless PORTAL_GETDocumentContent according to documentation (ItemID) ) to obtain document information Portal_GetDocuments stored in the database ModuleID (module ID) returns the user to upload the document information Portal_GetEvents according to ModuleID (module ID) returns the event information Portal_GetHtmlText within the validity period according to ModuleID (module ID) returns a static HTML text information Portal_GetLinks according to according to ModuleID ( module ID) return connection information, press (viewOrder) Sort No. Portal_GetNextMessageID acquired Portal_GetPortalRoles discussed next message gets the specified portal site (designated PortalID) all of character information acquired Portal_GetPrevMessageID discussed character corresponding to the previous message ID acquired Portal_GetRoleMembership according to the character User member information Portal_getrolesbyuser Gets a user based on user email information Portal_getsingleannouncement based on the announcement (ItemID), get a single The information of the announcement portal_getsinglecontact Depending on the contact information, obtain the information of a single contact information portal_getsingleDocument, obtain the information of the single document according to the document (ItemID), get the information of the information, according to the link (itemid) Get a single link information portal_getsingleMessage Depending on the message of the message, obtain the information portal_getysinglerole according to the role ID, obtain the information portal_getthreadeuser's information of the single user according to the user email, and obtains the DisplayOrder, which is based on the DISPLAYORDER of the Father.

转载请注明原文地址:https://www.9cbs.com/read-35754.html

New Post(0)