Types of Databases
A database is an organized collection of data that enables simple and efficient storage, retrieval, and modification of data. In this article, we shall discuss the various types of databases.
In this article, we will discuss
- Various types of databases.
- Functioning of each type of database.
- Advantages and disadvantages of various databases.
It is a collection of information at a single location accessible from numerous points. The basic function of a centralized database management system is to provide facilities and give access to all the connected computers which fulfill all requirements requested by any single node.
All the data and information are stored in a single centralized database management system. The computer system which fulfills the requirements of all the connected computers is known as a server and other computers are known as clients.
- Queries can be fast.
- Information may also be easier to organize in a single location.
- In a database upgrade to handle more information, servers can be added to the database site easily.
- A centralized database can also be easier to physically secure.
- It is also possible to set up an extremely robust computer security system to prevent unauthorized access.
- A centralized database tends to create bottlenecks if several users perform write operations.
- It can also be very vulnerable if something happens to it and a backup has not been performed or the existing backup is outdated.
- If multiple users try to access and process queries toward the server simultaneously then it becomes quite problematic for the performance.
It is a database that is built, deployed, and accessed in a cloud environment, private, public, or hybrid cloud. It has two deployment models:
1. Traditional Database
Very similar to an onsite, in-house managed database—except for infrastructure provisioning. In this case, an organization purchases virtual machine space from a cloud services provider, and the database is deployed to the cloud. It is useful for early age organizations, small size companies.
2. Database as a service (DBaaS)
It's a database in which an organization contracts with a cloud services provider through a fee-based subscription service. The service provider offers a variety of real-time operational, maintenance, administrative, and database management tasks to the end-user.
- Cloud databases can be set up and decommissioned very quickly—making testing, validating, and operationalizing new business ideas easy and fast.
- If the organization decides not to operationalize a project, it can simply abandon the project and move on to the next innovation.
- When using a cloud database, there’s no need to order hardware or spend time waiting for shipments, installation, and network setup when a new product is in the development queue.
- Cloud databases offer numerous opportunities to reduce risk across the business, particularly for DBaaS models.
- Once your business has chosen a cloud service provider, it can be complicated to move your infrastructure to a different cloud service.
- The initial cost of hosting services for your database deployments can be lower than expanding your business's existing servers. But as your service needs grow, costs can rise – sometimes quite sharply.
- The general security of the cloud infrastructures available from leading vendors is strong. But no system is entirely immune to attack. Hosting sensitive information online always generates the possibility of a data breach.
A commercial database is developed and maintained by a commercial organization that is generally made available to customers and potential customers. In terms of free software and source availability, it's opposite to database management systems like MySql, Postgres. etc. Examples are OracleDB, EnterpriseDB, etc. They are often associated with premium services such as active customer support, better up times and access speed (cloud-deployed), etc.
- Commercial DBMS software providing companies offer professional support extended to customers.
- The organization may provide additional scaling features and capacity.
- Automated cloud-based management and data backups are also available.
- The DB up-time and efficiency could also be better.
- Require purchasing.
- Billing might scale as does the database.
- One-time payments are rare.
- DBMS migration could be a cause of concern.
A distributed database is one in which data is stored across different physical locations. It maybe stored in multiple computers located in the same physical location or maybe dispersed over a network of interconnected computers.
System administrators can distribute collections of data across multiple physical locations. A distributed database can reside on organized network servers or decentralized independent computers on the Internet, on corporate intranets/extranets, etc.
- Network transparency: This refers to the freedom for the user from the operational details of the network.
- Replication transparencies: It makes users unaware of the existence of copies as we know that copies of data may be stored at multiple sites for better availability, performance and reliability.
- Fragmentation transparency: It makes users unaware of the existence of fragments, vertical or horizontal.
- When the data is distributed over several sites one site may fail while other sites continue to operate.
- In a distributed environment expansion of the system in terms of adding more data, increasing database sizes, etc is easier.
- Network traffic is increased, because most queries stay on a site's LAN rather than using the organization's WAN.
- Different data formats are used in different systems.
- Different DBMS products are used in different systems which increases in complexity of the system.
- Managing system catalog is a difficult task (Every database stores every information about its objects. This information, known as metadata, are also stored as rows and columns of a table. Collection of these metadata is stored in system catalog).
End User Database
An end-user database enables storing data created by an end-user. Any database which allows the end-user to create and manage data comes under this category. This means that the user is able to directly interact with and control the database and the data that is stored in it. As shown in the diagram, summary of whole information is collected in this database. For convenience, the end user is provided with an interactive client (dedicated software, command line interface, GUI, etc).
- The end user is usually not concerned about the transaction or operations done at various levels.
- The user is only aware of the product which may be a software or an application.
- This helps in rapid development.
- This is a shared database which is specifically designed for the end user.
Graph databases are purpose-built to store and navigate relationships among objects. Relationships are first-class citizens in graph databases, and most of the value of graph databases is derived from these relationships. Graph databases use nodes to store data entities, and edges to store relationships between entities.
A graph can be traversed along specific edge types or across the entire graph. In graph databases, traversing the joins or relationships is very fast because the relationships between nodes are not calculated at query times but are persisted in the database. Graph databases have advantages when you need to create relationships between data and quickly query these relationships.
- With graph databases, you can use relationships to process financial and purchase transactions in near-real-time.
- With fast graph queries, you can detect that, for example, a potential purchaser is using the same email address and credit card as included in a known fraud case.
- Graph databases can also help you easily detect relationship patterns such as multiple people associated with a personal email address, or multiple people sharing the same IP address but residing in different physical addresses.
- With graph databases, you can store in a graph relationship between information categories such as customer interests, friends, and purchase history.
- Graph databases are not great at transactional use cases.
- Using a graph database alone is not an MDM (Master Data Management) solution.
- Graph databases do not create better relationships. They simply provide speedy data retrieval for connected data.
- For the most common graph databases, you have to store all the data on one server.
- Graph databases are not optimized for large-volume analytics queries typical of data warehousing.
It is a database model in which the data is arranged in a hierarchical tree manner. As it is arranged based on the hierarchy, every record of the data tree should have at least one parent, except for the child records in the last level, and each parent should have one or more child records. The Data can be accessed by following through the classified structure, always initiated from the Root or the first parent.
The idea behind hierarchical database models is useful for a certain type of data storage, but it is not extremely versatile. It is confined to some very specific uses. Hierarchical models make the most sense where the primary focus of information gathering is on a concrete hierarchy such as a list of business departments, assets, or people that will all be associated with specific higher-level primary data elements.
- Based on Hierarchal structure, the relationships between the layers.
- The first database model offered the data security that is provided by the DBMS.
- It is very efficient because when the database contains a large number of 1
relationships and when the user requires a large number of transactions.
- It’s very fast to access data at present at the top of the tree storage.
- Large base with proven technology.
- One parent per child.
- Complex (users require physical representation of database)
- Navigation across the tree based data storage is complex.
- Data must be organized in a hierarchical way without compromising the - information.
- Lack structural independence.
- Many too many relationships not supported.
- Data independence.
A network database is based on a network data model, which allows each record to be related to multiple primary records and multiple secondary records. Network databases allow you to create a flexible model of relationships between entities.
Network refers to relations between different data entities. A network database is based on a traditional hierarchical database, except it allows each object to have multiple parents instead of a single parent.
Network databases can be represented as a graph, defined by a schema, which is a list of data nodes and the relationships between them. This provides a data structure that, in a regular relational database, can only be accessed by inference.
- The network model is conceptually simple and easy to design.
- The network model can handle the one to many and many to many relationships which are a real help in modeling real-life situations.
- The data access is easier and flexible than the hierarchical model.
- The network model does not allow a member to exist without an owner.
- The network model is better than the hierarchical model in isolating the programs from the complex physical storage details.
- The schema or the structure of this database is very complex as all the records are maintained by the use of pointers.
- There’s an existence of operational anomalies as there is a use of pointers for navigation which further leads to complex implementation.
- This model does not have any scope of automated query optimization.
- This model fails in achieving structural independence even though the network database model is capable of achieving data independence.
Most NoSQL stores lack true ACID(Atomicity, Consistency, Isolation, Durability) transactions but a few databases, such as MarkLogic, Aerospike, etc have made them central to their designs. Most NoSQL databases offer a concept of eventual consistency in which database changes are propagated to all nodes so queries for data might not return updated data immediately or might result in reading data that is not accurate.
- NoSql databases take full advantage of the cloud to deliver zero downtime.
- They enable easy updates to schema and fields.
- They are developer friendly.
- They are capable of storing unstructured, semi-structured, or structured data.
- They can handle large volumes of data at high speed with a scale-out architecture.
- No standard defines the rules and roles of NoSQL databases. The design and query languages of NoSQL databases vary widely between different NoSQL products.
- Backups are a drawback in NoSQL databases. Though some NoSQL databases provide tools for backup, they are not mature enough to ensure a proper complete data backup solution.
- NoSQL puts scalability and performance first but when it comes to a consistency of the data NoSQL doesn’t take much consideration.
Object Oriented Database
The database combines object-oriented programming concepts with relational database principles. Think of a class as a model, and objects as various constructs/instances of it. These instances share the properties they derive from the class. For example, a class of 'bear', the objects of which could be brown bears, Polar Bears, Black Bears, etc. Objects are the basic building block and an instance of a class, where the type is either built-in or user-defined.
Classes provide a schema or blueprint for objects, defining the behavior. Methods determine the behavior of a class. Pointers help access elements of an object database and establish relations between objects. The main characteristic of objects in OODBMS is the possibility of user-constructed types. An object created in a project or application saves into a database as it is.
- OODBMS allows new data types to be built from existing types.
- OODBMS is capable of storing different types of data.
- A single language interface between the Data Manipulation Language and the programming language overcomes the impedance mismatch.
- Navigational access from the object is the most common form of data access in an OODBMS. It is more suitable for handling parts explosion, recursive queries, and so on.
- The tight coupling between data and applications in an OODBMS makes schema evolution more feasible.
- Usage of OODBMS is low.
- There is a general lack of standards of OODBMS. There is no universally agreed data model, and no standard object-oriented query language.
- Perhaps one of the most significant issues that face OODBMS vendors is the competition posed by the RDBMS and the emerging ORDBMS products.
- Query optimization requires an understanding of the underlying implementation to access the database efficiently. However, this compromises the concept of incrustation.
- Many OODBMSs use locking as the basis for concurrency control protocol which may impact performance.
An RDBMS stores and organizes data points that are related to one another. Based on the model, a relational database presents data sets as a collection of tables and provides relational operators to manipulate the data in tabular form. Tables consist of columns containing one or more data categories, and rows, containing a set of data defined by the category.
Each table has a unique identifier, or primary key, which identifies the information in the table, and each row contains a unique instance of data for the categories defined by the columns. The logical connection between different tables can then be established with the use of foreign keys - a field in a table that connects to the primary key data of another table. RDBMS often employs SQL for gathering data for reports and interactive queries.
RDBMS exhibit ACID properties:
- All changes to data are performed as if they are a single operation.
- Data is in a consistent state when a transaction starts and when it ends.
- The intermediate state of a transaction is invisible to other transactions.
- After a transaction successfully completes, changes to data persist and are not undone, even in the event of a system failure.
- Even though a relational database is poor in terms of performance, still its speed is considerably higher because of its ease and simplicity.
- Since there are several tables in a relational database, certain tables can be made to be confidential.
- Compared to other types of network models, a relational database model is much simpler.
- Unlike other types of databases, a relational database does not require any specific path for accessing the data.
- Thus, all the data which is stored is non-repetitive.
- The maintenance of the relational database becomes difficult over time due to the increase in the data.
- The relational database system is costly to set up and maintain.
- A relational database is comprised of rows and columns, which requires a lot of physical memory because each operation performed depends on separate storage.
- While using the relational database over multiple servers, its structure changes and becomes difficult to handle.
- Relational databases can only store data in tabular form which makes it difficult to represent complex relationships between objects.
A database is an organized collection of data that enables simple and efficient storage, retrieval, and modification of data. There are 11 fundamental types of databases:
- Centralized database.
- Cloud database.
- Commercial database.
- Distributed database.
- End-user database.
- Graph database.
- Hierarchical database.
- Network database.
- NoSQL database.
- Objected-oriented database.
- Relational database.