Setup Database ProviderFrom Kooboo document
Kooboo CMS can almost support all the types of database, include the relational database and No-sql database. Right now, we had implemented five types database provider for text content:xml, SQLCe, SQL Server, MySQL and MongoDB.
XML
The XML provider is a configure-less, structure-less and simplest provider. It is the default provider include with the default release package.
The XML provider is also used on the site exporting/importing function. When exporting one site from the Kooboo CMS with non-default providers, the site would be exported as a site package using The default providers. When the site is being to import into a Kooboo CMS instance with Non-default providers, it'll convert the XML data into the specific database.
highly recommended used in the development, does not used in the production.
SQLCe
SQLCe provider is a relational database similar with SQLite. It is configure-less but has structure tables. Every sites in the same Kooboo CMS instance would have its owner standalone database file. It usually use of the site which each table with less than 50000 rows data.
All the relational database[sqlce,sqlserver, Mysql] has the same characteristic is they would always the dynamic tables fo R each content type, but it transparent to the users.
Usage:
- Download the content_providers.zip.
- Copy the files under "SQLCe" into the BIN folder of Kooboo CMS.
SQL Server
SQL Server provider has the modes:
- Standalone mode. Each site would has its database file. In this mode, the user has to provide the "createdatabasesetting" connection string which has CREATE DATABASE permission . The site would using the connection setting in the ' Connections ' section.
- Shared mode. All the sites in the same instance would use the same database. In this mode, the user has to set "Sharingdatabase" as "True", set the "Sharingdatabaseconnectionstring".
Usage:
- Download "Content_providers.zip".
- Extract the zip file. Copy the files under "SQL Server" include "Sqlserver.config" into BIN folder of Kooboo CMS.
- Create a new database or use the existing database, we call it "Kooboo CMS".
- Edit the "Sqlserver.config" to specify the connection strings.
<sqlserversettingsxmlns="Http://schemas.datacontract.org/2004/07/Kooboo.CMS.Content.Persistence.SqlServer"Xmlns:i="Http://www.w3.org/2001/XMLSchema-instance"><connections><connectionsetting><connectionstring>Server=.\SQLExpress;Database=Kooboo_CMS; Trusted_connection=yes;</connectionstring><name>sample</name></connectionsetting></connections><createdatabasesetting>Server=.\SQLExpress;Database=Kooboo_CMS; Trusted_connection=yes;</createdatabasesetting><sharingdatabase>true</sharingdatabase< Span style= "color: #000000; Font-weight:bold; " >> < Sharingdatabaseconnectionstring>server=.\sqlexpress;d Atabase=kooboo_cms; Trusted_connection=yes; </ Sharingdatabaseconnectionstring> </sqlserversettings>
MySQL
MySQL provider usually used on Mono/*unix, and some shared web hosting does not support SQL Server.
Usage:
- Download "Content_providers.zip".
- Extract the zip file. Copy the files under "MySQL" include "Mysql.config" into BIN folder of Kooboo CMS.
- Create a new database or use the existing database, we call it "Kooboo CMS".
- Edit the "Mysql.config" to specify the connection strings.
<mysqlsettingsxmlns="Http://schemas.datacontract.org/2004/07/Kooboo.CMS.Content.Persistence.Mysql"Xmlns:i="Http://www.w3.org/2001/XMLSchema-instance"> <connectionstring>server=127.0.0.1;database=kooboo_cms ; Uid=root; PWD=;CHARSET=GBK; </connectionstring> <default_charset>utf8</default_charset< Span style= "color: #000000; Font-weight:bold; " >></mysqlsettings>
Mangodb
Mangodb is a key-value database. It usually used in the site has a lot document but has few relations.
Usage:
- Download "Content_providers.zip".
- Extract the zip file. Copy the files under "MySQL" include "Mongodb.config" into BIN folder of Kooboo CMS.
- Install the MONGODB server.
- Edit the "Mongodb.config" to specify the connection strings.
<databasesettingsxmlns="Http://schemas.datacontract.org/2004/07/Kooboo.CMS.Content.Persistence.MongoDB"Xmlns:i="Http://www.w3.org/2001/XMLSchema-instance"> <connectionstring>mongodb://localhost</connectionstring > <sharingdatabase>false< Span style= "color: #000000; Font-weight:bold; " ></sharingdatabase></databasesettings>&NBSP;
Site migration between different Kooboo CMS instance with different providers
Migrating the site between different Kooboo CMS instances is a really great feature. For Example:we can develop the site under the XML provider instance, but want to deploy the to another production Instanc E with SQL Server.
Usage:
- Exporting the site from the old instance.
- Download a new "Kooboo_cms.zip".
- Extract the "Kooboo_cms.zip", doing some configurations.
- Setup the new Web site on IIS.
- Start the new Web site, and importing the exported site.
How to switch the database in Kooboo (NOTE: If you switch the database, you need to kooboo there is not a website or else the database does not have tables or the like)