Pages Menu
Categories Menu

cPanel: Database Heading

Databases Section

What is a database?

A database is a system that makes organizing, storing, and accessing data easier. It is made up of records; each record is separated into a number of related elements called fields, which contain pieces of data. You can think of a phone book as a sort of metaphor for a database; each listing is a record, and the fields of the record, such as name, address, and phone number, contain data for that record. As another example, a typical record for a product catalog database has separate fields for the product name, price, and other distinct pieces of data related to the product. A collection of records in a database is known as a table. A database can be made up of a single table or many tables. All records within a table contain the same fields.

 

The following two basic types of databases are in common use today:

Flat file databases – which have a single table in which all the data is stored

Relational databases – which can accommodate multiple tables related through specific fields that they have in common

 

A good database is the bedrock of many an e-commerce website. Product catalogs, customer information, and inventory tracking are typically all stored in databases. When a database is created for a website’s back end, scripts are written to call up the data in the database and present it on a web page to users of the website. When a user searches a website’s database, he or she enters data into a web page form to submit a query, which is simply a question that is asked of the database.

That’s the simple version of website databases. What you can do with a database-backed website is actually much more exciting than that.

 

Database-Backed Websites

Storing product data in a database allows you to update the information easily. The real power in having such a database, however, is that users can search the catalog of products in the database and the catalog can be coordinated with inventory, ordering, and tracking systems to automate purchase and fulfillment processes. Customers can search on any of the attributes of your products (size, color, price, weight, power, and so on), and they can also make a purchase in just a few steps (or even in one step, if their credit card data has been stored in a customer table in the database). This is made possible via database-generated catalog pages linked to the transaction system. Website users can “customize” a product before purchase (selecting, for example, the color by viewing an image of the product and clicking a “color chooser” to change the product’s color). They can find a local dealer or retailer by searching on city, ZIP code, or the specific products the dealer or retailer carries. When the catalog database is tied into inventory management systems, the customer can be notified immediately as to whether an item is out of stock or on back order. Notification can occur in the form of a message appearing automatically on the order form web page or in the form of an e-mail message generated and sent out automatically.

Databases can be applied to websites in other ways as well. For example, all of the data supplied by users or customers who register on your site, sign up for your mailing list, participate in your online survey, or complete an online transaction can be stored in a database. That data can then be sorted, indexed, or categorized to provide you with reports on who is visiting your site or buying from your catalog.

Databases can also be used to store text, images, and other media in fields. Your website team or developers can then write scripts to call forth that material and place it into web pages. This is known as creating content dynamically.

When you view a website, you can tell when web pages are being generated dynamically simply by looking at the URL. If the URL doesn’t end in a filename with an extension such as .html or .htm but instead looks like a line of programming code, it’s likely that a script (represented by the code you see) is pulling data from a database to create the page.

Storing content in a database and creating pages dynamically makes maintenance of large and complex websites a lot easier. Making changes to the navigation bar, for example, is less complicated if you can do it once in the database and have the change appear on all pages on the site. That definitely beats making the change, say, 500 times! Also, content producers who don’t know HTML can enter content into a form that automatically drops the content into the database. They simply type the text into a field, click a button on the form, and the new content becomes part of the web page—all without the need for HTML coding.

It’s quite common to include in an HTML document a database call (a query to the database) that dynamically pulls some content from the database. This allows you to store content that’s repeated often on the site in the database. You can then make any change to that content (for example, raising the price of a product) just one time in the database, and the change will be automatically displayed wherever that content appears.

Often, large websites that are made up of thousands of pages use content-management systems that work in tandem with databases to store, track, update, and publish website content. Chapter 11 describes content management tools and how to choose among them.

 

MySQL Databases

MySQL Databases allow you to store lots of information in an easy to access manner. The databases themselves are not easily read by humans. MySQL databases are required by many web applications including some bulletin boards, content management systems, and others. To use a database, you’ll need to create it. Only MySQL Users (different than mail or other users) that have privileges to access a database can read from or write to that database.

Within this area of the CPanel you have the ability to create, and modify databases. As well as add users to those databases.

  • MySQL Database Wizard
  • PHP MyAdmin
  • Remote MySQL
  • Postgre MySQL Databases
  • Postgre MySQL Database Wizard
  • PHPpgAdmin

 

Continue to the Software Section Area