The purpose of every database is to store information, texts, images, even media files. All dynamic modern websites rely on one or more databases for storing articles and other published content, information about the users, contact information, connections to other websites, ads, etc. And just like anything else, storing information will require a space to be stored in.
Database storage
The space occupied on the server by one database is called 'database storage space' and is part of the maximum database volume allowed, called 'database quota'. When the database storage space becomes as big as the allowed storage quota, the server refuses to add new data to the database, and this can subsequently lead to faults or inability to work with the current web application.
The database quota is usually separated from the total disk space quota. This can help the end user to better monitor the size of his databases and their growth. All web hosting plans provided by NTC Hosting offer a handy "Account Usage" section, which will allow you to keep track of your current database and database quota usage.
Database storage structure
All the information in a database is organized and structured in database tables. These tables are stored on the hard disk of the database server. The database tables are usually divided into columns and rows, just like a regular graphic table. In a database table, the columns specify the information category and the data type and the rows hold the actual information. This structure is chosen for its ease of use – it can be easily indexed, accessed or modified.
The information itself is typically saved in one of the many types of ordered and unordered flat files, ISAM, heaps, hash buckets or B+ trees. The most commonly used database structures are the B+ trees and ISAM.
Flat file databases
Flat file databases are the simplest type of databases in terms of structure. They are usually in plain text format and contain one record per line. The simplest example of a flat structured database is a sheet of paper with names, and with a phone number next to each name.
Heaps
Heaps represent a tree-based database structure. With a heap, you have a root node, which is always bigger, or at least of equal value compared with its child node. The child nodes of the root's child nodes are again of equal or less value compared with its parent and so on. This is the main difference between the heap structure and a simple tree structure.
B+ tree
The B+ tree structure is perhaps the most widely used data structure. It is used in several file systems, such as NTFS, XFS and ReiserFS, and is also used as a data structure in PostgreSQL and MySQL. The B+ tree structure is an improved version of the B-tree structure. It represents a type of tree, which can present sorted data in a manner, allowing easy indexing, searching and editing of all the records.
ISAM
Originally developed by IBM for fast data indexing and retrieval purposes, the ISAM is now one of the most popular database structures. With ISAM, there is a special set of indexes, which index all records and allow for faster search times, since the search will go through the indexes and not through the actual records. The ISAM structure is used today in MySQL as the main storage engine.