Skip to main content
Engineering LibreTexts

4.2: Data Models and Relational Databases

  • Page ID
    84121
  • \( \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}}\)

    Databases can be organized in many different ways by using different models. The data model of a database is the logical structure of data items and their relationships.   There have been several data models.  Since the 1980s, the relational data model has been popularized.  Currently, relational database systems are commonly used in business organizations with few exceptions.  A relational data model is easy to understand and use.

    In a relational database, data is organized into tables (or relations).  Each table has a set of fields which define the structure of the data stored in the table.  A record is one instance of a set of fields in a table. To visualize this, think of the records as the rows (or tuple) of the table and the fields as the columns of the table.

    In the example below, we have a table of student data, with each row representing a student record , and each column representing one filed of the student record.   A special filed or a combination of fields that determines the unique record is called primary key (or key).  A key is usually the unique identification number of the records.

    Rows and columns in a table
    Fields, Records and Primary Key from a database table

    Other Types of Databases

    The relational database model is the most used database model today. However, many other database models exist that provide different strengths than the relational model. 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 arose from the need to solve the problem of large-scale databases 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.

    As stated earlier, 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. Amazon.com offers several database services for enterprise use, including Amazon RDS, which is a relational database service, and Amazon DynamoDB, a NoSQL enterprise solution.

    Sidebar: What Is Metadata?

    The term metadata can be understood as “data about data.”  Examples of metadata of database are:

    • number of records
    • data type of field
    • size of field
    • description of field
    • default value of field
    • rules of use.

    When a database is being designed, a “data dictionary” is created to hold the metadata, defining the fields and structure of the database.


    This page titled 4.2: Data Models and Relational Databases 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?