Guide for Design Document
Keyword based Search Engine for Text Documents
CS619 Project
Fall 2024
A Design Document is a detailed blueprint of your system’s structure and behavior. It
communicates the architecture, components, data flow, and interactions in a clear
manner to developers, stakeholders, and testers. Let’s explore each section:
1. Introduction to the Design Document
Definition & Purpose
• Design Document: A comprehensive description that outlines the system
architecture, components, and design decisions. It explains how the system will
meet its requirements.
• Purpose: To serve as a guide for developers, ensure consistency, and provide a
reference point for system maintenance.
Components to Include
• Purpose & Scope: What the system is meant to achieve and its limitations.
• Objectives: The main functionalities and goals.
• Overview: A brief description of the design approach (e.g., modular design,
layered architecture).
Generic Example
“This document details the design for a generic information management system. It
outlines objectives such as data collection, processing, and reporting. The design
emphasizes modularity and scalability to facilitate future enhancements.”
Entity-Relationship Diagram (ERD):
An Entity-Relationship Diagram (ERD) is a visual representation of the data structures
within a system, illustrating entities, their attributes, and the relationships between
them. ERDs are fundamental tools in database design, aiding in the conceptualization
and organization of data.
Key Components of an ERD:
1. Entity:
o Definition: An entity represents a distinct object or concept within the
system, about which data is stored.
o Examples: Customer, Order, Product.
o Symbol: Depicted as a rectangle containing the entity's name.
2. Attribute:
o Definition: Attributes are properties or characteristics that describe an
entity.
o Examples: For a Customer entity: CustomerID, Name, Email.
o Symbol: Typically shown as ovals connected to their respective entity
rectangles.
3. Relationship:
o Definition: A relationship illustrates how two entities are associated with
each other.
o Examples: A Customer "places" an Order; an Order "contains" Products.
o Symbol: Represented by diamonds, with lines connecting to the related
entities.
4. Primary Key (PK):
o Definition: A unique identifier for each record within an entity.
o Example: CustomerID in the Customer entity.
o Symbol: Underlined attribute within the entity rectangle.
5. Foreign Key (FK):
o Definition: An attribute in one entity that references the primary key of
another entity, establishing a relationship between the two.
o Example: CustomerID in the Order entity, linking back to the Customer
entity.
o Symbol: Dashed line connecting the foreign key attribute to the primary
key it references.
6. Cardinality:
o Definition: Specifies the numerical relationship between entities,
indicating how many instances of one entity relate to instances of
another.
o Types:
One-to-One (1:1): A single instance of Entity A is related to a single
instance of Entity B.
One-to-Many (1:N): A single instance of Entity A is related to
multiple instances of Entity B.
Many-to-Many (M:N): Multiple instances of Entity A are related to
multiple instances of Entity B.
o Symbol: Often depicted using crow's foot notation to represent the
nature of the relationship.
How to Create an ERD
1. Identify Entities: Determine the main objects or concepts.
2. Define Attributes: List important characteristics for each entity.
3. Determine Relationships: Identify how entities relate (e.g., one-to-many).
4. Diagram: Use a tool (e.g., Lucidchart, Draw.io) to lay out entities, attributes, and
relationships.
Example of an ERD:
(Given on next page)
age contact
password password
gender
dob Reader email Admin email
name name
ID
ID
Send Manage
comment
added_on cat_desc
email reader_id cat_image
Following Comments Category
name
reply post_id cat_name
ID blogger_id likes ID ID
View Have
cat_id
ID
username name ID title
blogger_id
password image image
Blogger Manage Blog_Post Have
email address description
likes
contact status added_on
bio
View Have
Have
user_id ID
ID date
post_id contact post_id
title
Reports View Feedback name
email rating
description name review
Sequence Diagram:
A Sequence Diagram is a type of interaction diagram in Unified Modeling Language
(UML) that illustrates how objects interact in a particular scenario of a use case. It
focuses on the sequence of messages exchanged between objects and the order in
which these interactions occur.
Key Components of a Sequence Diagram:
1. Actors and Objects:
o Definition: Entities that participate in the interaction.
o Representation: Depicted as rectangles at the top of the diagram.
o Examples: User, System, Database.
2. Lifelines:
o Definition: Vertical dashed lines that represent the existence of an object
over a period of time.
o Purpose: Indicate the object's presence during the interaction.
3. Messages:
o Definition: Arrows that represent communication between objects.
o Types:
Synchronous: Solid line with a filled arrowhead; the sender waits
for a response.
Asynchronous: Solid line with an open arrowhead; the sender
does not wait for a response.
Return: Dashed line with an open arrowhead; indicates the return
of control or data.
4. Activation Bars (Focus of Control):
o Definition: Thin rectangles on a lifeline that show when an object is active
or controlling the flow.
o Purpose: Indicate the duration of an object's participation in the
interaction.
5. Notes:
o Definition: Annotations that provide additional information.
o Representation: Rectangles with a folded corner, connected to relevant
elements by a dashed line.
How to Create a Sequence Diagram
1. Identify Participants: List the actors and objects involved.
2. Outline the Process Flow: Determine the sequence of interactions.
3. Draw the Diagram: Place participants at the top and draw lifelines; use arrows
to indicate the sequence of messages.
Example: User Login Process
:Admin :LoginPage :Authentication Module
Enter a username
Enter a password
Click on the login button
Send user login info()
Validate user password
alt
User login accept
[Correct Detail]
Redirect to login page
[Incorrect detail]
Login reject
Incorrect detail
Architecture Design Diagram:
An Architecture Design Diagram provides a high-level visual representation of a
system's structure, illustrating its components, their relationships, and interactions.
These diagrams are essential for understanding, documenting, and communicating the
architecture of complex systems to various stakeholders.
Key Components of an Architecture Design Diagram:
1. Components:
o Definition: Individual units or parts of the system that encapsulate
specific functionality.
o Examples: User Interface, Application Server, Database.
o Representation: Typically depicted as boxes or rectangles labeled with
the component's name.
2. Connectors:
o Definition: Lines or arrows that represent interactions or data flows
between components.
o Purpose: To show how components communicate or depend on each
other.
3. Interfaces:
o Definition: Points of interaction between components, often specifying
the methods or services offered.
o Representation: Small circles or semi-circles on the edge of
components, sometimes labeled with the interface name.
4. Layers:
o Definition: Horizontal groupings that represent different levels of
abstraction or functionality within the system.
o Examples: Presentation Layer, Business Logic Layer, Data Access Layer.
o Representation: Stacked boxes or sections within the diagram.
How to Create an Architecture Diagram
1. Identify Major Components: Determine the primary modules or layers.
2. Define Interactions: Draw arrows to show how components interact.
Choose an Architectural Style: Examples include layered, client-server, or
microservices.
Example:
Class Diagram:
A Class Diagram is a type of static structure diagram in the Unified Modeling Language
(UML) that describes the structure of a system by showing its classes, attributes,
operations (or methods), and the relationships among objects.
Key Components of a Class Diagram:
1. Classes:
o Definition: Blueprints for objects, encapsulating data and behavior.
o Representation: Rectangles divided into three compartments:
Top: Class Name
Middle: Attributes (properties)
Bottom: Methods (operations)
2. Attributes:
o Definition: Characteristics or properties of a class.
o Notation: visibility name: type
Visibility Indicators:
+ Public
- Private
# Protected
3. Methods:
o Definition: Functions or operations that a class can perform.
o Notation: visibility name(parameters): returnType
4. Relationships:
o Association:
Definition: A structural connection between classes.
Notation: Solid line connecting classes.
o Inheritance (Generalization):
Definition: A hierarchical relationship where one class inherits
from another.
Notation: Solid line with a hollow arrowhead pointing to the parent
class.
o Aggregation:
Definition: A whole-part relationship where the part can exist
independently of the whole.
Notation: Solid line with a hollow diamond at the whole end.
o Composition:
Definition: A whole-part relationship where the part cannot exist
independently of the whole.
Notation: Solid line with a filled diamond at the whole end.
Example:
(Given on the next page)
Admin
-User_ID: int 1
+ManageProfile()
Category
User
-ID: int
-ID: int -Admin_ID: int
#Name: varchar -Cat_Name: varchar
Reader #Email: varchar +Add() 0..*
#Password: varchar +View()
1 -ID: int +Update()
-Contact: varchar +Login() 1
1 +Logout() +Search()
-City: varchar +Delete()
-Address: varchar
+ViewProfile()
0..*
BlogPosts
Blogger
Following
-ID: int
-ID: int -User_ID: int
-ID: int
-Contact: varchar -Cat_ID: int
-User_ID: int
-Image: varchar -Title: varchar
-Name: varchar 0..* 1
-City: varchar -Image: varchar
-Email: varchar
0..* -Address: varchar -Description: text 0..*
-Added_on:date 1
-Status:int -Added_on: date
+Add() 1 -Role: varchar 0..*
-Status: int
+View() -Bio: text -Likes: int
+Update()
+Register() +Add()
+Delete() 1
+UpdateStatus() +View()
+UpdateProfile() +Edit() 1
+Delete()
+Search()
+SendUpdate()
Reports
-ID: int
-User_ID: int Comments
0..*
-Post_ID: int
-Title: varchar -ID: int
-Description: text -Post_ID: int
+Add() -Comment: text
+View() -Reply: text 0..*
+Delete() -Likes: int
+Add()
+View()
+Update()
+Delete()
+Reply()
+Like()
Feedback
-ID: int
-Post_ID: int
-Name: varchar
0..*
-Rating: int
-Review: text
+Add()
+View()
Database Design Diagram:
A Database Design Diagram visually represents the structure of a database, detailing
its tables, columns, relationships, and constraints. Such diagrams are essential for
understanding the organization of data and ensuring efficient database design.
Key Components of a Database Design Diagram:
1. Tables:
o Definition: Structures that store data in rows and columns.
o Representation: Depicted as rectangles labeled with the table name.
2. Columns (Fields):
o Definition: Attributes or properties of the table.
o Notation: Listed within the table rectangle, often with data types and
constraints.
3. Primary Keys (PK):
o Definition: Unique identifiers for table records.
o Notation: Underlined or marked with "PK."
4. Foreign Keys (FK):
o Definition: Columns that reference primary keys in other tables,
establishing relationships.
o Notation: Marked with "FK" and connected to the referenced table.
5. Relationships:
o Definition: Associations between tables.
o Types:
One-to-One (1:1): A single record in Table A relates to a single
record in Table B.
One-to-Many (1:N): A single record in Table A relates to multiple
records in Table B.
Many-to-Many (M:N): Multiple records in Table A relate to multiple
records in Table B, typically implemented via a junction table.
How to Create a Database Design
1. Identify Tables: Based on the entities defined in your ERD.
2. List Columns: Define each column with its data type and constraints.
3. Establish Keys and Relationships: Indicate primary and foreign keys.
4. Diagram or Tabulate: Use a schema diagram or tables to present the design.
Example:
(Given on the next page)
Reader
PK ID
Name
Email
Contact
Password
City
Address
Comments
Following
PK ID
PK ID Admin
FK Post_ID
FK Blogger PK ID
Comments
Name Name
Name
Email Email
Email
Added_on Password
Reply
Likes
Blogger Blogs_Post Category
PK ID PK ID
PK ID
Name FK User_ID
FK Admin_ID
Username FK Cat_ID
Cat_Name
Email Title
Cat_Images
Contact Image
Cat_Desc
Password Added_on
City Status
Address Likes
Bio Description
Image
Status
Feedback
PK ID
FK Post_ID
Name
Reports
Rating
PK ID
Review
FK User_ID
FK Post_ID
Title
Description
Added_on
Interface Design:
An Interface Design Diagram visually represents the layout and interaction elements of
a user interface (UI), detailing components such as buttons, menus, icons, and their
relationships within the system. These diagrams are essential for planning intuitive and
efficient user experiences, ensuring that all interface elements are logically organized
and accessible.
Key Components of an Interface Design Diagram:
1. Wireframes:
o Definition: Simplified sketches outlining the placement of UI elements on
a screen.
o Purpose: To establish the basic structure and layout without focusing on
visual design details.
2. Mockups:
o Definition: Detailed visual representations of the interface, incorporating
design elements like colors, typography, and imagery.
o Purpose: To provide a realistic preview of the final interface appearance.
3. Interactive Prototypes:
o Definition: Simulated versions of the interface that allow user interaction
to test functionality and flow.
o Purpose: To evaluate the user experience and identify potential usability
issues before development.
How to Create an Interface Design
1. Sketch Wireframes: Draw rough layouts of each screen/page using paper
sketches or digital tools (Figma, Balsamiq, Adobe XD).
2. Design Mockups: Develop detailed visual designs that show colors, fonts, and
UI elements.
3. Document User Flow: Explain how a user navigates through different screens.
Example:
For more detailed examples and inspiration in interface design, you might find the
following resources helpful:
• 15 Examples of Impeccable UI Design
• 9 Good UI Examples in SaaS for Design Inspiration
• UI designs, themes, templates, and downloadable graphic elements on Dribbble
These resources showcase a variety of interface designs across different applications,
providing valuable insights into effective UI layout and component organization.
Test Cases:
A test case is a set of conditions or variables under which a tester determines whether
a system or one of its components is working as intended. It includes specific inputs,
execution conditions, testing procedures, and expected results that define a single test
to be executed to achieve a particular testing objective.
Key Components of a Test Case:
1. Test Case ID: A unique identifier for the test case.
2. Test Description: A brief summary of what the test case will validate.
3. Preconditions: Any prerequisites that must be fulfilled before executing the test.
4. Test Steps: Detailed, sequential actions to perform during the test.
5. Test Data: Specific data values to be used in the test.
6. Expected Result: The anticipated outcome if the system behaves as intended.
7. Actual Result: The actual outcome after test execution.
8. Status: Indicates whether the test passed or failed based on a comparison of
expected and actual results.
9. Remarks/Comments: Additional information or observations about the test
execution.
Example Test Case:
Test Case ID TC001
Verify that a registered user can successfully log into the
Test Description
application with valid credentials.
- User must be registered in the system.
Preconditions
- User has a valid username and password.
1. Navigate to the application's login page.
2. Enter a valid username in the "Username" field.
Test Steps 3. Enter the corresponding valid password in the "Password"
field.
4. Click on the "Login" button.
- Username: user@example.com
Test Data
- Password: Password123
The user is redirected to the dashboard page, and a welcome
Expected Result
message with the user's name is displayed.
Actual Result [To be filled after test execution]
Test Case ID TC001
Status [Pass/Fail]
Remarks/Comments [Any additional observations]
Best Practices for Writing Effective Test Cases:
• Clarity and Conciseness: Ensure that each test case is clear and concise,
avoiding ambiguity.
• Comprehensive Coverage: Design test cases to cover all functional and non-
functional requirements.
• Traceability: Link test cases to specific requirements to ensure coverage and
facilitate impact analysis.
• Reusability: Write test cases in a manner that allows them to be reused in
different testing scenarios or projects.
• Maintainability: Structure test cases so they can be easily updated in response
to changes in requirements or system behavior.
By adhering to these practices, testers can create effective test cases that enhance the
quality and reliability of the software testing process.