Skip to main content
Engineering LibreTexts

5.4: Database Models

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Databases can be organized in different ways by using different models. The data model of a database is the logical structure of the data items and their relationships. There are many database models such as, hierarchical and object-oriented, but relational databases are the most popular types of databases. A relational data model organizes data into inter-related tables. Relational databases are easy to understand and use, and are often contrasted with a flat file database which contains only one file/table, with no relationships. A table created in a spreadsheet would be considered a flat file. Tables and files are terms that are used interchangeably. See an example of a flat file and relational database below. In the relational database example, the data is organized into two separate tables (grades and student) and linked together through a common field. In this case the common field is Student ID.

    Flat File Database Example - one dimensional table of data oganized in rows and columns.
    Figure \(\PageIndex{1}\): Flat File Database includes one dimensional table of data organized in rows and columns.

    Relational Database includes multiple tables of data that are related by a common field.
    Figure \(\PageIndex{2}\): Relational Database includes multiple tables of data that are related by a common field.

    Difference Between a Database and a Spreadsheet

    A database and a spreadsheet can appear to be the same. However, this is a common misconception that extends to the business world as spreadsheets are often used as a substitute for more complex database needs. A spreadsheet stores data in an organized fashion, using rows and columns, and looks like a database table.  A spreadsheet can work well if a simple listing of rows and columns (a single table) is all that is needed. For example a listing of students and their information. This is referred to as a flat file database.  However, when several types of data must be mixed together, or when the relationships between these types of data are complex, then a spreadsheet is not the optimal solution.

    A database allows data from several entities (such as students, courses and grades) to all be related together into one whole. While a spreadsheet does allow you to define what kinds of values can be entered into its cells, a database provides more intuitive and powerful ways to define the types of data that go into each field, reducing possible errors and allowing for easier analysis. Though not good for replacing databases, spreadsheets can be ideal tools for analyzing the data stored in a database. A spreadsheet package can be connected to a specific table or query in a database and used to create charts or perform analysis on that data.

    Figure \(\PageIndex{1}\): Database Models . (Marcel Douwe Dekker CC-BY-SA)

    The relational database model is the most used database model today. However, other database models exist with different strengths. The hierarchical database model, popular in the 1960s and 1970s, connected data together in a hierarchy, allowing for a parent/child relationship between data. The document-centric model allowed for a more unstructured data storage by placing data into “documents” that could then be manipulated.

    Perhaps the most interesting new development is the concept of NoSQL (from the phrase “not only SQL”). NoSQL allows for large-scale databases to be spread over several servers or even across the world. For a relational database to work properly, it is important that only one person be able to manipulate a piece of data at a time, a concept known as record-locking. But with today’s large-scale databases (think Google and Amazon), this is just not possible. A NoSQL database can work with data in a looser way, allowing for a more unstructured environment, communicating changes to the data over time to all the servers that are part of the database.

    The relational database model does not scale well. The term scale here refers to a database getting larger and larger, being distributed on a larger number of computers connected via a network. Some companies are looking to provide large-scale database solutions by moving away from the relational model to other, more flexible models. For example, Google now offers the App Engine Datastore, which is based on NoSQL. Developers can use the App Engine Datastore to develop applications that access data from anywhere in the world. offers several database services for enterprise use, including Amazon RDS, which is a relational database service, and Amazon DynamoDB, a NoSQL enterprise solution.

    The next sections focus on the relational model to demonstrate how a database is designed, and the benefits and concerns of use.

    This page titled 5.4: Database Models is shared under a CC BY-SA license and was authored, remixed, and/or curated by David T. Bourgeois (Saylor Foundation) .

    • Was this article helpful?