0% found this document useful (0 votes)
2 views14 pages

Topic 1 - Introduction to Database

The document provides a comprehensive overview of database design, covering essential concepts such as data, information, databases, and Database Management Systems (DBMS). It discusses various types of databases, advantages over traditional filing systems, and applications across multiple industries, including CRM, ERP, and healthcare systems. Additionally, it highlights key database components like tables, keys, normalization, and SQL, emphasizing their roles in data integrity and management.

Uploaded by

elleenmwangala
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
2 views14 pages

Topic 1 - Introduction to Database

The document provides a comprehensive overview of database design, covering essential concepts such as data, information, databases, and Database Management Systems (DBMS). It discusses various types of databases, advantages over traditional filing systems, and applications across multiple industries, including CRM, ERP, and healthcare systems. Additionally, it highlights key database components like tables, keys, normalization, and SQL, emphasizing their roles in data integrity and management.

Uploaded by

elleenmwangala
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 14

Topic 1: Introduction to Database Design

1.1 Basic Database Concepts and Terminology


Data
 Raw facts and figures that have no inherent meaning on their own. For example, a list of
numbers like "12345" is just data without context
Information
 Refers to processed data.
Database
 It is a collection of logically related data.
 A structured collection of related data that is organized in such a way that it can be easily
accessed, managed, and updated.
 A database is designed to store, retrieve, and manage data efficiently.
 In the current digital age, databases are integral to almost every application, from social
media platforms to banking systems, as they store the information that these applications
rely on to function.
Database Management System (DBMS)
 Software that provides an interface for users to interact with the database.
 It manages the data, the database engine, and the database schema, facilitating operations
such as data insertion, updating, querying, and administration. Examples include
MySQL, Oracle, and Microsoft SQL Server.
Table
 A collection of related data entries organized in rows and columns within a database.
 Each table represents a specific entity (e.g., customers, orders).
Entity
 Something that we can store data about, e.g. Students, Lecturers, Orders, Cars etc
Record (Row)
 A single, complete set of related data items within a table. Each row in a table represents
one instance of the entity the table describes.
Field (Column)
 A single piece of data within a record. Each column in a table represents a specific
attribute of the entity.
Attribute
 A property of an entity
Primary Key
 A unique identifier for each record in a table.
 The primary key ensures that no two records in a table have the same identifier.
Foreign Key
 A field in one table that uniquely identifies a row of another table.
 It creates a relationship between two tables.
Schema
 Schema is "data about data," also known as metadata.
 Specifically, a schema defines the structure of a database, including how the data is
organized and how the relationships between different pieces of data are set up.
 It includes definitions of tables, columns, data types, and the relationships between tables.
Normalization
 The process of organizing data to minimize redundancy and improve data integrity. It
involves dividing large tables into smaller ones and defining relationships between them.
Entity-Relationship (ER) Model
 A diagrammatic approach to database design, representing entities (things that need to be
stored) and the relationships between them. It’s a conceptual blueprint for the database
structure.
Relationship
 Level of cardinality between entities, e.g. one to one, one to many and many to many
relationships.
SQL (Structured Query Language)
 The standard language used to communicate with databases.
 SQL is used for writing queries to retrieve, insert, update, and delete data from a
database.
Index
 A database object that improves the speed of data retrieval operations on a table at the
cost of additional space and slower data modification operations.
View
 A virtual table based on the result-set of an SQL query.
 Views are used to simplify complex queries, enhance security, and present data in a
specific format.
Transaction
 A sequence of database operations that are treated as a single unit. Transactions ensure
data integrity, following the ACID properties (Atomicity, Consistency, Isolation, and
Durability).
Backup
 The process of copying the database to ensure that the data can be recovered in case of
data loss.
Queries
 Queries are requests for data from the database. They are written in a query language
such as SQL (Structured Query Language) and can be used to retrieve, update, insert, or
delete data.
Example: SELECT * FROM Students WHERE Lec_Name = 'Mary'; retrieves all records where
the Lecturer name is "Mary."

Stored Procedures
 Stored procedures are precompiled collections of SQL statements that can be executed as
a single unit. They are used to perform complex operations or enforce business logic.
Example: A stored procedure might handle the process of updating customer records and
generating a confirmation email.

Triggers
 Triggers are automatic actions that are executed in response to certain events on a table,
such as inserts, updates, or deletes.
Example: A trigger might automatically update the "LastModifiedDate" field when a record in
the "Students" table is updated.
Constraints
 Constraints are rules applied to fields in a table to enforce data integrity.
 They enforce data integrity and prevent invalid data entry.
 For example, a unique constraint on the "Email" column to ensure no two customers have
the same email address.
 Constraints include;
a) Primary Key
- Ensures each record is unique and cannot be NULL.
- Used to identify each row in a table uniquely.
- A company’s employee database must ensure that each employee has a unique ID.
b) Foreign Key
- Maintains relationships between tables by linking to a primary key.
- Maintains relationships between tables by linking a column to a primary key in another table.
c) NOT NULL
- Ensures a column cannot contain NULL values, forcing essential fields to always have data.
- For example, each user should have a unique username, even if they share the same name.
d) UNIQUE
- Ensures all values in a column are distinct (no duplicates).
e) CHECK
- Restricts values based on specific conditions to ensure data validity.
- An employee's age must be 18 or older.
f) DEFAULT
- Assigns a default value if no value is provided.
- New orders should automatically be set to "Pending" unless specified otherwise.

 Importance of constraints:
 Maintain data integrity (correctness of data)
 Prevent errors and duplication
 Ensure consistency in relationships
1.2 Examples of Databases
a) Relational Databases
- Relational databases store data in tables and use relationships between tables. They use
SQL for to query and manage data.

Examples:
 MySQL: An open-source relational database widely used in web
applications.
 PostgreSQL: A powerful open-source relational database known for its
advanced features and extensibility.
 Oracle Database: A commercial relational database system with robust
features for enterprise applications.
 Microsoft SQL Server: A relational database management system
developed by Microsoft, used in various business applications.

b) NoSQL Databases
- NoSQL databases are designed for handling unstructured or semi-structured data and can
accommodate a variety of data models such as key-value, document, column-family, or
graph.

Examples:
 MongoDB: A document-oriented NoSQL database that stores data in
JSON-like documents.
 Redis: A key-value store known for its speed and used for caching and
real-time data processing.
 Cassandra: A column-family NoSQL database designed for high
availability and scalability.
 Neo4j: A graph database used for handling complex relationships and
interconnected data.

c) In-Memory Databases
o In-memory databases store data in the system’s main memory (RAM) rather than
on disk, providing extremely fast data access.

Examples:
 Memcached: An in-memory key-value store used for caching database
queries and improving performance.
 Redis: Also used as an in-memory database for its high-speed data
operations.

d) Object-Oriented Databases
- Object-oriented databases store data in the form of objects, similar to how data is
represented in object-oriented programming.
Examples:
 ObjectDB: An object-oriented database for Java applications.
 db4o: An open-source object database that supports Java and .NET
applications.

e) Cloud Databases
- Cloud databases are hosted and managed in the cloud, providing scalable and flexible
data storage solutions.
Examples:
 Amazon RDS: A managed relational database service that supports
various DBMSs like MySQL, PostgreSQL, and Oracle.
 Google Cloud SQL: A fully-managed relational database service on
Google Cloud Platform.
 Azure Cosmos DB: A globally distributed, multi-model database service
by Microsoft Azure that supports NoSQL data models.

1.3 Advantages of Databases over the traditional filing systems


 Traditional filing systems involve storing data manually in physical files or spreadsheets,
whereas databases offer a digital, structured, and efficient way to manage data.
 Below are key advantages of databases over traditional filing systems:
a). Improved data organization and accessibility
 Databases store data in a structured manner using tables, making it easier to search,
retrieve, and update information quickly.
 Filing Systems require manual searching through physical files, which is slow and
inefficient.
b). Faster data retrieval
 Databases use indexes, queries, and search functions to retrieve data in seconds.
 Filing Systems require manual searching through folders and cabinets, which is time-
consuming.
c). Better data security and access control
 Databases allow user authentication, encryption, and access control, ensuring only
authorized personnel can view or modify data.
 Filing Systems are vulnerable to theft, unauthorized access, or damage, as physical files
can be misplaced or stolen.
d). Reduced redundancy and data duplication
 Databases use normalization and relationships (e.g., primary and foreign keys) to
minimize data duplication.
 Filing Systems often have multiple copies of the same document, leading to
inconsistencies and storage issues.
e). Improved data integrity and consistency
 Databases enforce constraints (e.g., primary keys, foreign keys, and validation rules) to
ensure data consistency.
 Filing Systems have no automatic validation, increasing the risk of errors,
inconsistencies, and duplicate records.
f). Enhanced data backup and recovery
 Databases provide automated backups and recovery options to protect data from
accidental loss or corruption.
 Filing Systems are difficult to back up, and files can be permanently lost due to fire, theft,
or misplacement.
g). Multi-user access and collaboration
 Databases allow multiple users to access and update data simultaneously without
conflicts.
 Filing Systems support only one person at a time, making collaboration slow and
inefficient.
h). Scalability and performance optimization
 Databases handle large amounts of data efficiently, optimizing performance as the dataset
grows.
 Filing Systems become cumbersome and unmanageable as data volume increases.
i). Advanced reporting and analytics
 Databases provide querying and reporting tools (e.g., SQL, Business Intelligence tools)
for generating real-time insights.
 Filing Systems require manual calculations and analysis, which is slow and prone to
errors.
j). Cost and space efficiency
 Databases save physical storage space and reduce costs related to paper, printing, and
manual record-keeping.
 Filing Systems require physical storage, increasing costs for cabinets, printing, and
maintenance.

1.4 Database applications


Databases are fundamental to various industries and applications including the following;
a). Customer Relationship Management (CRM) Systems
- CRM systems help businesses manage customer interactions, track sales, and improve customer
service.
Examples:
 Salesforce – One of the most widely used CRMs, offering sales automation, customer
support, and analytics.
 HubSpot CRM – A free-to-use CRM for startups and small businesses, focusing on lead
tracking and marketing automation.
 Zoho CRM – Provides AI-powered sales insights, automation, and omnichannel
communication.
 Microsoft Dynamics 365 – An enterprise-level CRM that integrates well with other
Microsoft tools like Outlook and Teams.
 Pipedrive – A sales-focused CRM that helps businesses track deals and automate
workflows.

g) Enterprise Resource Planning (ERP) Systems


- ERP systems integrate various business functions such as finance, HR, supply chain, and
manufacturing into a single system.
Examples:
 SAP ERP – A global leader in enterprise applications for finance, procurement, and
supply chain management.
 Oracle ERP Cloud – A cloud-based ERP solution used by large corporations for
finance, project management, and risk management.
 Microsoft Dynamics 365 ERP – A suite of ERP applications for finance, operations, and
supply chain management.
 NetSuite ERP – A cloud-based ERP solution designed for small to mid-sized businesses.
 Odoo ERP – An open-source ERP that includes modules for CRM, inventory,
accounting, and HR.

h) Human Resource Management Systems (HRMS)


- HRMS solutions manage employee records, payroll, attendance, benefits, and
performance tracking.
Examples:
 Workday – A cloud-based HR and finance management system used by large
organizations.
 BambooHR – Best for small to medium businesses, offering payroll, time tracking, and
benefits management.
 Oracle HCM Cloud – An enterprise-grade HRMS with AI-driven analytics and talent
management features.
 ADP Workforce Now – A payroll and HR system widely used for tax compliance and
workforce management.
 SAP SuccessFactors – A cloud-based HR solution for recruitment, employee
development, and payroll.

i) E-commerce and retail databases


- These databases manage product inventory, customer orders, payment processing, and
sales data.
Examples:
 Shopify – A leading e-commerce platform that provides inventory management,
payment processing, and customer insights.
 Magento (Adobe Commerce) – A flexible, open-source e-commerce platform used
by medium to large businesses.
 WooCommerce – A WordPress-based e-commerce plugin ideal for small businesses.
 BigCommerce – A scalable e-commerce platform with multi-channel sales
capabilities.
 OpenCart – A free and open-source e-commerce solution with a user-friendly
interface.

j) Financial & Banking Systems


- These systems handle secure transactions, account management, fraud detection, and
regulatory compliance.
Examples:
 Finacle (by Infosys) – A core banking solution used by major banks for digital
banking transformation.
 Temenos T24 – A widely used banking platform that provides risk management and
compliance solutions.
 Oracle Flexcube – A banking solution used by financial institutions for retail,
corporate, and investment banking.
 Fiserv DNA – A real-time core banking system used in credit unions and banks.
 Jack Henry SilverLake – A financial platform designed for community banks and
credit unions.
k) Healthcare & Medical Records Systems
- These databases manage patient records, appointments, prescriptions, and hospital
operations.
Examples:
 Epic Systems – A leading electronic health record (EHR) system used by hospitals
worldwide.
 Cerner – A widely adopted EHR and health information system used for patient care
management.
 Meditech – A cloud-based EHR platform designed for small to mid-sized hospitals.
 Allscripts – A healthcare IT solution for managing patient records and e-prescriptions.
 Athenahealth – A medical billing and patient management system used by healthcare
providers.

l) Learning Management Systems (LMS)


- LMS solutions store and manage online courses, track student progress, and facilitate
assessments.

Examples:
 Moodle – A popular open-source LMS used by schools, universities, and businesses for
online learning.
 Blackboard Learn – A widely used LMS in higher education with robust course
management tools.
 Google Classroom – A free LMS by Google, often used in K-12 education.
 Canvas LMS – A modern and scalable LMS used by universities and corporations.
 TalentLMS – A cloud-based training platform for businesses offering employee training.

m) Government & Public Sector Databases


- These databases store citizen records, tax information, voting records, and law
enforcement data.
Examples:
 National ID Systems (e.g., Aadhaar in India, Social Security Database in the U.S.) –
Manages citizen identification and authentication.
 Tax Management Databases (e.g., IRS Database in the U.S., KRA iTax in Kenya) –
Handles tax filings, collections, and audits.
 Voting Systems (e.g., Election Commission Databases) – Stores voter registration
details and election results.
 Law Enforcement Databases (e.g., Interpol Database, FBI NCIC) – Tracks criminal
records, forensic data, and investigations.
 Public Healthcare Records (e.g., NHS Spine in the UK) – Manages medical histories
and health records of citizens.

1.5 Database roles


 In a database environment, different roles are assigned to individuals or systems to ensure
efficient management, security, and usability of the database.
 Below are the key database roles:

a). Database Administrator (DBA)


- Responsible for overall database management and security.
 Ensures database security, integrity, and performance tuning.
 Manages backups, disaster recovery, and system availability.
 Controls user access, roles, and permissions.
 Monitors database performance and applies optimizations.
 Implements database constraints and indexing for efficiency.

b). Database Designer (Data Architect)


- Plans and designs the database structure.
 Defines schemas, tables, relationships, and constraints.
 Ensures data normalization and scalability.
 Works with system analysts and developers to create efficient models.
 Determines the best database model (Relational, NoSQL, Object-Oriented, etc.).
c). System Analyst
- Bridges business needs and database implementation.
 Analyzes business requirements and defines data needs.
 Works with DBAs, developers, and business stakeholders.
 Ensures database systems align with organizational goals.

d). Application Developer


- Develops software that interacts with the database.
 Writes SQL queries, stored procedures, and APIs.
 Ensures applications fetch, insert, update, and delete data efficiently.
 Optimizes database interactions for better performance.
Example: A developer creates a mobile banking app that allows users to check balances and
transfer money.

e). Data Analyst / Business Intelligence User


- Extracts insights from stored data for decision-making.
 Uses SQL queries, reporting tools, and data visualization.
 Helps in business intelligence, trend analysis, and forecasting.
 Works with big data, data warehouses, and analytics tools.

Example: A retail company uses sales data analysis to determine customer buying patterns and
adjust stock levels.

f). End user


- Interacts with the database through applications.
 Retrieves, inputs, or updates data based on permissions.
 Can be internal users (employees) or external users (customers).

Example: A cashier at a supermarket uses a POS system to process sales, retrieving product
prices from a database.

g). Security Administrator


- Manages database security policies and access control.
 Implements authentication, encryption, and access control.
 Monitors unauthorized access, SQL injection threats, and cyber risks.
 Ensures compliance with data privacy laws (GDPR, HIPAA, etc.).

Example: A security admin enforces multi-factor authentication (MFA) for employees


accessing a financial database.

i). Data Engineer


- Manages data pipelines and ETL (Extract, Transform, Load) processes.
 Designs and optimizes data movement between databases and data lakes.
 Works with big data tools like Hadoop, Spark, and cloud platforms.
 Ensures data is clean, consistent, and properly formatted for analysis.

Example: A data engineer processes millions of customer transactions and loads them into a
business intelligence dashboard.

j) Automated System Users (Bots & AI Applications)


- Execute automated database tasks without human interaction.
 Run scheduled database maintenance, indexing, and backups.
 Perform real-time monitoring and alert administrators of issues.
 Retrieve and update data based on user interactions with AI/Chatbots.
Example: A chatbot retrieves customer order details from a database when a user inquires on
WhatsApp.

In conclusion:
Each database role plays a crucial part in ensuring a secure, efficient, and well-managed database
system. From designing and maintaining the database to analyzing and securing data, these roles
contribute to smooth business operations.

You might also like