System Analysis and Design · Unit 4 · 7 hrs
Design
Exam-focused notes for Design (System Analysis and Design, CSC326): what the TU syllabus asks and how it has actually been tested, with 9 solved past questions from this unit.
Design in short
Design bridges the problem domain and the working system: having established what the system must do, this chapter turns that specification into a database, physical files, and the forms, reports, interfaces and dialogues through which people actually use it.
What this unit covers
- Designing Databases: Introduction
- Database Design
- Relational Database Model
- Normalization
- Transforming E-R Diagrams Into Relations
- Merging Relations
- Physical File and Database Design
- Designing Fields
- Designing Physical Tables
- Designing Forms and Reports: Introduction
- Designing Forms and Reports
- Formatting Forms and Reports
- Assessing Usability
- Designing Interfaces and Dialogues: Introduction
- Designing Interfaces and Dialogues
- Interaction Methods and Devices
- Designing Interfaces
- Designing Dialogues
- Designing Interfaces and Dialogues in Graphical Environments
Designing Dialogues
2082 · 5 marks
Explain the steps involved in the dialogue design process. [5]
Designing Physical Tables
2082 · 5 marks
Describe the process of designing physical tables. [5]
Designing Interfaces
2081 · 5 marks
How do you think effective interfaces can be designed? Explain. [5]
Normalization
2081 · 5 marks
List the advantages of Normalization. Explain 2NF with an example. [5]
Show solved answerHide answer
Advantages of Normalization and Explanation of 2NF
Advantages of Normalization
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. Its key advantages are:
- Eliminates Data Redundancy: Removes duplicate data stored across multiple tables, saving storage space.
- Prevents Update Anomalies: Ensures that updating a single fact requires changing it in only one place.
- Prevents Insertion Anomalies: Allows new data to be inserted without requiring unrelated data to be present.
- Prevents Deletion Anomalies: Ensures that deleting a record does not unintentionally remove other important data.
- Improves Data Integrity and Consistency: Data remains accurate and consistent throughout the database.
- Easier Maintenance: A well-normalized database is easier to modify and extend.
Second Normal Form (2NF)
Definition
A relation is in Second Normal Form (2NF) if:
- It is already in First Normal Form (1NF), AND
- Every non-key attribute is fully functionally dependent on the entire primary key (i.e., there is no partial dependency on any part of a composite primary key).
Partial Dependency: A non-key attribute depends on only a part of the composite primary key, not the whole key.
Example
Consider the following relation with a composite primary key (StudentID, CourseID):
| StudentID | CourseID | StudentName | CourseName | Marks |
|---|---|---|---|---|
| S01 | C01 | Ram | DBMS | 75 |
| S01 | C02 | Ram | OS | 80 |
| S02 | C01 | Sita | DBMS | 70 |
Primary Key: (StudentID, CourseID)
Identifying Partial Dependencies:
StudentNamedepends only onStudentID(not on the full key) -- Partial DependencyCourseNamedepends only onCourseID(not on the full key) -- Partial DependencyMarksdepends on bothStudentIDandCourseID-- Full Dependency (OK)
Since partial dependencies exist, this relation is NOT in 2NF.
Converting to 2NF
We decompose the table to remove partial dependencies:
Table 1: Student (depends on StudentID)
| StudentID | StudentName |
|---|---|
| S01 | Ram |
| S02 | Sita |
Table 2: Course (depends on CourseID)
| CourseID | CourseName |
|---|---|
| C01 | DBMS |
| C02 | OS |
Table 3: Enrollment (depends on full composite key)
| StudentID | CourseID | Marks |
|---|---|---|
| S01 | C01 | 75 |
| S01 | C02 | 80 |
| S02 | C01 | 70 |
Now all non-key attributes are fully functionally dependent on the entire primary key in each table. The database is now in 2NF.
Note: 2NF is only relevant when the primary key is composite. If a relation has a single-attribute primary key and is in 1NF, it is automatically in 2NF.
Physical File and Database Design
2080 · 10 marks
Explain physical database design. Why is physical database design important? Differentiate logical database design with physical database design.[10]
Show solved answerHide answer
Physical Database Design
Definition
Physical database design is the process of transforming a logical database model into a physical implementation on a specific hardware and software platform. It involves decisions about how data will be physically stored, accessed, and managed in secondary storage (disks). In physical design, the logical specifications of the system are transformed into technology-specific details.
The main purpose of database design (both logical and physical) is to produce logical and physical designs of the proposed database system to meet the requirements of users and for high performance.
Key Activities in Physical Database Design
1. Designing Fields
- A field is the smallest unit of application data recognized by system software such as a programming language or a DBMS.
- An attribute from a logical database model may be represented by several fields.
- A field that can be derived from other database fields is called a calculated field.
- Some database technologies allow explicit definition of calculated fields; the system either stores the calculated value or computes it when requested.
2. Designing Physical Tables
A physical table is a named set of rows and columns that specifies fields in each row. The design of a physical table has two goals:
| Goal | Description |
|---|---|
| Efficient use of secondary storage | Relates to how data are loaded on disks; depends on operating system parameters |
| Data processing speed | Data are most efficiently processed when stored close to one another in secondary memory, minimizing the number of I/O operations |
3. Designing Forms and Reports
- Forms are used to collect or present information on a single item (customer, product, event); used for both input and output.
- Reports are the product of input and output design and are purely used for reading.
- Forms provide fields for data input; reports do not.
4. Additional Physical Design Decisions (standard CS supplement)
- Choosing file organization (sequential, indexed, hashed)
- Defining indexes to speed up query processing
- Selecting storage structures and access paths
- Partitioning and clustering of data
- Allocating disk space and buffer management
Why is Physical Database Design Important?
Physical database design is important for the following reasons:
-
High Performance: Proper physical design minimizes I/O operations by storing related data close together in secondary memory, resulting in faster data retrieval and processing.
-
Efficient Storage Utilization: It ensures efficient use of secondary storage (disk space), avoiding wastage and reducing storage costs.
-
Meeting User Requirements: The main purpose of database design is to produce a system that meets the requirements of users; physical design is the stage where this is actually implemented on real hardware.
-
Technology-Specific Optimization: Logical design is platform-independent, but physical design transforms those specifications into technology-specific details suited to the actual DBMS and hardware being used.
-
Scalability and Reliability: Good physical design ensures the database can handle growing data volumes and remains reliable under heavy load.
-
Support for Application Interfaces: Physical design supports the design of forms and reports that users interact with, making the system usable and responsive.
Differentiation: Logical Database Design vs. Physical Database Design
| Aspect | Logical Database Design | Physical Database Design |
|---|---|---|
| Definition | Organization of data into a conceptual model independent of any hardware or software | Transformation of the logical model into technology-specific physical storage structures |
| Platform Dependency | Independent of any specific hardware or software platform | Dependent on specific hardware, OS, and DBMS platform |
| Focus | What data to store and how data relate to each other | How and where data will be physically stored |
| Tools/Techniques | Normalization, E-R modeling, consolidation of user-interface data requirements | File organization, indexing, table design, field design |
| Output | Normalized logical data model (tables, relationships, attributes) | Physical tables, fields, indexes, storage allocations |
| Level of Abstraction | High-level, abstract representation | Low-level, implementation-specific representation |
| Goal | Correctness, consistency, and completeness of data model | Efficiency of storage and speed of data processing |
| Process | Develop normalized data model for each user interface; combine into one consolidated logical model; translate E-R model | Design fields, physical tables, forms, reports; define indexes and access paths |
| Consideration | Business rules, relationships, constraints | I/O operations, disk storage, buffer management |
| Phase | Done before physical design | Done after logical design is finalized |
Summary
In short, logical database design answers "What data should be stored and how are they related?" while physical database design answers "How and where will the data actually be stored on the hardware?" Both are essential phases in the database design process, and physical design is critical because it directly determines the performance, efficiency, and usability of the final database system.
Interaction Methods and Devices
2080 · 5 marks
Describe several methods for interacting with the system. [5]
Designing Forms and Reports
2079 · 5 marks
Compare form with report. Explain the process of designing forms and reports. [5]
Database Design
2078 · 5 marks
What is the purpose of database design? Compare logical design with physical design. [5]
Formatting Forms and Reports
2076 · 5 marks
How do you format forms and reports? Explain general guidelines for formatting forms and reports. [5]
Make Unit 4 stick
Practice CSC326 with flashcards & quizzes