Docstoc

Database

Document Sample
Database Powered By Docstoc
					              Database

          What is a Database?

 A database is a collection of related data
items, which are linked and structured so
that the data can be accessed in a number
                 of ways.
            Examples of Databases

 A library system – The librarian scans in your library book
  or card, via the barcode reader as a data capture method, to
  access information about the book or you.

 GCSE results – The examination boards keep details of
  examination results and student records.

 Doctors – keep patient records and appointment details.

 BT – keeps details of customer telephone numbers and
  names
           How is a Database constructed?
             TABLES
                                                    Entities are made up
                                                     of Attributes – An
                                                    attribute is called a
Student   Surname   Christian    Date of   Gender
                                                            field
Reg. No              Name         Birth
PTT0376   Brown     Diana       11/5/75    F
                                                       Tables are made up of
PTW0890   Smith     Fred        15/8/85    M
                                                              Records
FTM0570   Meadows   Angela      19/4/63    F
                         Data Types

Fields are made up of different
 data types. There are many
                                  Student   Surname   Christian    Date of   Gender
    different data types eg:      Reg. No              Name         Birth
              Text                PTT0376   Brown     Diana       11/5/75    F
            Number
                                  PTW0890   Smith     Fred        15/8/85    M
           Date/Time
           Currency               FTM0570   Meadows   Angela      19/4/63    F

         Auto number
            Yes/No                      What data types are used in the
                                               Student Table?

                                       What data type would we use for
                                            Telephone Number?
                           Field Properties
When we have chosen the Data Type – It is important to set the properties.
The properties cover a host of different things from how the data is displayed to
the field size.
Date, for example, can be displayed in long, short or medium format, ie 08
March 2003, 08/03/03, 8 Mar 03.
Data can be validated so that only acceptable data is allowed in a field, eg >8.
Currency can be displayed in Integer format or to a number of decimal places.
   DESIGNING YOUR DATABASE IS THE MOST IMPORTANT PART –
                RUBBISH IN – RUBBISH OUT
                                            Field Properties

         Student    Surname   Christian    Date of     Gender
         Reg. No               Name         Birth                   What field properties have been
         PTT0376    Brown     Diana       11/5/75     F                 used in this example?
         PTW0890    Smith     Fred        15/8/85     M


         FTM0570    Meadows   Angela      19/4/63     F


                                                                   Gender Field size is 1


     Student                                         Date/Time
Registration No            Field sizes for            is set for
  field size is 6          Surname and               short date
Validation – only         Christian Name
 data which has         are normally set at
three letters and         25 characters –
 three numbers           some people have
will be accepted         double barrelled
                               names
                        Primary Keys

A table normally has a Primary
                                  Why don’t we use Names or Dates
           Key                     of Birth as a Primary Key?
  A Primary Key is a unique
          identifier
                                 Student     Surname   Christian    Date of   Gender
     You all have unique         Reg. No                Name         Birth

 identifiers, for example your   PTT0376     Brown     Diana       11/5/75    F


           NHS No.               PTW0890     Smith     Fred        15/8/85    M


   NIN (National Insurance       FTM0570     Meadows   Angela      19/4/63    F

         Number)
   Student Registration No.                Which Field is the Primary
                                                     Key?
                                 Relational Database
 Student Details Table

Student    Surname     Christian     Date of   Gender
Reg. No                 Name          Birth
                                                         TABLES STORE THE
                                                          INFORMATION – A
PTT0376    Brown       Diana        11/5/75    F
                                                        DATABASE CAN HAVE
PTW0890    Smith       Fred         15/8/85    M
                                                        MANY TABLES WHICH
FTM0570    Meadows     Angela       19/4/63    F
                                                            ARE LINKED
   1                                                         TOGETHER
                                       
                                                        THESE ARE CALLED
Course    Course     Part-       Student
No        Tutor      Time/Full   Reg. No                  RELATIONAL
                     Time
                                                           DATABASES
MAT769    Tom        P/T         PTT0376
          Hanks

ENG054    Lisa       P/T         PTW0890
          Wilson

HIS091    Paula      F/T         PTT0376
          Walters


Course Details Table
          Benefits of Relational
               Databases
 We use relational databases to store vast
  amounts of logically related information
 Information can be stored in separate tables
 Queries or interrogating the database will
  allow all linked tables to be accessed as one
 Reports can be used to display the results
             Microsoft Access

 The relational database software we are
  going to learn to use is Microsoft Access
 This software is part of the Office
  Professional suite of programs that we have
  been working with, ie Word, PowerPoint.
 Benefits of using a suite of programs is that
  we can exchange information between the
  programs

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:49
posted:7/1/2012
language:simple
pages:10