0% found this document useful (0 votes)
72 views

Basics and Fundamentals of Database For Level 4

This module aims to teach learners about analyzing database requirements, designing, and building a simple database. By the end of the module, learners will be able to describe database fundamentals and build a basic database. It covers key database terms like data, entities, attributes, and records. It also discusses different database models such as relational, hierarchical, network, and object-oriented. Learners will learn about different types of database relationships like one-to-one, one-to-many, many-to-many, and many-to-one. Finally, it describes techniques for collecting user requirements like interviews, documentation review, and questionnaires.

Uploaded by

BO AZE
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

Basics and Fundamentals of Database For Level 4

This module aims to teach learners about analyzing database requirements, designing, and building a simple database. By the end of the module, learners will be able to describe database fundamentals and build a basic database. It covers key database terms like data, entities, attributes, and records. It also discusses different database models such as relational, hierarchical, network, and object-oriented. Learners will learn about different types of database relationships like one-to-one, one-to-many, many-to-many, and many-to-one. Finally, it describes techniques for collecting user requirements like interviews, documentation review, and questionnaires.

Uploaded by

BO AZE
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Purpose statement

This module describes the skills, knowledge and attitudes to be acquired by the learner to
Analyze database requirements design and build simple database. At the end of this module the
learner will be able to describe basics and fundamentals of database and building a simple
database.
LU 1: ANALYSE DATABASE
REQUIREMENT

1.1: Define database key terms, models, types and


relationships

 Database definition
 Data
Data, in the context of databases, refers to all the single items that are stored in a database, either
individually or as a set. Data in a database is primarily stored in database tables, which are
organized into columns that dictate the data types stored therein. So, if the “Customers” table has
a column titled “Telephone Number,” whose data type is defined as “Number,” then only
numerals can be stored in that column.
Data is a collection of facts, such as numbers, words, measurements, observations or just
descriptions of things.

Qualitative vs Quantitative

Data can be qualitative or quantitative.

 Qualitative data is descriptive information (it describes something)


 Quantitative data is numerical information (numbers)

 Database
A Database is a collection of related data organized in a way that data can be easily accessed,
managed and updated. Database can be software based or hardware based, with one sole
purpose, storing data.

 Entities
An entity can be a real-world object, either animate or inanimate, that can be easily identifiable.
For example, in a school database, students, teachers, classes, and courses offered can be
considered as entities. All these entities have some attributes or properties that give them their
identity.

TEACHER 1
An entity set is a collection of similar types of entities. An entity set may contain entities with
attribute sharing similar values. For example, a Students set may contain all the students of a
school; likewise a Teachers set may contain all the teachers of a school from all faculties. Entity
sets need not be disjoint.

 Attributes
An attribute is a property or characteristic of an entity. An entity may contain any number of
attributes. One of the attributes is considered as the primary key. In an Entity-Relation model,
attributes are represented in an elliptical shape.
Example: Student has attributes like name, age, roll number and many more. To uniquely identify
the student, we use the primary key as roll number as it is not repeated. Attributes can also be
subdivided into another set of attributes.

There are five such types of attributes: Simple, Composite, Single-valued, Multi-valued, and
Derived attribute.
These are explained as following below.
1. Simple attribute:
An attribute which cannot be further subdivided into components is a simple attribute.

Example: The roll number of a student, the id number of an employee.


2. Composite attribute:
An attribute which can be splitted into components is a composite attribute.
Example: The address can be further splitted into house number, street number, city, state,
country and pincode, the name can also be splitted into first name middle name and last
name.
3. Single-valued attribute:
The attribute which takes up only a single value for each entity instance is single-valued
attribute.
Example: The age of a student.
4. Multi-valued attribute:
The attribute which takes up more than a single value for each entity instance is multi-
valued attribute.
Example: Phone number of a student: Landline and mobile.
5. Derived attribute:
An attribute that can be derived from other attributes is derived attribute.
Example: Total and average marks of a student.

 Records

TEACHER 2
A record is a database entry that may contain one or more values. Groups of records
are stored in a table, which defines what types of data each record may contain.
Databases may contain multiple tables which may each contain multiple records.
Records are often called rows since each new record creates a new row in the table.

 Types of database models


Database models represents the layout or structure by which data will be organized, stored,
managed and processed in the database.

 Relational database
A relational database is a type of database that stores and provides access to data points that are
related to one another. Relational databases are based on the relational model, an intuitive,
straightforward way of representing data in tables. In a relational database, each row in the table
is a record with a unique ID called the key. The columns of the table hold attributes of the data,
and each record usually has a value for each attribute, making it easy to establish the
relationships among data points.

 Hierarchical database
A hierarchical model represents the data in a tree-like structure in which there is a single parent
for each record. To maintain order there is a sort field which keeps sibling nodes into a recorded
manner. These types of models are designed basically for the early mainframe database
management systems, like the Information Management System (IMS) by IBM.
Data in this type of database is structured hierarchically and is typically developed as an inverted
tree. The "root" in the structure is a single table in the database and other tables act as the
branches flowing from the root. The diagram below shows a typical hierarchical database
structure.

TEACHER 3
 Network database
A network database model is a database model that allows multiple records to be linked to the
same owner file. The model can be seen as an upside down tree where the branches are the
member information linked to the owner, which is the bottom of the tree. The multiple linkages
which this information allows the network database model to be very flexible. In addition, the
relationship that the information has in the network database model is defined as many-to-many
relationship because one owner file can be linked to many member files and vice versa.
 

TEACHER 4
 Object oriented model
The ODBMS which is an abbreviation for object oriented database management system, is the
data model in which data is stored in form of objects, which are instances of classes. These classes
and objects together makes an object oriented data model.

 Database relationships
 One to One
In a one-to-one relationship, one record in a table is associated with one and only one record in
another table. For example, in a school database, each student has only one student ID, and each
student ID is assigned to only one person.

 One to Many
A one-to-many relationship in a database occurs when each record in Table A may have many
linked records in Table B, but each record in Table B may have only one corresponding record in
Table A.

 Many to Many
A many-to-many relationship occurs when multiple records in a table are associated with
multiple records in another table. For example, a many-to-many relationship exists between
customers and products: customers can purchase various products, and products can be
purchased by many customers.

 Many to One
Many-to-One relationship occurs when multiple records in a table are associated with one
record in another table. For example a project can have more than one student working on it. A
team of five students in a college in assigned a project that they need to complete in let us say
one month.

1.2: Review organizational and task requirements to identify


user requirement

 Techniques and Methods to collect data

TEACHER 5
What is Data Collection?

Data collection is a methodical process of gathering and analysing specific information to


proffer solutions to relevant questions and evaluate the results.

 Interview
An interview is a face-to-face conversation between two individuals with the sole purpose of
collecting relevant information to satisfy a research purpose.

Pros 

 In-depth information
 Freedom of flexibility
 Accurate data.

Cons 

 Time-consuming
 Expensive to collect

 Documentation
Document review is a way of collecting data by reviewing existing documents. The documents
may be internal to a program or organization (such as records of what components of an asthma
management program were implemented in schools) or may be external (such as records of
emergency room visits by students served by an asthma management program).
Pros 
 Relatively inexpensive
 Good source of background information
 Provides a behind-the-scenes look at a program that may not be directly
observable
 May bring up issues not noted by other means

Cons

 Information may be inapplicable, disorganized, unavailable, or out of date


 Could be biased because of selective survival of information
 Information may be incomplete or inaccurate
 Can be time consuming to collect, review, and analyze many document

TEACHER 6
 Questionnaire
This is the process of collecting data through an instrument consisting of a series of questions
and prompts to receive a response from individuals it is administered to.

Pros  

 Can be administered in large numbers and is cost-effective.


 It can be used to compare and contrast previous research to measure change.
 Easy to visualize and analyse.
 Questionnaires offer actionable data.
 Respondent identity is protected.
 Questionnaires can cover all areas of a topic.
 Relatively inexpensive.

Cons

 Answers may be dishonest.


 Questionnaires can't produce qualitative data.
 Questions might be left unanswered. 
 Respondents may have a hidden agenda.
 Not all questions can be analysed easily.

 Observation
This is a data collection method by which information on a phenomenon is gathered through
observation.

Pros

 Easy to administer.
 There subsists a greater accuracy with results.
 It is a universally accepted practice.
 It diffuses the situation of an unwillingness of respondents to administer a report.
 It is appropriate for certain situations.

Cons

 Some phenomena aren’t open to observation.


 It cannot be relied upon.
 Bias may arise.
 Its validity cannot be predicted accurately.

TEACHER 7
 Types of requirements
 Functional requirements
What is a Functional Requirement?

A Functional Requirement (FR) is a description of the service that the software must offer. It
describes a software system or its component. A function is nothing but inputs to the software
system, its behavior, and outputs. It can be a calculation, data manipulation, business process,
user interaction, or any other specific functionality which defines what function a system is
likely to perform. Functional Requirements are also called Functional Specification.

Benefits of Functional Requirement

Here, are the pros/advantages of creating a typical functional requirement document-

 Helps you to check whether the application is providing all the functionalities that were
mentioned in the functional requirement of that application
 A functional requirement document helps you to define the functionality of a system or
one of its subsystems.
 Functional requirements along with requirement analysis help identify missing
requirements. They help clearly define the expected system service and behavior.
 Errors caught in the Functional requirement gathering stage are the cheapest to fix.
 Support user goals, tasks, or activities

Different types of functional requirements in an SRS document are:

 Business rules

What do you want your system to do? What are the features you need so you can achieve your
goals?

 Transaction corrections, adjustments, and cancellations

These requirements examine every transaction’s entry, changing, deleting, canceling, and error
checking. 

 Authentication functions

They concern the information users share with the system and their authentication level.

 Authorization levels

TEACHER 8
These functions determine various system access levels and decide who can CRUD (change,
read, update, or delete) information.

 Audit tracking

Audit tracking is the process of tracking critical data.

 External interfaces

These functions concern the external interface of systems other than the main system.

 Certification requirements

Your organization might require certifications to work on the system, such as security
certifications.

 Searching/reporting requirements

This section of requirements will tell you how users can search and retrieve data.

 Historical data

You will have a growth of data if your database is dynamic, so you need to define storage
requirements to accommodate these data.

 Archiving

Your system’s data may grow beyond your storage capacity, so the projects must have the
capability to archive the data for long-term storage. 

 Compliance, legal, or regulatory requirements

These are laws, regulations from the government, and even internal policies that the
organizations and their systems must follow.

 Algorithms 

Algorithms capture any formulas or manipulations of data elements that need to occur.

 Database

The elements and formats you should use when defining what data needs storing in a system.

 Backup and recovery

TEACHER 9
You will need this function in case your system crashes and wipes out all your data.

Example of Functional Requirements

 The software automatically validates customers against the ABC Contact Management
System
 The Sales system should allow users to record customers sales
 The background color for all windows in the application will be blue and have a
hexadecimal RGB color value of 0x0000FF.
 Only Managerial level employees have the right to view revenue data.
 The software system should be integrated with banking API

 Non-functional requirements

“Any requirement that specifies how  the system performs a certain function.”

In other words, a non-functional requirement will describe how a system should behave and what
limits there are on its functionality.

Difference between functional and non-functional requirements:


Functional Requirements Non-Functional Requirements
They define a system or its component. They define the quality attribute of a system
It specifies, “What the system should do?” It specifies, “How should the system fulfill the
functional requirements?”
User specifies functional requirement. Non-functional requirement is specified by technical
peoples e.g. Architect, Technical leaders and
software developers.
It is mandatory to meet these It is not mandatory to meet these requirements.
requirements.
It is captured in use case. It is captured as a quality attribute.
Defined at a component level. Applied to a whole system.
Helps you to verify the functionality of the Helps you to verify the performance of the software.
software.
Functional Testing like System, Non-Functional Testing like Performance, Stress,
Integration, End to End, API testing, etc Usability, Security testing, etc are done.
are done.
Usually easy to define. Usually more difficult to define

Non-functional Requirements Examples:

TEACHER 10
1. Emails should be sent with a latency of no greater than 12 hours.
2. Each request should be processed within 10 seconds.
3. The site should load in 3 seconds when the number of simultaneous users are > 10000

1.3: Determine the information that the database is required


to hold

Determination of database elements


 Tables
A table is a collection of data about a specific thing, such as people or companies or products.

 Records or Rows
A row of data is the collection of all the columns in a table associated with a single occurrence.
Simply speaking, a row of data is a single record in a table. For example, if there are 25,000
book titles with which a bookstore deals, there will be 25,000 records, or rows of data, in the
book titles table once the table is populated.

 Fields or Columns
A column, or field, is a specific category of information that exists in a table.

Determination of data types


 Integer – is a whole number that can have a positive, negative or zero value. It cannot be
a fraction nor can have decimal places.  It is commonly used in programming especially
for increasing values.  Addition, subtraction and multiplication of two integers results to
an integer.  But division of two integers may result to an integer or a decimal.  The
resulting decimal can be rounded off or truncated to produce an integer.
 Character – refers to any number, letter, space or symbol that can be entered in a
computer. Each character occupies one byte of space.
 String – is used to represent text. It is composed of a set of characters that can have
spaces and numbers.  Strings are enclosed in quotation marks to identify the data as string
and not a variable name nor a number.
 Floating Point Number – is a number that contains decimals. Numbers that contain
fractions are also considered as floating point numbers.
 Array – contains a group of elements which can be of the same data type like an integer
or string. It is used to organise data for easier sorting and searching of related set of
values.

TEACHER 11
 Varchar – as the name implies is variable character as the memory storage has variable
length.  Each character occupies one byte of space plus 2 bytes for length
information.Note: Use Character for data entries with fixed length, like phone number. 
Use Varchar for data entries with variable length, like address.
 Boolean – is used for creating true or false statements.
 Date, Time and Timestamp – these data types are used to work with data containing
dates and times.

LU 2: DESIGN DATABASE

2.1: Design an entity relationship diagram (ERD)

Database relationship description


 ER Diagrams
 Types of Relationships
one to one
One to many
Many to one
Many to many

Description of database design abstraction levels


 Logical model of data
 Conceptual / view model of data
 Physical model of data
Description of system metadata
 Types of metadata
 Uses of metadata

TEACHER 12

You might also like