You are on page 1of 21

Data Designs

Software Engineering.
KEY CONCEPTS
 DATA : Data describes a real-world information
resource that is important to your application.
Data describes the things, people, products,
items, customers, assets, records, and —
ultimately — data structures that your
application finds useful to categorize, organize,
and maintain.

 DESIGN : has been described as a multistep


process in which representations of data and
program structure, interface characteristics, and
procedural detail are synthesized from
information requirements. In general we can say
that the DESIGN IS INFORMATION DRIVEN.
 SOFTWARE ARCHITECTURE : of a program or
computing system is the structure or structures
of the system, which comprise software
components, the externally visible properties of
those components, and the relationship among
them. The architecture is not the operational
software rather is a representation that enables
to :

 Analyze the effectiveness of the design in


meeting its stated requirements.
Consider architectural alternatives and,
 Reduce risks associated with the
construction of the software.
Now, what does the term
“software components” means ?

 In the context of architectural design, a software


component can be something as simple as a
program module or an object-oriented class but,

 It can also be extended to include databases and


can also enable the configuration of a network of
clients and servers.
Software Architecture considers
two levels of the design pyramid
:

Architectural
Design

Data/class
Design
DATA DESIGN
 The data design action translates data objects into data
structures at the software component level.

 Data Design is the first and most important design activity.


Here the main issue is to select the appropriate data
structure i.e. the data design focuses on the definition of
data structures.

 Data design is a process of gradual refinement, from the


coarse "What data does your application require?" to the
precise data structures and processes that provide it. With
a good data design, your application's data access is fast,
easily maintained, and can gracefully accept future data
enhancements.
Data Design Includes :

 Identifying the data.

 Defining specific data types & storage


mechanisms.

 Insuring data integrity by using business rules and


other run-time enforcement mechanisms.
Concepts in Data Design:
 Data Modeling: Data modeling is the initial step in data design. It involves
creating a conceptual representation of the data and its relationships within the
software system. This is often done using techniques like Entity-Relationship
Diagrams (ERDs) or Unified Modeling Language (UML) class diagrams.
These diagrams depict entities (such as objects, concepts, or people) and their
attributes, as well as the relationships between these entities.
 Normalization: Normalization is the process of organizing data in a database
to reduce redundancy and improve data integrity. This involves breaking
down large tables into smaller ones and using relationships between these
tables to link data logically. Normalization helps prevent anomalies like data
duplication and ensures efficient querying and maintenance.
 Data Storage: Data can be stored in various forms, including relational
databases, NoSQL databases (such as document, key-value, columnar, or graph
databases), and even flat files. The choice of data storage depends on factors
like data volume, complexity, access patterns, and performance requirements.
 Data Structures: Data structures refer to the way data is organized and stored
in memory or on disk. In software engineering, you often work with various
data structures like arrays, linked lists, trees, graphs, and hash tables. These
structures impact the efficiency of data retrieval, insertion, and deletion
operations.
 Indexing: Indexing involves creating indexes on specific columns in a database
table to speed up data retrieval. Indexes act like a roadmap, allowing the
database management system to quickly locate data based on specific criteria.
However, over-indexing can lead to performance issues during data insertion
and updates.
 Data Integrity: Ensuring data integrity is vital in data design. It involves setting
constraints, such as unique constraints or foreign key constraints, to maintain the
accuracy and consistency of data. This prevents the insertion of erroneous or
inconsistent data into the system.
 Data Security: Data design also includes considering security aspects, such as
access control, encryption, and data masking. Sensitive data should be protected
from unauthorized access and potential breaches.
 Scalability: Data design should accommodate scalability requirements. As the
application grows and more data is generated, the data storage mechanisms
should be capable of handling increased loads without sacrificing performance.
Process of Data Design:
 Requirements Analysis: Understand the application's data requirements, including the
types of data to be stored, relationships between data entities, and anticipated usage
patterns.
 Conceptual Design: Create a high-level data model that outlines entities, attributes, and
relationships. This model abstracts the actual implementation details.
 Logical Design: Transform the conceptual model into a logical model that represents
how the data will be organized in a database. Apply normalization techniques to
minimize redundancy and improve data integrity.
 Physical Design: Translate the logical design into an actual database schema, choosing
specific data storage mechanisms, defining data types, and creating indexes.
 Implementation: Develop the necessary code to interact with the data storage
mechanisms, including database queries, data retrieval, and data manipulation
operations.
 Testing: Test the data design to ensure that data is stored, retrieved, and manipulated
correctly. Performance testing is essential to identify bottlenecks and optimize query
performance.
 Optimization and Maintenance: Continuously monitor the data design for
performance issues and make necessary optimizations. As the application evolves, the
Data Design at the Architectural
Level.
 The challenge is to extract useful information
from dozens of databases serving many
applications encompassing hundreds of gigabytes
of data, particularly when the information
desired is cross functional.

 To combat this challenge data mining techniques,


also called KNOWLEDGE DISCOVERY IN
DATABASES (KDD) are developed, that navigate
through existing databases in order to extract
appropriate business-level information.
 An Alternative solution called DATA
WAREHOUSE, adds additional layer to data
architecture. Data Warehouse is a separate
data environment that is not directly
integrated with day to day applications but
encompasses all data used by a business. In a
way it is a large, independent database that
access to the data that are stored in
databases that serve the set if applications
required by a business.
Data Design at the
Component Level.
 Data Design at the component level focuses on
the representation of data structures that are
directly accessed by one or more software
components.
What Actually these Architectural
and component level elements
mean ?

 The ARCHITECTURAL DESIGN for the software is


equivalent to the floor plan of a house, which
depicts the overall layout of the rooms, their
size, shape, and relationship to one another.

 ARCHITECTURAL DESIGN ELEMENTS gives us an


overall view of the software.
 COMPONENT DESIGN for the software is equivalent
to the set of detailed drawings for each room in the
house. These drawings depict wiring and plumbing
within each room, the switches, showers, tubs,
drain, the flooring to be used and every other
detail related with the room.

 COMPONENT LEVEL DESIGN ELEMENTS for software


fully define the internal detail of each software
component.
Concepts in Component-Level Design:
 Modularity: Modularity is a central concept in component-level design. It
involves dividing a complex system into smaller, self-contained modules or
components. Each module addresses a specific aspect of functionality, making
the system easier to understand, develop, test, and maintain.
 Cohesion: Cohesion refers to how closely the responsibilities and tasks within
a component are related. High cohesion implies that a component focuses on a
specific, well-defined purpose, while low cohesion indicates that a component
may have multiple unrelated responsibilities. Components with high cohesion
are easier to comprehend and maintain.
 Coupling: Coupling measures the degree of interdependence between
components. Low coupling implies that components are relatively independent
and can be modified without affecting other components. High coupling
increases the complexity of changes and may lead to unintended side effects
when modifying components.
 Interfaces: Components interact with each other through well-defined
interfaces. An interface specifies the methods, functions, or communication
protocols that other components can use to interact with a particular component.
Clear and consistent interfaces facilitate integration and communication
between components.
 Abstraction: Abstraction involves hiding complex implementation details and
exposing only the necessary functionality and information to other components.
This simplifies the interaction between components and allows changes to be
made to the underlying implementation without affecting the rest of the system.
 Information Hiding: Information hiding restricts direct access to internal data
and methods of a component, exposing only what is necessary for external
interactions. This prevents unintended modification of internal state and
encourages the use of defined interfaces.
 Reusability: Well-designed components are often reusable in different parts of
the system or even across different projects. Reusability reduces development
effort and promotes consistency in software development.
Process of Component-Level Design:

 Requirement Analysis: Understand the functional and non-functional


requirements of the system. Identify the major functionalities that need to be
implemented.
 Identify Components: Identify the components required to implement the
functionalities specified in the high-level design. Break down the system into
smaller, manageable units of functionality.
 Define Component Interfaces: Specify the interfaces for each component.
These interfaces should define the methods, inputs, outputs, and communication
protocols required for interactions between components.
 Design Internal Structure: For each component, design its internal structure,
including data structures, algorithms, and methods. Ensure that the component's
responsibilities are well-defined and cohesive.
 Ensure Cohesion and Low Coupling: Aim for high cohesion within each
component and minimize coupling between components. This promotes
maintainability and flexibility.
 Implement Components: Develop the code for each component according to the
defined interfaces and internal design. Follow programming best practices to
ensure the quality and readability of the code.
 Testing: Test each component in isolation using unit tests to verify its correctness
and functionality. Additionally, conduct integration testing to ensure that
components interact as expected.
 Documentation: Document the purpose, functionality, interfaces, and usage instructions for each
component. This documentation aids in understanding and using the components in the future.

 Integration: Integrate the components to form the complete system. Test the integrated system to
identify and address any issues that arise during component interaction.

 Optimization and Refinement: Analyze the system's performance and identify areas for
optimization. Refine the design and implementation as needed to improve efficiency and
maintainability.

 Maintenance: As the system evolves, continue to maintain, update, and enhance the components
to meet changing requirements.

 In conclusion, component-level design is a crucial phase in software engineering that involves


decomposing a system into modular components with well-defined interfaces and
responsibilities. By focusing on modularity, cohesion, coupling, and clear interfaces, component-
level design promotes software that is easier to develop, test, maintain, and scale.

You might also like