Day 03 - MS Access 2007

Embed Size (px)

Citation preview

  • 8/10/2019 Day 03 - MS Access 2007

    1/12

    Lesson 2:

    Planning and Designing a Database

    Day 3

  • 8/10/2019 Day 03 - MS Access 2007

    2/12

    Careful Planning is very important toeffective management. Without careful

    planning, the database may not serve its

    purpose of may contain so many fields that are

    not important. Correcting such errors can

    become a tiresome job.

  • 8/10/2019 Day 03 - MS Access 2007

    3/12

    The 3 Stages of Database Design

    1.Data Definition

    2.Data Refinement3.Establishing Relationships

    between tables

  • 8/10/2019 Day 03 - MS Access 2007

    4/12

    1. Data Definition

    Data Definition is the stage where we gather and list

    all necessary fields for our database.

    We think of all the data we need to store in the

    database

    Example:

    Student

    Information

    Student ID

    NameHome Phone

    Grade & Sec

    Book

    Information

    Book ID

    TitleSubject

    Transaction

    Information

    Transaction ID

    Borrower ID

    Borrower Name

    Book ID:

    Book Title

    Date BorrowedDue Date:

  • 8/10/2019 Day 03 - MS Access 2007

    5/12

    2. Data Refinement

    Data Refinement is the stage where you have to

    breakdown some fields to more specific fields so we

    can store information in the smallest logical parts.

    Example:

    Student

    Information

    Student ID

    NameHome Phone

    Grade & Sec

    First Name

    Last Name Grade

    Section

  • 8/10/2019 Day 03 - MS Access 2007

    6/12

    The same goes with the address field, (if we

    have to include this field). Anytime we want to

    search for student that live in a particular city,

    we can simply specify what city are we looking

    for and all the students that live in that city

    would be displayed. Below is an example of

    refined list of the three tables:

    Fields are broken down to the

    smallest logical parts to facilitatethe search for information in the

    database.

  • 8/10/2019 Day 03 - MS Access 2007

    7/12

    3. Establishing relationships between tables

    After you have created the table structure for your

    database, you need a way of telling your databasehow to bring that information back together again.

    This is done by establishing relationships between

    tables.

    In this stage, we analyze our tables more closely andcreate a relationship between table so that we will

    be able to view and access records from both table.

    Relationship is an association established

    between common fields (columns) in two

    table. A relationship can be one-to-one, one-

    to-many, or many-to-many.

  • 8/10/2019 Day 03 - MS Access 2007

    8/12

    Creating a table structure

    It is very important that there is a field or set of

    fields that uniquely identifies each individual

    record in a table in order for Access to connect

    information stored in separate tables. This field is

    called the Primary Key.

  • 8/10/2019 Day 03 - MS Access 2007

    9/12

    Primary key is one or more fields (columns) whose

    value or values uniquely identify each record in a

    table.

    Student

    Information

    Student ID

    First Name

    Last Name

    Home PhoneGrade

    Section

    Book

    Information

    Book ID

    Title

    Subject

    Transaction

    Information

    Transaction ID

    Borrower ID

    Borrower Name

    Book ID:Book Title

    Date Borrowed

    Due Date:

  • 8/10/2019 Day 03 - MS Access 2007

    10/12

    Determining appropriate data output

    for base

    In addition to thinking about what kinds of

    information will go into the database, you must

    give careful consideration to the ways in which

    information will come out of database.

    The first step is to design the user interface,

    particularly the main menu.

  • 8/10/2019 Day 03 - MS Access 2007

    11/12

    If you create the user interface first, you will

    find that defining the properties to go along

    with the main menu goes much smoother

    Another thing to consider is how you want your

    database to display the information you need.

    For example, in your library system project, you

    must consider how would you display these

    results:

  • 8/10/2019 Day 03 - MS Access 2007

    12/12

    -List of all books borrowed on a specific date

    -List of all books by subject

    -List of all borrowed by year and section

    -And the design of reports in which these data

    will be displayed.