0% found this document useful (0 votes)
35 views34 pages

M5 Access 2024

This document provides an overview of database design, including key concepts such as the entity-relationship model, normalization, and database management systems. It outlines the principles of effective database design, advantages of using databases, and various types of database queries and their languages. Additionally, it covers the architecture of database systems and the main components of Microsoft Access.

Uploaded by

ashry_tarek
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)
35 views34 pages

M5 Access 2024

This document provides an overview of database design, including key concepts such as the entity-relationship model, normalization, and database management systems. It outlines the principles of effective database design, advantages of using databases, and various types of database queries and their languages. Additionally, it covers the architecture of database systems and the main components of Microsoft Access.

Uploaded by

ashry_tarek
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/ 34

FDTC

Module 5
Database

Eng. Eslam AbdelRazek


Contents
• Database Design
• The Entity-Relationship Model
• Database Design Principles
• Normalization
• Database Queries
• Database System Architecture
• Accountability Roles
• Definitions
• Main Microsoft Access Components
Database Design
• Data and Database
• Databases vs. Database Management Systems
• Relational Database Management Systems
Data and Database
• Data: Are basic facts or values.
• Information: It is the data that has been processed and has
become more meaningful and valuable.
• Processing: It is the operations and procedures that are applied to
data to obtain a specific purpose (information).
• Database:
• Set of related data.
• An organized collection of structured data.
• Is a place where the data is stored.
• Consisting of independent tables serves little purpose.
Data and Database
• Database objects: Are the structure or schema in which databases are
stored.
• Database models: It is the way in which data is organized according to
its nature and connection together. There are many images of
database models, such as the hierarchy model and the relational
model.
• File: It is a group of records linked together and stored as a single unit.
Advantages of using databases
• Save all the information you want to save, even if it is in huge
quantities.
• The ability to make any modifications to this data.
• Collect all data in indexed classified and arranged manner so that any
of this data can be referred to with complete ease.
• Ease of understanding the relationships between data and enables
extracting information that was not in its direct form.
• Maximize the value of existing data.
• Quickly obtain the required information or data.
• Storing and reviewing data and extracting reports.
Database Management Systems
• Database Management Systems :Used to manage and manipulate
that database.
• DBMS:
• It is a software system that is responsible for managing all aspects of a
database.
• The controlling software include Access, SQL Server, MySQL, Oracle, DB2.
• Referred to database engines.
Advantages of Database Management Systems
1. Data recovery and backups.
2. Instant data update.
3. Minimize data redundancy.
4. Data consistency or consistency.
5. Provides flexibility.
6. Availability of standard specifications.
7. Share data.
8. Easy maintenance.
9. Data independence.
10. Data security and confidentiality is very high.
Relational Database
• Relational Databases : Data is organized into relations.
The Entity-Relationship Model of a Database
• Entities
• Relationships
• Attributes
• Entity Relationship Diagram (ERD)
• Notation
• Primary Key
• Foreign Key
Relationships and Attributes
• Entities: are the people, places, things, or events that are of interest
for a system.
• Relationships: Describes how the entities related to each another.
• Attributes: Entities and relationships have characteristics that
describe them.
Entity-Relationship Model
• ERD :
• Entity Relationship Diagram.
• Modeling system requirements are analyzed and classify our knowledge in
terms of entities, relationships, and attributes.
• A relational database and implement as a physical database.
Notation
Type of relationships
• One-To-One

• One-To-Many

• Many-To-Many
Database Design Principles
• Eliminate Data Redundancy
• Ensure Data Integrity and Accuracy

• Redundancy: the same piece of data shall not be stored in more than
one place. This is because duplicate data not only waste storage
spaces but also easily lead to inconsistencies.
Database Design Process
1. Determine the purpose of the database.
2. Identify and organize the required data.
3. Divide the data and distribute it into tables according to their
description of the elements.
4. Convert the data elements in each table into columns.
5. Define primary keys.
6. Set up table relationships according to the linking of data together.
7. Review the entire database.
8. Applying normalization rules.
Types of keys
• Primary key (The field that distinguishes a record from other records. It consists of only one field and
is characterized by the following: * No two values in a primary key field are the same * None of the values
must be Null - Preferably a number)

• Composite key (It has the same properties as the primary key, but it consists of two or more fields)
• Foreign key (It is a primary key in another table that has the same data Type The value can be
repeated with it)
• Alternative key (It is a primary key in a table (such as the national number as a non-duplicate
primary key) It can be replaced with another alternative field, such as: Student code )
Normalization
• Normalization: database is structurally correct and optimal.

• Entity Integrity: The primary key cannot contain NULL.


• Referential Integrity: foreign key value must be matched to a primary
key value in the table referenced.
• Business logic Integrity: zip code shall be 5 digits within a certain
range.
Normalization
• First Normal Form (1NF):
A table is 1NF if every cell contains a single value
• Second Normal Form (2NF):
A table is 2NF, if it is 1NF and every non-key column is fully dependent
on the primary key.
• Third Normal Form (3NF):
A table is 3NF, if it is 2NF and the non-key columns are independent
of each other’s.
Database Queries
• Query languages: Special languages that are used to formulate
queries.
• Query languages: designed to create new tables.
• SQL can do much more besides querying.
• The structured query language is divided into two major portions.
Database Queries
• Structured Query Language (SQL)
• Data Definition Language (DDL)
• Data Manipulation Language (DML)
• A data control language (DCL)
Data Definition Language (DDL)
• Create (command builds a new table)
• ALTER (command modifies table structure)
• DROP (command is used to delete objects)
• TRUNCATE (statement is used to remove)
Data Manipulation Language (DML)
• SELECT (used to retrieve or fetch data from a database)
• UPDATE (modifies data of one or more records.)
• INSERT INTO (adds one or more records)
• DELETE FROM (removes one or more records)
Types of inquiries
1. Select Query (It is considered one of the most common types. It is used to retrieve data from one
or more tables and displays the results on a data page.)
2. Action Query
1. Delete Query
2. Update Query
3. Append Query
4. Create-Table Query
3. Parameters Queries or Criteria Conditions (When it runs, it displays its own dialog box
asking you for information such as specific criteria for retrieving records or a value you want to insert into a
field.)
4. Crosstab Queries (Crosstab queries are used to calculate and reconstruct data for easier data analysis.)
5. SQL queries (It is a query that you create using a SQL statement.)
Database System architecture
• Database System architecture :database system is often pictured as a
three-level structure.
1. physical database: the data have no logical meaning AND
consists of the raw data existing on a physical object.
2. conceptual database: gives the data a logical structure AND
view of the database as a whole
3. Views: The highest level of the data that may be held by users
of the database.
Database System Architecture
Database Administrators
• System Analyst (requirements Collecting & analyzing)
• Database designer (Converting requirements to DB components)
• Database developer (Creating the DB)
• Programmer (Develop programs dealing with DB)
• Database Manager (Administrator)
• Database Users (End-Users, Data entry)
• Operators (Checking the operation flow)
• Maintenances (Monitoring, addressing errors)
Database Administrator Phases

Database designer
Database developer
System Analyst

Operators Database designer

Database Manager
Database developer Database designer
Definitions
• Robustness: ability to recover from system failures without data loss.
• Data dictionary: provides a list of the definitions of all objects in the
main database.
• The Jet Database Engine (Jet DBMS) :is a collection of components.
• Repository: It is a database server.
Main Microsoft Access Components
• Table (They are the place where data is stored in the database. Tables consist of fields (columns) and
records (rows))
• Fields
• Attributes
• Relations
• Form (They are the place to record and edit the data that you want to save in the table.)
• Queries (They are objects for performing operations on data in tables, retrieving data)
• Report (They are objects for displaying and printing Data in various forms, methods and
formats)
Common Data types
Data type Description
Short Text Letters and numbers that are not included in mathematical operations.
The maximum number of characters that can be stored in the field. The
maximum allowed is 255 characters.
AutoNumber To insert an automatic number for each record added to the table

Date/Time For fields whose entries are dates and times


Number Fields that will be entered into calculations Number fields, this property
sets the type of number that will be stored (long integer, double)
Currency Adds the currency symbol next to the number

Yes/No It includes data that can be classified into yes, no, or true and false
Lookup wizard Enter a set of values and choose from them
OLE Object It is used to store an object found in another program such as images and
graphs and link them to the database.
Common Data types
Data type Description
Attachment Letters and numbers that are not included in mathematical operations.
The maximum number of characters that can be stored in the field. The
maximum allowed is 255 characters.
Hyperlink Specify the data type for this field with a link to a site or program

Long Text Dynamic text about 60,000 characters


Common Field properties
Data type Description
Field size It means the storage space reserved for field values and varies
depending on the data type
Required This property sets whether a value is required in this field. If this
property is set to Yes, Access will not allow a new record to be added
unless a value is entered for this field.
indexed Determines whether the field contains an index. There are three
values available (No, Yes duplicates ok, Yes no duplicates)
Validation rule It is a rule that is set by the developer so that the value of the data
recorded in that field is checked according to that condition
(verification rule), for example, the values must be greater than 18
years and less than 60 in the worker’s age field.
Validation text An explanatory message is written for the error made by the data
entry if it does not agree with the condition (verification rule) set
for the field
Default value Initial value in case of null
Thank You
Questions?

You might also like