You are on page 1of 10

1

UNIT 18

Assignment 1: Features of a Relational Database

Etinosa Enomayo
2

Features of a relational Database..........................................................................................................1


Entities:..............................................................................................................................................1
Field attributes and their properties..................................................................................................1
The purpose of key fields...................................................................................................................1
Primary key....................................................................................................................................1
Foreign key....................................................................................................................................1
Auto Incremented key.......................................................................................................................1
Different types of relationships with supporting diagrams................................................................1
The Process of Normalisation............................................................................................................1
Benefits of a relational database including data redundancy............................................................1
Referential Integrity..............................................................................................................................1
Avoiding errors in Relational Databases................................................................................................1
References:............................................................................................................................................1

Features of a relational Database


Database software is the most frequently utilised application packages in business. There are dozens
of jobs which involve the use of databases and therefore employees with databases skills are valued.
There are many advantages when using a relational database which include significantly reduced
data storage requirements and improved record manipulation. As the same with spreadsheets, data
mining software can make use of database file to interrogate records and looks for unusual events
and trends.

Entities:
An entity is a single thing person, place or thing that is independent from another. The information
stored about the real world are entities. In general, it is a thing that exist as a distinct and separate
thing. However, in databases an entity refers to a specific record or object that contains data about a
particular person or thing.
3

Field attributes and their properties


The information in the fields that fall beneath a column in a table makes up a database Field
attributes. The properties of it are:

 Field data: The kind of information kept in this attribute field. An example of how it would
look like “CustomerID (numeric, size=10): Unique identifier for each customer”.
 Field Label: A word or phrase assigned to the field. For example, “CustomerID (numeric,
size=10): Unique identifier for each customer” here the field label would be the customer ID.
 Field Length: Maximum length for the field's data. For example, “CustomerID (numeric,
size=10): Unique identifier for each customer” here the field length would be “size=10”
meaning it can store up to 10 characters.
 Field sequence number: the order in which this field appears in the attribute. For example,
the table might be “LineNumber (numeric, size=10): Sequence number for each line item on
the sales order” the field value for the “LineNumbers” might be: 1,2,3,4

 Name: The field attribute’s name. It must be a lowercase value.

The purpose of key fields


Primary key
To be considered a relational table, a table should include a primary key. It consists of one or more
columns in which information uniquely identifies each table row.

The primary key may be used, for instance, to identify the streets where the houses were located if
the data in the rows included house numbers.
4

To be recognised as a primary key, it is the data in each column that must be different, and not the
column name themselves. On top of that there can be no blank value or Null in the columns

Foreign key
The accuracy and reliability of data and the consistency as well as updating the data are all made
possible through the foreign key. While the primary key ensures that such data is distinct in a single
column, the foreign key restrictions guaranteed referential integrity. This is done by forbidding the
entry of values which are not matching with the primary key of the associated table.

Auto Incremented key


Auto incremented key creates a distinct number for each new record that is added. Since it is simple
for the developers to automatically produce a unique integer for each new entry, this is typically
utilised for the primary key column. It works by looking at what the current increment value for the
table is and automatically stores that value with plus 1 for the next row that comes in.

Different types of relationships with supporting diagrams


A one-to-one relationship: The least common relationship and only one record for either side of the
connection exists in this relationship. And the table's rows are all linked to only a single row in
another table. However, there is little in the way of data analysis within this type of relationship, it
does provide various users varying degrees of access to the data in the linked table. For example, a
husband can have one wife and a wife can have one husband.
5

A one-to-many relationship: This relationship has one record on one side and zero, one, or many
records on the other. The most frequently utilised kind of relationship is this one. The one-to-many
relationship can become a many-one relationship due to the linked table. For instance, a mother can
bear multiple children, however a mother can also only be the mother of only one child.

A many-to-many relationship: Such relationship of this sort exists when every single record in the
first table can be associated to one or more records in the second table, as well as when a single
record in the second table can be associated with one or more records in the first table. Two one-to-
many relationships can be connected via something called a linking table and they can then be
considered as a many-to-many relationship. The primary keys of the other two tables are found in
the connecting table, this is what links the two tables.

The Process of Normalisation


Database normalisation is a process in which data can be organised. In this process the breaking
down of tables is done to get rid of redundant data and undesired traits. The data is converted into a
tabular form with help of multi-step procedure that will also get rid of redundant data from
relational tables. Normalisation is used when eliminating redundant data or making sure the data is
kept logically. There are normalisation rules which are divided into 3 forms:

First Normal form (1NF)

The following 4 guidelines must be followed by a table for it to be in the First Normal Form:

 It needs to include a single valued attributes/ column.


 Values kept in a column must be in the same domain.
 A table's columns should each have a name that is distinct.
 Furthermore, it does not matter in what order the data is kept in.
6

Second Normal form (2NF)

To be considered in the Second Normal Form, a table must:

 It needs to be in the First Normal Form.


 And it cannot include Partial Dependency

Third Normal form (3NF)

When a table exhibits the Third Normal Form:

 The second normal form is used.


 Additionally, it lacks transitive dependence.

Benefits of a relational database including data redundancy


7

The relational database model's key advantage is that it offers a simple method of representing data
and makes connected data points easily accessible with ease. Because of this, relational databases
have been most frequently employed by businesses that need to manage significant volumes of
structured data, such as those that need to track inventories, process transactional data, or log
application activity. Many more benefits come with relational databases, such as:

 Reduced data redundancy: Due to Database Normalisation involving efficiently arranging


data within the database makes sure that redundancy is eliminated. This is a huge benefit
because data redundancy can lead to things such as data corruption and increased storage
cost.
 Reduced data storage: When data is stored redundantly there will be increased storage
which will lead to increased size as well as more complexity however the structure of the
relational database ensures data integrity preventing this issue.
 Faster access: Due to the relational database allowing reduced database size there will not
be longer load times allowing the database to be accessed a lot quicker.
 Efficient updating: The SQL used by relational databases makes it easier to update data this
is as users can write a single query that can update multiple fields in the database due to this
it is far easier and faster to update data.
 Searching: When searching for data within a relational database it is far easier this is
because the data is organized into tables which makes it easier to find specific pieces of
data.
 Sorting: Due to SQL sorting in data is easy and efficient within relational databases, this is as
SQL allows users to write queries that sort data in a variety of ways. For example, SQL
queries can be written to sort data in ascending order or descending order and by a specific
field or by multiple fields.
 Reporting: Relational database allows for easy and quick reporting of data this is since users
can custom queries and reports that can be used to either filter data, aggregate data, and
perform calculations on the data.

Referential Integrity
Referential integrity talks of how accurate and reliable the data within a relationship. In such
relationships the data is seen to be linked to two or more tables. This is done using a foreign key to
reference a primary key value and this means that it should be made sure that data on both sides of
the relationship is always kept functional.

Primary keys help ensure referential integrity by making sure that a link between two related tables
is established. It makes sure that there are no duplicate values and that each record in a table can be
identified. When building relationships in between tables, a foreign key is used to reference a
primary key in another table as this creates links that make sure the information is valid and
consistent. Foreign keys ensure that the data in one table corresponds to data in another.

A cascade refers to an action that is initiated by the database management system when a
referenced row in a table is updated or deleted. When a row in the referenced table is updated or
deleted, the automated DBMS will update or delete all the corresponding row in the referencing
table. This assists in the reduction of data inconsistencies.
8

Avoiding errors in Relational Databases


There are many errors that can occur during the design and construction of a relational database
which can impact how functional, efficient, and reliable the database will be.

During the design of a relational database errors such as poor entity relationship modelling can
happen because of incorrectly representing relationships between entities. This error can lead to
significant issues such as data redundancy, inconsistency, and difficulties in querying. A way to avoid
such an error is to use descriptive and consistent naming conventions for tables, columns and
relationships as this makes things easier to understand and prevent confusion.

Another error that can arise is incorrect data normalisation which happens when data is either over-
normalised or under-normalised. This can also lead to data fragmentation or data redundancy as
well. A way to reduce the likelihood of such error is thorough the use of surrogate keys such as auto-
incrementing integers, as primary keys instead of neutral keys like social security numbers or email
addresses.

Incomplete or inaccurate requirements is another possible error that can arise during the design
process of relational databases. This can lead database design that does not met the requirements
of the business or the users. A way to avoid such an error is to develop a conceptual data model that
will help seize the requirements that need to be met and plans out the entities and relationships
involved.

During the construction of a relational database error such as incorrect data entries can happen. For
example, due to human error during the entry of data inconsistency, inaccuracy of the data as well
as even missing data. A way to however avoid such an error is by providing good quality user training
to the user who will be responsible for those data entries.

Another error that could occur is data integration issues, incorrectly integrating data from a variety
of sources can cause data inconsistencies and/or data loss. However, a way to avoid this issue is by
utilising data integration tools to help simplify the process of integrating data. These tools tend to
include features like data mapping, transformation, and cleansing to ensure that data is integrated
accurately without any issues.

Lastly another error that can occur during the construction stage of relational databases is
compatibility issues. This occurs when other software or hardware components are not compatible
with the database leading to longer loud times, crashed and errors. A way to avoid such a problem is
by defining compatibility requirements for the database, this includes operating systems, hardware
and software that are needed to run the database. This will help avoid such an issue as it makes it
easier for the database to integrate with the other systems.
9

References:

1NF, 2NF, 3NF and BCNF in Database Normalization | Studytonight. (n.d.). Studytonight -
Best place to Learn Coding Online. https://www.studytonight.com/dbms/database-
normalization.php

Editor. (2022, April 11). 9 Common Pitfalls to Avoid During Database Design. AltexSoft.
https://www.altexsoft.com/blog/database-design-mistakes/

IBM Documentation. (n.d.). IBM - Deutschland | IBM.


https://www.ibm.com/docs/en/imdm/11.5?topic=properties-attribute-field

Ways to Reduce Data Redundancy. (n.d.). DBSync Blogs.


https://www.mydbsync.com/blogs/ways-to-reduce-data-redundancy/

What are the different types of relationships in DBMS? (n.d.). AfterAcademy | Platform
for learning coding & software development. https://afteracademy.com/blog/what-
are-the-different-types-of-relationships-in-dbms/

What is a relational database? | IBM. (n.d.). IBM - Deutschland | IBM.


https://www.ibm.com/topics/relational-databases

What is Primary and Foreign Keys in Database (Purpose and Use). (“Purpose of Foreign
Keys in Databases - eukhost Blog”) (n.d.). Web Hosting Blog from eUKhost.
https://www.eukhost.com/blog/webhosting/what-the-use-of-primary-foreign-keys-in-
database/

What is Referential Integrity? (n.d.). Database.Guide. https://database.guide/what-is-


referential-integrity/
10

You might also like