Midterm-Lecture-Notes
Midterm-Lecture-Notes
Objectives:
In today’s digital era, businesses and organizations are constantly handling vast amounts
of data. However, the true value lies not in the raw data itself but in its transformation into
meaningful information and actionable knowledge. This lesson explores the progression
from data to information and finally to knowledge, highlighting how each step adds value
to decision-making processes, particularly in the context of SMEs. By understanding this
foundational concept, students can appreciate the critical role of data management in
achieving business success.
Data, information, and knowledge are fundamental building blocks of any information
system. Data refers to raw, unprocessed facts, such as numbers, names, or transactions,
collected from various sources. Without context, data has limited value but forms the
foundation for creating information.
Information is generated when data is processed and organized in meaningful ways. For
example, sales figures arranged by product category provide insights into which items
perform best. This organization allows businesses to make sense of their operations.
Knowledge is derived from analyzing information to identify patterns and trends. For
instance, recognizing that customers frequently purchase specific products together
allows businesses to make informed decisions, such as offering bundled discounts to
increase sales. Each stage—data, information, and knowledge—adds value to decision-
making processes and is essential for SMEs striving to compete effectively in their
markets.Real-World Example:
Takeaways:
• Understanding Data:
o Raw data is the foundational element that businesses collect, such as
numbers, names, or simple facts. It has no meaning unless processed.
• Processing Information:
o When raw data is organized and analyzed, it transforms into information.
For instance, calculating daily sales totals gives a business a snapshot of
its performance.
• Applying Knowledge:
o By understanding patterns or trends from information, businesses can make
informed decisions, such as offering discounts on frequently purchased
product combinations to boost sales.
Activities
Steps:
1. Identify Raw Data (10 points): List 5 examples of raw data the SME might collect.
2. Convert to Information (15 points): Transform 2 examples of raw data into
meaningful information.
3. Derive Knowledge (15 points): Based on the information, propose one insight to
improve SME operations.
Discussion Questions
1. Why is it important to differentiate between data, information, and knowledge?
2. How can SMEs benefit from properly managed information?
3. What challenges might arise in transforming data into knowledge for SMEs?
Data comes in various forms, and understanding its classification is essential for effective
data management. Structured, semi-structured, and unstructured data each serve unique
roles in businesses, especially for SMEs managing diverse datasets. This lesson explores
these categories in detail, illustrating their characteristics, uses, and how they influence
decision-making processes.
Data can be classified into three main types: structured, semi-structured, and
unstructured.
• Structured Data is highly organized and stored in a predefined format, such as
rows and columns in a relational database. For example, a database of customer
names, email addresses, and purchase histories is structured data. This type of
data is easy to query and analyze, making it a reliable source for generating reports
and insights.
• Semi-structured Data lies between structured and unstructured data. It contains
some organizational properties, such as tags or keys, but does not fit neatly into a
traditional database schema. Examples include JSON files, XML files, or metadata
in photos. This type of data is flexible, allowing businesses to adapt it for multiple
purposes.
• Unstructured Data lacks any predefined format and is often difficult to process.
Examples include videos, images, and social media posts. Although challenging
to analyze, unstructured data can provide valuable insights when paired with
advanced tools like machine learning or AI.
•
Each data type plays a significant role in SME operations, from customer relationship
management to market analysis, and requires different strategies for storage and
analysis.
Example:
Takeaways:
• Understanding Structured Data:
Structured data is organized and easy to analyze, making it essential for routine
business operations such as sales tracking and inventory management.
• Exploring Semi-structured Data:
Semi-structured data bridges structured and unstructured formats. It is flexible and
suitable for dynamic business needs like storing customer feedback or invoices in
XML.
Activities
Steps:
1. Classify Data (10 points): Identify each data type in the scenario and explain why
it fits into structured, semi-structured, or unstructured categories.
3. Analyze Data Integration (15 points): Suggest how the SME can integrate these
data types for better decision-making.
Discussion Questions:
Introduction:
Relational algebra forms the mathematical foundation for querying relational databases. It
provides the theoretical basis for understanding how data can be manipulated and retrieved. This
lesson covers the basic operations of relational algebra, their relevance to database management,
and practical examples for SMEs.
Discussion:
Relational algebra is a procedural query language used to query relational databases. It uses a set
of operations to manipulate data stored in tables. The key operations are:
• Selection (σ condition ): Retrieves rows that meet specific conditions. For example,
selecting customers who have spent over $1000 in an SME database.
• Projection (π): Extracts specific columns from a table. For instance, displaying only
customer names and phone numbers.
• Union (∪): Combines the results of two queries, removing duplicates.
• Intersection (∩): Retrieves rows common to two datasets.
• Difference (−): Retrieves rows present in one dataset but not in another.
• Cartesian Product (×): Combines all rows of one table with all rows of another.
• Join (⋈ condition ): Combines rows from two tables based on a related column.
These operations help SMEs retrieve and manipulate data efficiently, supporting better decision-
making processes.
Real-World Example:
Takeaways:
• Understanding Selection:
Selection retrieves specific rows, such as identifying high-spending customers.
• Applying Projection:
Projection focuses on extracting specific columns, like names or contact information.
• Using Joins:
Joins are crucial for combining related data, such as linking customer details with
purchase histories.
Activities:
Steps:
1. Perform Selection (10 points): Write a query to find all orders placed in the last 30
days.
2. Apply Projection (15 points): Retrieve customer names and phone numbers from the
Customers table.
3. Join Tables (15 points): Combine the Customers and Orders tables to display customer
names alongside their order totals.
Discussion Questions:
Introduction:
Database schema design is a fundamental step in creating structured, organized, and efficient
databases. Unified Modeling Language (UML) is a widely-used tool for visually representing the
structure of a database, showing tables, attributes, and their relationships. This lesson focuses on
designing database schemas using UML, including primary keys (PK), foreign keys (FK), and
their roles in defining relationships between tables.
Discussion:
A database schema represents the logical structure of a database, which includes tables,
attributes, and relationships. UML diagrams are used to visually depict this structure, providing
an intuitive way to design and communicate database layouts.
1. Tables: Represent entities such as Customers, Orders, or Products. Each table contains
attributes (fields) describing its properties.
2. Attributes: Columns within a table, such as CustomerName, OrderDate, or
ProductPrice.
3. Primary Key (PK): A unique identifier for each record in a table. For instance,
CustomerID uniquely identifies each customer.
4. Foreign Key (FK): An attribute in one table that references the primary key in another,
establishing a relationship. For example, CustomerID in the Orders table links to
CustomerID in the Customers table.
5. Relationships/associations: Define how tables are connected. Common relationships
include:
o One-to-One: Each record in one table relates to exactly one record in another.
o One-to-Many: One record in a table relates to multiple records in another (e.g.,
one customer placing multiple orders).
o Many-to-Many: Multiple records in one table relate to multiple records in
another (e.g., products and orders).
Multiplicity / Cardinality
Real-World Example:
This schema uses relationships to link customers to orders and products to orders through the
OrderDetails table.
Takeaways:
• Primary Keys:
Ensure that every record in a table is uniquely identifiable, making data retrieval precise
and efficient.
• Foreign Keys:
Establish connections between tables, allowing for relationships like customers placing
orders or orders containing products.
• Relationships:
Facilitate data integration across tables, enabling comprehensive queries like identifying
customer purchase histories.
Activities
Steps:
1. Identify Tables (10 points): List the necessary tables (e.g., Employees, Departments,
Projects) and their attributes.
2. Define Relationships (15 points): Determine how the tables relate (e.g., Employees are
assigned to Departments, Projects involve multiple Employees).
3. Draw the UML Diagram (15 points): Create a UML diagram representing the schema,
including PKs, FKs, and relationships.
Discussion Questions:
Introduction:
Primary keys (PK) and foreign keys (FK) are integral components of relational database design,
ensuring data integrity and enabling relationships between tables. Associations define how
entities relate, while multiplicities specify the cardinality of these relationships. This lesson
explores these concepts and demonstrates their practical application in database design.
Discussion:
Real-World Example:
Library Management System
A library database includes the following tables and relationships:
In this system:
• The Books Table has a primary key BookID to uniquely identify each book.
• The Members Table has a primary key MemberID to uniquely identify each library
member.
• The BorrowRecords Table links the Members and Books tables through foreign keys
(MemberID and BookID).
• A Many-to-Many relationship exists between Members and Books, as multiple members
can borrow multiple books.
Takeaways:
• Primary Keys:
Ensure every record in a table is unique and easily identifiable.
• Foreign Keys:
Establish relationships between tables, maintaining data consistency.
• Associations and Multiplicities:
Define the cardinality of relationships, enabling accurate modeling of real-world
scenarios.
Activities
Steps:
1. Define Tables and Keys (10 points): Identify the necessary tables and assign
appropriate primary keys.
2. Establish Relationships (15 points): Create associations between the tables (e.g.,
Employees to Projects through Assignments).
3. Specify Multiplicities (15 points): Determine the cardinality of each relationship and
represent it in a UML diagram.
Discussion Questions:
Objectives:
Introduction:
A use case is a tool used to capture functional requirements by describing interactions between
users (actors) and a system. Use case descriptions are essential for communicating system
requirements and ensuring that both technical and non-technical stakeholders understand the
system’s functionalities.
Discussion:
A use case description details how a system interacts with its users to achieve specific goals. It
provides clarity on system functionality and guides the development process.
1. Use Case Name: A descriptive title for the use case. Example: "Place an Order."
2. Actor(s): The users or systems interacting with the use case. Example: "Customer."
3. Preconditions: Conditions that must be true before the use case starts. Example: "The
user must be logged in."
4. Main Flow: A step-by-step description of how the use case is executed successfully.
5. Alternate Flow: Variations or exceptions to the main flow. Example: "If payment fails,
notify the user."
6. Postconditions: The state of the system after the use case is completed. Example: "The
order is placed successfully."
Real-World Example:
Takeaways:
Activities
Steps:
1. Identify Use Case Details (10 points): Define the use case name, actors, and
preconditions.
2. Create Main and Alternate Flows (15 points): Write the main and alternate flows for
borrowing a book.
3. Define Preconditions and Postconditions (15 points): Specify the conditions required
before and after the use case.
Discussion Questions:
1. Why are use case descriptions important for system development?
2. How do alternate flows improve the accuracy of a use case description?
3. What are some challenges in defining preconditions and postconditions?
Chapter 3: Use Case and Activity Diagrams
Introduction:
Use case diagrams and activity diagrams are essential tools in system design and analysis. They
provide a visual representation of system behavior and workflow, helping stakeholders
understand the interactions between users and the system, as well as the step-by-step process of
achieving specific goals. This lesson focuses on creating and interpreting these diagrams for
effective system modeling.
Discussion:
1. Actors: Represent users or external systems interacting with the system. Example:
Customer, Administrator.
2. Use Cases: Represent specific functionalities or services provided by the system.
Example: Place Order, Log In.
3. Relationships:
o Association: Links an actor to a use case.
o Include: Indicates that one use case incorporates another. Example: "Checkout"
includes "Calculate Total."
o Extend: Indicates optional or conditional use cases. Example: "Place Order"
extends to "Apply Discount."
Activity Diagrams
Activity diagrams model workflows within a system, showing the sequence of activities and
decision points.
Real-World Example:
Use Case Diagram: E-commerce System
Takeaways:
Activities
Real-World Problem: Create Use Case and Activity Diagrams for a Library System
Scenario: A library wants to implement a system to manage book borrowing and returns.
Steps:
1. Develop a Use Case Diagram (15 points): Identify actors, use cases, and relationships.
Draw the diagram.
2. Design an Activity Diagram (15 points): Create a workflow for borrowing a book,
including decision points.
3. Analyze the Diagrams (10 points): Describe how the diagrams clarify system
functionality.
Discussion Questions: