Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

Week 4 Database Design

Database design steps


• Step 1: Understand the user requirements.
• Step 2: Perform entity relationship modelling and produce
ERD’s.
• Step 3: Carry out the normalisation process.
• Step 4: Create your table designs.
• Step 5: Design the application
• Step 6: Create the query and report designs.
• Step 7: Create test plans for tables, forms, queries and
reports.
Design Considerations
1. What does the user want?
2. What database system will you use?
• A simple desktop database for a single user = Microsoft Access.
• Larger multi-user and web-based database systems = MySQL,
Oracle Database.
3. Consider the physical modelling of the database.
4. How will you implement the database system?
5. Will you create a prototype?
6. How will you maintain data integrity?
Table Design
• The table design lists all the fields and their
attributes for each table you identified in your
ERD and during the normalisation process.

• Attributes: the table design needs to list the


following for every field in a table:
• The field names
• The data types
• The field size
• Validation (if any) to be applied to the field.
Which of these are Data types?

Strings Characters Function Numbers

Integar PPI Array Structures

Float Variable Boolean Camel case


6. Database integrity
• Type of database integrity:
1. Physical integrity
2. Referential integrity
3. Entity integrity
6. Database integrity
• Integrity issues:
delete anomaly, insert anomaly, update anomaly

• Cascade delete and cascade update


Microsoft access provides these options when creating relationships between table:
• Cascade delete – if you delete a record at the ’one’ end of a relationship the related
records at the ‘many’ end are automatically deleted.
• Cascade updates - if you update (change) the key field value of a record at the ‘one’
end, then the corresponding foreign key values of records at the ’many’ end are
automatically updated.
If you don’t have these options switched on, you run the risk of creating delete or
update anomalies, which break the link between records in a one-to-many relationship.
Data Protection
The Data Protection Act 2018 is the UK’s implementation of the General Data
Protection Regulation (GDPR).
Data protection principles
• used fairly, lawfully and transparently
• used for specified, explicit purposes
• used in a way that is adequate, relevant and limited to only what is necessary
• accurate and, where necessary, kept up to date
• kept for no longer than is necessary
• handled in a way that ensures appropriate security, including protection
against unlawful or unauthorised processing, access, loss, destruction or
damage
User interface design
User interface design: This is how the user will interact with
the database

The three main types of form are used in user interface:

1. Menu
2. Data entry forms
3. Data viewing forms
User interface design
• Data entry
oValidation
oVerification
oCalculated fields
oInput masks
oDirected input
Reports and presentation
Data reports: are used when a printed output is
needed, such as an order confirmation, a ticket or a
invoice or statement

Presentation: The use of colours, lines and boxes


within the tables may also help the user to understand
the data.
• Forms are used to customize formats for adding, editing, deleting or
displaying data.
• Queries display information from one or more tables based on a
selection criteria.
• Reports contain data from one or more tables and databases that can
be printed. Selective fields and records can be displayed in a report.
• Macros perform a fixed set of tasks every time they are run.

You might also like