Configuring Database Providers

Although Graffiti's default database is VistaDB, Graffiti also supports Microsoft Access and SQL Server.

VistaDB

VistaDB is your default database and is configured during installation.

Access

It really depends on what you are trying to accomplish with your site. If you are running a personal blog or a simple site with just a couple of pages, Access should work very well for you. However, if your goal is to build a large site with lots of content, you should probably use SQL Server.

Access provides a very lightweight option which requires almost no setup and maintenance is as easy as periodically downloading a backup copy of your and storing it locally.

SQL Server

SQL Server is an enterprise grade database option which is ideal for heavily traffic sites.

Note: There is not yet an Access to SQL Server tool. We will provide one in the near future, but there is no date available yet.

How do I setup my database?

VistaDB

VistaDB is ready and configured out of the box. Assuming you followed the initial install steps and granted Graffiti (via ASP.Net) write access to your Web site's directory, there really shouldn't be anything for you to do.

Access

Here is how you can switch from VistaDB to Access:

  1. Copy Graffiti.mdb from /Data to /App_Data.
  2. Update the web.config file found in the root of your Web site:  
    • Connection string

        <add name="Graffiti" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DATADIRECTORY|\Graffiti.mdb;Persist Security Info=True" />

    • Data provider

        <add key="DataBuddy::Provider" value="DataBuddy.MSAccessProvider, DataBuddy"/>

  3. Save the web.config file.

SQL Server

The steps to setting up SQL Server are very simple:

  1. Create a new database (you can use an existing database).
  2. Execute the Graffiti_SQL_Schema.sql file found in the Data folder.
  3. Execute the Graffiti_SQL_Data.sql file found in the Data folder.
  4. Add the connection string of your database to the web.config file. It should have the name "Graffiti":
    <add name="Graffiti" connectionString="server=SERVER;uid=;pwd=;Trusted_Connection=yes;database=DATABASE_NAME"/>
  5. Change the AppSetting key DataBuddy::Provider value to DataBuddy.SQLDataProvider, DataBuddy in the web.config file.

Note: If you are using SQL Server 2005, for Step 5 you can use a provider that is specific to SQL Server 2005: DataBuddy.SQL2K5DataProvider, DataBuddy. This should further improve performance.