Database architecture consists of the below five main types:
- Object Oriented
We will now examine each one in more detail.
In a relational database, data that are related to one another are stored, organised, and presented as a collection of tables. All data is directly accessible, and the ordering of rows is not significant.
Image: Relational database
A primary key uniquely identifies each row of the table. It can be simple (consisting of one column) or compound/composite (consisting of two or more columns).
A foreign key is a primary key of another table. Foreign keys provide the links between tables and must always match a valid primary key (referential integrity).
Image: Primary and Foreign key
A hierarchical database consists of data stored in the form of parent and child records, where each child record has exactly one parent record. There is a predefined path to data and 1 to Many, but not Many to Many relationships.
Image: Hierarchical database
In a network database, we have got a specialist modification of a hierarchical structure. It handles Many to Many relationships of parent and child records in a net-like form and there is a predefined path to data.
Image: Network database
An object-oriented database uses the approach and the languages of Object-Oriented Programming (OOP). OOP focuses on the objects to manipulate rather than the logic to manipulate them.
The main components of OOP are:
- Classes - user-defined data types that act as the blueprint for individual objects, attributes and methods.
- Objects - instances of a class.
- Methods - functions defined for a specific class that describe the behaviours of an object.
- Attributes - defined in the class template, represent the state of an object.
OOP’s main principles are:
- Encapsulation – everything is related to a class.
- Inheritance – classes can inherit other classes.
- Polymorphism - objects are designed to share behaviours and they can take on more than one form.
Object-oriented databases work with complex data objects that are stored with all of their properties and can be retrieved when we terminate and then re-start a programme. Data and functionality are treated ‘as one’.
Image: Object-oriented database
Finally, a NoSQL database supports complex data sets and provides flexible schemas. It can handle data variety and large amounts of data as well as replicate data stores to avoid single point of failure.
Image: NoSQL database
NoSQL databases have got four main categories:
- Key value
- Wide Column
- Document based
Select here for more information on each one.
How can you decide which type of NoSQL database is best for your data set?
The below comparison table showcases some of the most popular NoSQL databases.
Image: Comparison table of NoSQL databases
When you’re ready, select Next to continue.
This first Course gives an overview of the five main database types and the components and concepts related to Entity Relationship Diagrams.
A world-leading tech and digital skills organization, we help many of the world’s leading companies to build their tech and digital capabilities via our range of world-class training courses, reskilling bootcamps, work-based learning programs, and apprenticeships. We also create bespoke solutions, blending elements to meet specific client needs.