0% found this document useful (0 votes)
5 views6 pages

Computer Literacy pdf-5

The document outlines a step-by-step process for designing a database, starting from gathering user information to testing the final product. It details the types of relationships in Microsoft Access, including one-to-one, one-to-many, and many-to-many, explaining their implementation and importance for data integrity and efficiency. Establishing these relationships is crucial for effective data management and analysis within relational databases.

Uploaded by

sibiyawandile111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Computer Literacy pdf-5

The document outlines a step-by-step process for designing a database, starting from gathering user information to testing the final product. It details the types of relationships in Microsoft Access, including one-to-one, one-to-many, and many-to-many, explaining their implementation and importance for data integrity and efficiency. Establishing these relationships is crucial for effective data management and analysis within relational databases.

Uploaded by

sibiyawandile111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Question 2.

Step 1: Gather Information

• Ask Users: Talk to people who will use the database to understand their
needs.

• Review Current System: Find out if they already use a database and what
works or doesn’t work.

• Check for Issues: Look for duplicate data, unnecessary data, or missing
information.

• Observe Workflows: Watch how users work with current data and get their
feedback.

Step 2: Define Database Purposes

• List Database Uses: Write down every task the database needs to perform,
like creating reports or tracking sales.

Step 3: Identify Required Data

• List Needed Information: Write down all data the database should store, like
Customer Name, Contact Info, etc.

Step 4: Remove Duplicate Data

• Check for Redundancy: Remove any duplicate data across tables.

• Link Tables: Set up links between tables so information can be easily


accessed.

Step 5: Design Queries and Reports

• Build Queries and Reports: Use your findings to design the queries and
reports needed to manage and display data.

Step 6: Set Up Security

• Control Access: Decide who can see or edit data and set security levels.
Step 7: Plan and Test

• Finalize the Plan: Ensure everything is clear and complete before building.

• Test Thoroughly: Check the database’s performance and security before


making it live.

2.2

In Microsoft Access, tables are linked through relationships that connect data across
multiple tables using a shared field (usually a primary key and a foreign key). These
relationships establish the foundation for effective data retrieval, integrity, and
analysis. Here are the three primary types of relationships in Access, along with
detailed explanations and examples based on your database:

1. One-to-One Relationship

A one-to-one relationship means that a single record in one table corresponds to a


single record in another table. In practice, one-to-one relationships are less common
but are used when splitting information between tables for organizational or security
reasons.

For example:

• Use Case: If you had a "Customer" table and a "Customer Details" table,
where each customer’s sensitive information (like payment details) is stored
separately from their basic information.

• Implementation: Both tables would share the Customer ID as the primary key
in each table.

• Why: This separation can improve security by limiting access to sensitive data
only to users with permissions for the secondary table.

In your current setup, you may not have a natural one-to-one relationship, but if you
were to expand and include secure or confidential information tied to customers or
products, this relationship type might be beneficial.

2. One-to-Many Relationship

The one-to-many relationship is the most common in relational databases. Here, a


single record in one table can relate to multiple records in another table. This setup
is essential for organizing large datasets, as it allows you to centralize information
while maintaining efficient data structure.

For example:

• Customer-Order Relationship: In your database, a Customer table could be


linked to an Order table through Customer ID. One customer might place many
orders, but each order is associated with only one customer.

• Product-Supplier Relationship: Your Supplier table can link to the Product


table using Supplier ID as the foreign key in the Product table, meaning each
supplier could provide multiple products.

• Why: This relationship optimizes storage by allowing shared information to


reside in one location (e.g., customer or supplier details), reducing data redundancy.
When accessing data, Access can retrieve multiple related records from one table
based on a single record in another.

To set this up in Access:

1. Go to Database Tools > Relationships.

2. Drag the primary key (e.g., Customer ID in the Customer table) to the foreign
key (Customer ID in the Orders table).

3. This establishes a one-to-many link, enabling more efficient data


management and querying.

3. Many-to-Many Relationship

A many-to-many relationship occurs when records in one table can relate to multiple
records in another, and vice versa. Microsoft Access doesn’t support this directly, so
a junction table is used to represent the relationship indirectly by breaking it into two
one-to-many relationships.

For example:

• Sales and Products: If you wanted to track which products are in which sales
transactions, each sale might include multiple products, and each product might be
part of multiple sales. Here, you’d create a SalesProduct junction table with both
Sale ID and Product ID.
• Implementation: The Sales Product table would have two foreign keys (Sale
ID and Product ID), forming two one-to-many relationships (one with Sales and one
with Products).

• Why: This setup is efficient for handling complex relationships, as it organizes


data without redundancy, reduces storage costs, and maintains data integrity by
eliminating duplicated records.

To create a many-to-many relationship in Access:

1. Create a new table (e.g., SalesProduct) with foreign keys referencing the
primary keys of both Sales and Products.

2. Link each foreign key in the junction table to the respective primary key in the
related tables.

3. This way, Access can manage complex relationships, allowing for efficient
querying and reporting on shared data.

Summary

These relationships—one-to-one, one-to-many, and many-to-many—form the


backbone of relational databases like Microsoft Access. By establishing relationships
through shared fields, you ensure that your database is efficient, minimizes
redundancy, and supports complex data analysis across multiple connected tables.
Each type of relationship serves a specific organizational purpose, helping maintain
data integrity while also enhancing data accessibility and accuracy.

2.3a Design view


2.3b Data Sheet view

2.4
2.5

You might also like