Designing Tables for a Cloud Application

By Jennifer Marsh

Jennifer Marsh is a software developer, programmer and technology writer and occasionally blogs for Rackspace Hosting.

Table design formats lay out the data for all of the business cloud applications. The database design dictates the speed at which the application runs, and a good table design helps make application development for the business cloud applications more efficient. As a result, less code is needed to create the cloud application, and a fewer timeout issues on the cloud application stemming from the database.

Separate Tables into Components for the Site

Normalization is a type of table design that ensures data is not repeated and integrity secured across the database. The difficult part for any cloud application designer is understanding normalization and how tables must be created.

An easy way to design tables for a new developer is to separate the application into components. For instance, an e-commerce application needs sections for customers, orders, shipping details and payments. These sections require corresponding tables. Use this basic idea to create tables for the cloud application.

Use “varchar” and not “text” Columns

The varchar data type lets the programmer contain any string characters in a table column. When transferring data from other applications such as Microsoft Access, the wizard for database such as SQL Server sets the column as a “text” data type. The text data type lets the programmer work with much longer strings, but too many of these columns hurt performance. Additionally, the programmer cannot search on these fields, so they are only capable of displaying information.

Always Use Referential Integrity

Referential integrity is often undefined in table designs to make it easier for developers. Referential integrity implements primary and foreign keys that link table columns together for joins. However, referential integrity also stops orphaned records, which is an unfortunate casualty of incomplete database transactions.

Referential integrity protects the data inserted and deleted in a table, so records are not orphaned and lost after a faulty transaction. For instance, referential integrity does not allow a customer to be deleted when an order record for that customer exists.

Create Descriptive Column Names

Secondary to performance is naming conventions. Naming conventions help describe the column for programmers. Programmers need to identify columns to find data, and they need column names to join tables to each other in the cloud application queries.

For instance, each table must have an identification column. This column is part of a unique clustered index. For the customer identification field, name it “CustomerId.” This identification column describes the data, so the programmer is able to easily identify the right column in the table design.

These tips help design and speed up the database, especially for newer programmers unfamiliar with table design. As long the programmer identifies the components and necessary columns, a database design can simplify the development process and speed up application performance.