Database.com – Another database in the cloud
Database.com is an enterprise level cloud database service offered by Salesforce.com. The platform is highly scalable so as your database needs grow with time, this cloud database system will scale up nicely. In addition Database.com is highly available so you do not have to worry about a database server going down as your databases are replicated throughout the server farm at Salesforce.com. This database platform is supported for Java, .Net and other platforms. One cool feature is development and stage environments are already set up for you from the get-go. The best part I like about Database.com is that it is free to use when you have less than 3 users and then the number of records in your cloud database is below 100,000.
Create an account with Database.com
Before we create a database with Database.com, we need to create an account. You can go to this site:
You will need to click on the Login/Signup link in the top right corner. Go ahead and enter information regarding your name, username, company and email address. Next you will get account activation information via email and you will need to follow instructions. Finally it will take you back to the Salesforce.com site where you have the ability to create a new password and security question.
Database.com layout – System Overview
Once you log into your account, you will see System Overview. This is the main dashboard with all the information related to your cloud database account. In the middle section, you have information on your database schemas, users and business logic within the dashboard. Here a screen capture of what it looks like:
In the left pane, you will see the following sections:
Personal Setup: Breakdown of basic account information
App setup: Here you can create objects (database tables) and deployment tasks
Administration Setup: You can perform critical tasks related to database administration like managing users, security controls data management and monitoring
Create a new table in database.com
We’re going to use App setup to create a new database table Customer_list. After we enter the table name, some system fields are created by default including: CreatedBy, LastModifiedby and Owner. After that we create a custom field, choose the data type and the field size. Here is more information on the fields:
|Data Field||Data Type||Field Size|
How to insert or load data into Database.com table?
Now that we have the table ready in our cloud database, we need to load some customer data. In order to do that, first we need to get our customer data in a .csv (comma separated) file format. We will need information for our custom fields, CompanyName, City, Country, Phone and two additional fields CustomerListName (unique identifier) and Owner. Here is the link to the .csv file we are going to use.
We’re going to use the Custom Object Import Wizard to load the data from the file to our cloud database table that we just created above.. Here is the path you need to follow:
Admin Setup – Data Management – Import Custom Object
After you start the wizard, you can follow the steps to import the file. We can also use this step to create mapping between the source field and the target field.
Browse the customer data in our Cloud database table
Finally we are going to look at the data using SQL. For database.com, we’re going to use the Workbench which is a free hosted tool that will help you write queries against your data from Database.com. Here’s the website:
You can login using your existing credentials. Under Select an action to perform. use the following:
Jump to: SOQL Query
In the next window, you will be able to select objects, fields and criteria to build a SOQL query. Under object, you will see CustomerList__c. Using Ctrl key go ahead and select these fields, City__c, CompanyName__c, Country__c, Phone__c. you will notice that as you are selecting these, it will generate the actual SQL statement. Here is what the workbench looks like on our computer monitor:
We have included the sql statement right below.
SELECT City__c,CompanyName__c,Country__c,Phone__c FROM CustomerList__c
When you click on Query it will go ahead and return the actual data from the table. Here is part of the screen shot of what it looks like.
Overall we are satisfied with using Database.com. One thing we struggled is the familiarity with SOQL query language syntax or the Apex language that they use. Regardless that is a viable alternative to SQL azure. Part of this tutorial is also available as a video. We have included the download link below. For an interesting article on pricing between the two, please visit the first link under Related Links.