SlideShare a Scribd company logo
Building a Database and Defining Table
             Relationships

Microsoft Access 2010
               ®
Objectives   XP


      • Learn the guidelines for designing databases
        and setting field properties
      • Modify the format of a field in Datasheet view
      • Create a table in Design view
      • Define fields and specify a table’s primary key
      • Modify the structure of a table




New Perspectives on Microsoft Access 2010                     2
Objectives   XP


      • Import data from an Excel worksheet
      • Create a table by importing an existing table
        structure
      • Add fields to a table with the Data Type gallery
      • Delete, rename, and move fields
      • Add data to a table by importing a text file
      • Define a relationship between two tables


New Perspectives on Microsoft Access 2010                     3
Table Window in Design View   XP




New Perspectives on Microsoft Access 2010                   4
Guidelines for Designing Databases     XP

      • Identify all the fields needed to produce the
        required information
      • Organize each piece of data into its smallest
        useful part
      • Group related fields into tables
      • Determine each table’s primary key
      • Include a common field in related tables
      • Avoid data redundancy
      • Determine the properties of each field

New Perspectives on Microsoft Access 2010                    5
Guidelines for Setting Field Properties XP
     • You must name each
       field, table, and other
       object
     • Choose an
       appropriate data type
          Database Table Data Types:

          The newest version of Microsoft Access marks the introduction of a new data types for your
          fields when creating tables. In addition to these new formats there are also changes to the
          previous formats that were available in earlier versions of Microsoft Access.

          Data Types


          Microsoft Access 2007 Data Types


          Data Type       Description

                          An AutoNumber field creates unique values automatically when Access creates a
          AutoNumber
                          new record. The AutoNumber field is primarily used for Primary Keys in Access.

                          A Text field can contain values that are text, numeric or a combination of both.
          Text
                          A text field can contain a maximum length of 255 characters.

                          A much larger version of the text field, allowing storage of up to 2 GB of data. A
          Memo            new feature of the Microsoft Access Memo field is that it now supports rich text
                          formatting.

          Number          The Number field can store numeric values up to 16 bytes of data.

                          The Date/Time field allows storage of date and time information. The date/time
          Date/Time
                          field now also includes the Auto Calendar feature.

                          The Currency data type stores values in a monetary format. This can be used
          Currency
                          with financial data as 8-byte numbers with precision to four decimal places.

          Yes/No          Boolean data storage of true/false values.

                          The OLE Object field stores images, documents, graphs etc. from Office and
          OLE Object      Windows based programs. The maximum data size is 2 GB, although this will
                          slow down a database.

                          The Hyperlink field type is used to store web addresses. This has a maximum
          Hyperlink
                          size limit of 1 GB of data.

                          The Attachment field type is used to store images, spreadsheet files,
                          documents, charts and other types of supported files to the records in your
          Attachment
                          database. This is a new feature that has been introduced with Microsoft Access
                          2007




New Perspectives on Microsoft Access 2010                                                                      6
Guidelines for Setting Field Properties XP
      • The Field Size property defines a field value’s
        maximum storage size for Text, Number, and
        AutoNumber fields only
         Byte
         Integer
         Long Integer
         Single
         Double
         Replication ID
         Decimal
New Perspectives on Microsoft Access 2010                 7
Changing the Format of a Field in   XP
                           Datasheet View




New Perspectives on Microsoft Access 2010                    8
Creating a Table in Design View   XP


      • Creating a table in Design view involves
        entering the field names and defining the
        properties for the fields, specifying the
        primary key, and saving the table structure




New Perspectives on Microsoft Access 2010                    9
Defining a Field in Design View   XP


      • In the Field Name box, type the name for the
        field, and then press the Tab key
      • Accept the default Text data type, or click the
        arrow and select a different data type for the
        field. Press the Tab key
      • Enter an optional description for the field, if
        necessary
      • Use the Field Properties pane to type or select
        other field properties, as appropriate

New Perspectives on Microsoft Access 2010                     10
Defining a Field in Design View   XP




New Perspectives on Microsoft Access 2010                     11
Specifying the Primary Key in Design View
                                               XP


      • Display the table in Design view
      • Click in the row for the field you’ve chosen to
        be the primary key to make it the active field.
        If the primary key will consist of two or more
        fields, click the row selector for the first field,
        press and hold down the Ctrl key, and then
        click the row selector for each additional
        primary key field
      • In the Tools group on the Design tab, click the
        Primary Key button
New Perspectives on Microsoft Access 2010                     12
Specifying the Primary Key in Design View
                                               XP




New Perspectives on Microsoft Access 2010           13
Moving a Field   XP


      • To move a field, you use the mouse to drag it
        to a new location in the Table window in the
        Table Design grid




New Perspectives on Microsoft Access 2010                         14
Adding a Field Between   XP
                                   Two Existing Fields
      • In the Table window in Design view, select the
        row below where you want the new field to be
        inserted
      • In the Tools group on the Design tab, click the
        Insert Rows button
      • Define the new field by entering the field
        name, data type, optional description, and any
        property specifications


New Perspectives on Microsoft Access 2010                      15
Adding a Field Between   XP
                                   Two Existing Fields




New Perspectives on Microsoft Access 2010                      16
Table Relationship   XP




New Perspectives on Microsoft Access 2010                             17
Importing Data from an Excel Worksheet
                                              XP


      • The import process allows you to copy the
        data from a source without having to open the
        source file
      • Click External Data on the Ribbon
      • Click the Excel button in the Import & Link
        group to start the wizard




New Perspectives on Microsoft Access 2010               18
Importing Data from an Excel Worksheet
                                              XP




New Perspectives on Microsoft Access 2010          19
Importing Data from an Excel Worksheet
                                              XP




New Perspectives on Microsoft Access 2010          20
Importing Data from an Excel Worksheet
                                              XP




New Perspectives on Microsoft Access 2010          21
Creating a Table by Importing an    XP
                         Existing Table Structure
      • Make sure the External Data tab is the active tab on
        the Ribbon
      • In the Import & Link group, click the Access button
      • Click the Browse button
      • Navigate to the file
      • Make sure the Import
        tables, queries, forms, reports, macros, and modules
        into the current database option button is
        selected, and then click the OK button
      • Click the Options button

New Perspectives on Microsoft Access 2010                      22
Creating a Table by Importing an   XP
                         Existing Table Structure




New Perspectives on Microsoft Access 2010                    23
Adding Fields to a Table Using the   XP
                          Data Type Gallery
      • The Data Type gallery, available in the Add &
        Delete group on the Fields tab, allows you to
        add a group of related fields to a table at the
        same time, rather than adding each field to
        the table individually
      • The group of fields you add is called a Quick
        Start selection



New Perspectives on Microsoft Access 2010                    24
Adding Fields to a Table Using the   XP
                          Data Type Gallery




New Perspectives on Microsoft Access 2010                    25
Deleting a Field from a Table Structure XP
      • In Datasheet view, click the column heading
        for the field you want to delete
      • In the Add & Delete group on the Fields
        tab, click the Delete button
      or
      • In Design view, click the Field Name box for
        the field you want to delete
      • In the Tools group on the Design tab, click the
        Delete Rows button
New Perspectives on Microsoft Access 2010                 26
Deleting a Field from a Table Structure XP




New Perspectives on Microsoft Access 2010                27
Adding Data to a Table by Importing   XP
                            a Text File
      • Click the External Data tab on the Ribbon
      • In the Import & Link group, click the Text File
        button
      • Click the Browse button
      • Navigate to the file
      • Click the Append a copy of the records to the
        table option button
      • Select the table
      • Click the OK button
New Perspectives on Microsoft Access 2010                  28
Adding Data to a Table by Importing   XP
                            a Text File




New Perspectives on Microsoft Access 2010                  29
Defining Table Relationships   XP


      • One of the most powerful features of a
        relational database management system is its
        ability to define relationships between tables
      • You use a common field to relate one table to
        another




New Perspectives on Microsoft Access 2010                      30
Defining Table Relationships   XP




New Perspectives on Microsoft Access 2010                      31
Defining Table Relationships   XP


      • A one-to-many relationship exists between
        two tables when one record in the first table
        matches zero, one, or many records in the
        second table, and when one record in the
        second table matches at most one record in
        the first table
         The Primary table is the “one” in a one-to-
          many relationship
         The Related table is the “many” table

New Perspectives on Microsoft Access 2010                      32
Defining Table Relationships   XP


      • Referential integrity is a set of rules that
        Access enforces to maintain consistency
        between related tables when you update data
        in a database
      • The Relationships window illustrates the
        relationships among a database’s tables
      • Click the Database Tools tab on the Ribbon
      • In the Relationships group on the Database
        Tools tab, click the Relationships button

New Perspectives on Microsoft Access 2010                      33
Defining Table Relationships   XP




New Perspectives on Microsoft Access 2010                      34
Defining Table Relationships   XP




New Perspectives on Microsoft Access 2010                      35
Defining Table Relationships   XP




New Perspectives on Microsoft Access 2010                      36

More Related Content

What's hot

New Perspectives: Access.06
New Perspectives: Access.06New Perspectives: Access.06
New Perspectives: Access.06
Anna Stirling
 
Tutorial 11: Connecting to External Data
Tutorial 11: Connecting to External DataTutorial 11: Connecting to External Data
Tutorial 11: Connecting to External Datacios135
 
Tutorial 4 Charts and Graphs
Tutorial 4 Charts and GraphsTutorial 4 Charts and Graphs
Tutorial 4 Charts and Graphs
cios135
 
Tutorial 5: Excel Tables, PivotTables, and Pivot Charts
Tutorial 5: Excel Tables, PivotTables, and Pivot ChartsTutorial 5: Excel Tables, PivotTables, and Pivot Charts
Tutorial 5: Excel Tables, PivotTables, and Pivot Chartscios135
 
Excel 2010.01 edited
Excel 2010.01 editedExcel 2010.01 edited
Excel 2010.01 edited
Iris Hershenson
 
MS Excel
MS ExcelMS Excel
MS Excel
Waqas Ghuman
 
Tutorial 8: Developing an Excel Application
Tutorial 8: Developing an Excel ApplicationTutorial 8: Developing an Excel Application
Tutorial 8: Developing an Excel Applicationcios135
 
basic database concepts
basic database conceptsbasic database concepts
basic database concepts
IIUI
 
Tutorial 10: Performing What-IF Analyses
Tutorial 10: Performing What-IF AnalysesTutorial 10: Performing What-IF Analyses
Tutorial 10: Performing What-IF Analysescios135
 
Excel.t02
Excel.t02Excel.t02
Excel.t02
shabersham
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
cios135
 
Access 2010 Unit B PPT
Access 2010 Unit B PPTAccess 2010 Unit B PPT
Access 2010 Unit B PPTokmomwalking
 
Excel 2010 Unit C PPT
Excel 2010 Unit C PPTExcel 2010 Unit C PPT
Excel 2010 Unit C PPTokmomwalking
 
Access Introduction
Access IntroductionAccess Introduction
Access Introduction
Kh Corporate
 
Tutorial 3 Working with Formulas and Functions
Tutorial 3 Working with Formulas and FunctionsTutorial 3 Working with Formulas and Functions
Tutorial 3 Working with Formulas and Functionscios135
 
Powerpoint 2010 Unit C PPT
Powerpoint 2010 Unit C PPTPowerpoint 2010 Unit C PPT
Powerpoint 2010 Unit C PPTokmomwalking
 
Access 2010 Unit C PPT
Access 2010 Unit C PPTAccess 2010 Unit C PPT
Access 2010 Unit C PPTokmomwalking
 
Excel2007
Excel2007Excel2007
Excel2007
Shannon Loretto
 
Access 2010 Unit D PPT
Access 2010 Unit D PPTAccess 2010 Unit D PPT
Access 2010 Unit D PPTokmomwalking
 

What's hot (20)

New Perspectives: Access.06
New Perspectives: Access.06New Perspectives: Access.06
New Perspectives: Access.06
 
Tutorial 11: Connecting to External Data
Tutorial 11: Connecting to External DataTutorial 11: Connecting to External Data
Tutorial 11: Connecting to External Data
 
Tutorial 4 Charts and Graphs
Tutorial 4 Charts and GraphsTutorial 4 Charts and Graphs
Tutorial 4 Charts and Graphs
 
Tutorial 5: Excel Tables, PivotTables, and Pivot Charts
Tutorial 5: Excel Tables, PivotTables, and Pivot ChartsTutorial 5: Excel Tables, PivotTables, and Pivot Charts
Tutorial 5: Excel Tables, PivotTables, and Pivot Charts
 
Excel 2010.01 edited
Excel 2010.01 editedExcel 2010.01 edited
Excel 2010.01 edited
 
MS Excel
MS ExcelMS Excel
MS Excel
 
Tutorial 8: Developing an Excel Application
Tutorial 8: Developing an Excel ApplicationTutorial 8: Developing an Excel Application
Tutorial 8: Developing an Excel Application
 
basic database concepts
basic database conceptsbasic database concepts
basic database concepts
 
Tutorial 10: Performing What-IF Analyses
Tutorial 10: Performing What-IF AnalysesTutorial 10: Performing What-IF Analyses
Tutorial 10: Performing What-IF Analyses
 
Excel.t02
Excel.t02Excel.t02
Excel.t02
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
 
Access.01
Access.01Access.01
Access.01
 
Access 2010 Unit B PPT
Access 2010 Unit B PPTAccess 2010 Unit B PPT
Access 2010 Unit B PPT
 
Excel 2010 Unit C PPT
Excel 2010 Unit C PPTExcel 2010 Unit C PPT
Excel 2010 Unit C PPT
 
Access Introduction
Access IntroductionAccess Introduction
Access Introduction
 
Tutorial 3 Working with Formulas and Functions
Tutorial 3 Working with Formulas and FunctionsTutorial 3 Working with Formulas and Functions
Tutorial 3 Working with Formulas and Functions
 
Powerpoint 2010 Unit C PPT
Powerpoint 2010 Unit C PPTPowerpoint 2010 Unit C PPT
Powerpoint 2010 Unit C PPT
 
Access 2010 Unit C PPT
Access 2010 Unit C PPTAccess 2010 Unit C PPT
Access 2010 Unit C PPT
 
Excel2007
Excel2007Excel2007
Excel2007
 
Access 2010 Unit D PPT
Access 2010 Unit D PPTAccess 2010 Unit D PPT
Access 2010 Unit D PPT
 

Similar to Defining Table Relationships

a2-110.ppt
a2-110.ppta2-110.ppt
a2-110.ppt
Vida533595
 
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.pptMS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
JoshCasas1
 
Access 2010 Unit A PPT
Access 2010 Unit A PPTAccess 2010 Unit A PPT
Access 2010 Unit A PPTokmomwalking
 
Lecture2 slides
Lecture2 slidesLecture2 slides
Lecture2 slides
Cyri Jones
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a Database
Aram SE
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAram SE
 
Excel 2010 data tab
Excel 2010 data tabExcel 2010 data tab
Excel 2010 data tab
Kuldeep Malik
 
Excel2010 05-130206153751-phpapp01
Excel2010 05-130206153751-phpapp01Excel2010 05-130206153751-phpapp01
Excel2010 05-130206153751-phpapp01
Vishal Kumar
 
creating data
creating datacreating data
creating data
sabinji
 
Tutorial 6: Multiple Worksheets and Workbooks
Tutorial 6: Multiple Worksheets and WorkbooksTutorial 6: Multiple Worksheets and Workbooks
Tutorial 6: Multiple Worksheets and Workbookscios135
 
01 Microsoft Access
01 Microsoft Access01 Microsoft Access
Ch02 Access
Ch02 AccessCh02 Access
Ch02 AccessD
 
OPERATE DATABASE APPLICATION
OPERATE DATABASE APPLICATIONOPERATE DATABASE APPLICATION
OPERATE DATABASE APPLICATION
YoomiLaataBekele
 
Excel.t01
Excel.t01Excel.t01
Excel.t01
shabersham
 
Excel.t04
Excel.t04Excel.t04
Excel.t04
shabersham
 
Tutorial Excel
Tutorial ExcelTutorial Excel
Tutorial Excelsoleicita
 

Similar to Defining Table Relationships (19)

a2-110.ppt
a2-110.ppta2-110.ppt
a2-110.ppt
 
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.pptMS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
 
Access 2010 Unit A PPT
Access 2010 Unit A PPTAccess 2010 Unit A PPT
Access 2010 Unit A PPT
 
Lecture2 slides
Lecture2 slidesLecture2 slides
Lecture2 slides
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a Database
 
Access lesson 02 Creating a Database
Access lesson 02 Creating a DatabaseAccess lesson 02 Creating a Database
Access lesson 02 Creating a Database
 
Excel 2010 data tab
Excel 2010 data tabExcel 2010 data tab
Excel 2010 data tab
 
Excel2010 05-130206153751-phpapp01
Excel2010 05-130206153751-phpapp01Excel2010 05-130206153751-phpapp01
Excel2010 05-130206153751-phpapp01
 
creating data
creating datacreating data
creating data
 
Tutorial 6: Multiple Worksheets and Workbooks
Tutorial 6: Multiple Worksheets and WorkbooksTutorial 6: Multiple Worksheets and Workbooks
Tutorial 6: Multiple Worksheets and Workbooks
 
01 Microsoft Access
01 Microsoft Access01 Microsoft Access
01 Microsoft Access
 
Ch02 Access
Ch02 AccessCh02 Access
Ch02 Access
 
Access 2007 Unit A
Access 2007 Unit AAccess 2007 Unit A
Access 2007 Unit A
 
OPERATE DATABASE APPLICATION
OPERATE DATABASE APPLICATIONOPERATE DATABASE APPLICATION
OPERATE DATABASE APPLICATION
 
Excel.t01
Excel.t01Excel.t01
Excel.t01
 
Excel.t01
Excel.t01Excel.t01
Excel.t01
 
Excel.t04
Excel.t04Excel.t04
Excel.t04
 
Chapter.03
Chapter.03Chapter.03
Chapter.03
 
Tutorial Excel
Tutorial ExcelTutorial Excel
Tutorial Excel
 

More from IIUI

Rank brain
Rank brainRank brain
Rank brain
IIUI
 
Chapter 10 cs 2o-p
Chapter 10 cs 2o-pChapter 10 cs 2o-p
Chapter 10 cs 2o-pIIUI
 
Chapter 09 io devices 3o-p
Chapter 09 io devices 3o-pChapter 09 io devices 3o-p
Chapter 09 io devices 3o-pIIUI
 
Chapter 09 io devices 2o-p
Chapter 09 io devices 2o-pChapter 09 io devices 2o-p
Chapter 09 io devices 2o-pIIUI
 
Chapter 09 io devices
Chapter 09 io devicesChapter 09 io devices
Chapter 09 io devicesIIUI
 
Chapter 08 secondary storage 3o-p
Chapter 08 secondary storage 3o-pChapter 08 secondary storage 3o-p
Chapter 08 secondary storage 3o-pIIUI
 
Chapter 08 secondary storage 2o-p
Chapter 08 secondary storage 2o-pChapter 08 secondary storage 2o-p
Chapter 08 secondary storage 2o-pIIUI
 
Chapter 08 secondary storage
Chapter 08 secondary storageChapter 08 secondary storage
Chapter 08 secondary storageIIUI
 
Chapter 07 pam 3o-p
Chapter 07 pam 3o-pChapter 07 pam 3o-p
Chapter 07 pam 3o-pIIUI
 
Chapter 07 pam 2o-p
Chapter 07 pam 2o-pChapter 07 pam 2o-p
Chapter 07 pam 2o-pIIUI
 
Chapter 07 pam
Chapter 07 pamChapter 07 pam
Chapter 07 pamIIUI
 
Chapter 06 boolean algebra 3o-p
Chapter 06 boolean algebra 3o-pChapter 06 boolean algebra 3o-p
Chapter 06 boolean algebra 3o-pIIUI
 
Chapter 06 boolean algebra 2o-p
Chapter 06 boolean algebra 2o-pChapter 06 boolean algebra 2o-p
Chapter 06 boolean algebra 2o-pIIUI
 
Chapter 06 boolean algebra
Chapter 06 boolean algebraChapter 06 boolean algebra
Chapter 06 boolean algebraIIUI
 
Chapter 05 computer arithmetic 2o-p
Chapter 05 computer arithmetic 2o-pChapter 05 computer arithmetic 2o-p
Chapter 05 computer arithmetic 2o-pIIUI
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmeticIIUI
 
Chapter 04 computer codes 3o-p
Chapter 04 computer codes 3o-pChapter 04 computer codes 3o-p
Chapter 04 computer codes 3o-pIIUI
 
Chapter 04 computer codes
Chapter 04 computer codesChapter 04 computer codes
Chapter 04 computer codesIIUI
 
Chapter 03 number system 3o-p
Chapter 03 number system 3o-pChapter 03 number system 3o-p
Chapter 03 number system 3o-pIIUI
 
Chapter 03 number system 2o-p
Chapter 03 number system 2o-pChapter 03 number system 2o-p
Chapter 03 number system 2o-pIIUI
 

More from IIUI (20)

Rank brain
Rank brainRank brain
Rank brain
 
Chapter 10 cs 2o-p
Chapter 10 cs 2o-pChapter 10 cs 2o-p
Chapter 10 cs 2o-p
 
Chapter 09 io devices 3o-p
Chapter 09 io devices 3o-pChapter 09 io devices 3o-p
Chapter 09 io devices 3o-p
 
Chapter 09 io devices 2o-p
Chapter 09 io devices 2o-pChapter 09 io devices 2o-p
Chapter 09 io devices 2o-p
 
Chapter 09 io devices
Chapter 09 io devicesChapter 09 io devices
Chapter 09 io devices
 
Chapter 08 secondary storage 3o-p
Chapter 08 secondary storage 3o-pChapter 08 secondary storage 3o-p
Chapter 08 secondary storage 3o-p
 
Chapter 08 secondary storage 2o-p
Chapter 08 secondary storage 2o-pChapter 08 secondary storage 2o-p
Chapter 08 secondary storage 2o-p
 
Chapter 08 secondary storage
Chapter 08 secondary storageChapter 08 secondary storage
Chapter 08 secondary storage
 
Chapter 07 pam 3o-p
Chapter 07 pam 3o-pChapter 07 pam 3o-p
Chapter 07 pam 3o-p
 
Chapter 07 pam 2o-p
Chapter 07 pam 2o-pChapter 07 pam 2o-p
Chapter 07 pam 2o-p
 
Chapter 07 pam
Chapter 07 pamChapter 07 pam
Chapter 07 pam
 
Chapter 06 boolean algebra 3o-p
Chapter 06 boolean algebra 3o-pChapter 06 boolean algebra 3o-p
Chapter 06 boolean algebra 3o-p
 
Chapter 06 boolean algebra 2o-p
Chapter 06 boolean algebra 2o-pChapter 06 boolean algebra 2o-p
Chapter 06 boolean algebra 2o-p
 
Chapter 06 boolean algebra
Chapter 06 boolean algebraChapter 06 boolean algebra
Chapter 06 boolean algebra
 
Chapter 05 computer arithmetic 2o-p
Chapter 05 computer arithmetic 2o-pChapter 05 computer arithmetic 2o-p
Chapter 05 computer arithmetic 2o-p
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmetic
 
Chapter 04 computer codes 3o-p
Chapter 04 computer codes 3o-pChapter 04 computer codes 3o-p
Chapter 04 computer codes 3o-p
 
Chapter 04 computer codes
Chapter 04 computer codesChapter 04 computer codes
Chapter 04 computer codes
 
Chapter 03 number system 3o-p
Chapter 03 number system 3o-pChapter 03 number system 3o-p
Chapter 03 number system 3o-p
 
Chapter 03 number system 2o-p
Chapter 03 number system 2o-pChapter 03 number system 2o-p
Chapter 03 number system 2o-p
 

Recently uploaded

Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 

Recently uploaded (20)

Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 

Defining Table Relationships

  • 1. Building a Database and Defining Table Relationships Microsoft Access 2010 ®
  • 2. Objectives XP • Learn the guidelines for designing databases and setting field properties • Modify the format of a field in Datasheet view • Create a table in Design view • Define fields and specify a table’s primary key • Modify the structure of a table New Perspectives on Microsoft Access 2010 2
  • 3. Objectives XP • Import data from an Excel worksheet • Create a table by importing an existing table structure • Add fields to a table with the Data Type gallery • Delete, rename, and move fields • Add data to a table by importing a text file • Define a relationship between two tables New Perspectives on Microsoft Access 2010 3
  • 4. Table Window in Design View XP New Perspectives on Microsoft Access 2010 4
  • 5. Guidelines for Designing Databases XP • Identify all the fields needed to produce the required information • Organize each piece of data into its smallest useful part • Group related fields into tables • Determine each table’s primary key • Include a common field in related tables • Avoid data redundancy • Determine the properties of each field New Perspectives on Microsoft Access 2010 5
  • 6. Guidelines for Setting Field Properties XP • You must name each field, table, and other object • Choose an appropriate data type Database Table Data Types: The newest version of Microsoft Access marks the introduction of a new data types for your fields when creating tables. In addition to these new formats there are also changes to the previous formats that were available in earlier versions of Microsoft Access. Data Types Microsoft Access 2007 Data Types Data Type Description An AutoNumber field creates unique values automatically when Access creates a AutoNumber new record. The AutoNumber field is primarily used for Primary Keys in Access. A Text field can contain values that are text, numeric or a combination of both. Text A text field can contain a maximum length of 255 characters. A much larger version of the text field, allowing storage of up to 2 GB of data. A Memo new feature of the Microsoft Access Memo field is that it now supports rich text formatting. Number The Number field can store numeric values up to 16 bytes of data. The Date/Time field allows storage of date and time information. The date/time Date/Time field now also includes the Auto Calendar feature. The Currency data type stores values in a monetary format. This can be used Currency with financial data as 8-byte numbers with precision to four decimal places. Yes/No Boolean data storage of true/false values. The OLE Object field stores images, documents, graphs etc. from Office and OLE Object Windows based programs. The maximum data size is 2 GB, although this will slow down a database. The Hyperlink field type is used to store web addresses. This has a maximum Hyperlink size limit of 1 GB of data. The Attachment field type is used to store images, spreadsheet files, documents, charts and other types of supported files to the records in your Attachment database. This is a new feature that has been introduced with Microsoft Access 2007 New Perspectives on Microsoft Access 2010 6
  • 7. Guidelines for Setting Field Properties XP • The Field Size property defines a field value’s maximum storage size for Text, Number, and AutoNumber fields only Byte Integer Long Integer Single Double Replication ID Decimal New Perspectives on Microsoft Access 2010 7
  • 8. Changing the Format of a Field in XP Datasheet View New Perspectives on Microsoft Access 2010 8
  • 9. Creating a Table in Design View XP • Creating a table in Design view involves entering the field names and defining the properties for the fields, specifying the primary key, and saving the table structure New Perspectives on Microsoft Access 2010 9
  • 10. Defining a Field in Design View XP • In the Field Name box, type the name for the field, and then press the Tab key • Accept the default Text data type, or click the arrow and select a different data type for the field. Press the Tab key • Enter an optional description for the field, if necessary • Use the Field Properties pane to type or select other field properties, as appropriate New Perspectives on Microsoft Access 2010 10
  • 11. Defining a Field in Design View XP New Perspectives on Microsoft Access 2010 11
  • 12. Specifying the Primary Key in Design View XP • Display the table in Design view • Click in the row for the field you’ve chosen to be the primary key to make it the active field. If the primary key will consist of two or more fields, click the row selector for the first field, press and hold down the Ctrl key, and then click the row selector for each additional primary key field • In the Tools group on the Design tab, click the Primary Key button New Perspectives on Microsoft Access 2010 12
  • 13. Specifying the Primary Key in Design View XP New Perspectives on Microsoft Access 2010 13
  • 14. Moving a Field XP • To move a field, you use the mouse to drag it to a new location in the Table window in the Table Design grid New Perspectives on Microsoft Access 2010 14
  • 15. Adding a Field Between XP Two Existing Fields • In the Table window in Design view, select the row below where you want the new field to be inserted • In the Tools group on the Design tab, click the Insert Rows button • Define the new field by entering the field name, data type, optional description, and any property specifications New Perspectives on Microsoft Access 2010 15
  • 16. Adding a Field Between XP Two Existing Fields New Perspectives on Microsoft Access 2010 16
  • 17. Table Relationship XP New Perspectives on Microsoft Access 2010 17
  • 18. Importing Data from an Excel Worksheet XP • The import process allows you to copy the data from a source without having to open the source file • Click External Data on the Ribbon • Click the Excel button in the Import & Link group to start the wizard New Perspectives on Microsoft Access 2010 18
  • 19. Importing Data from an Excel Worksheet XP New Perspectives on Microsoft Access 2010 19
  • 20. Importing Data from an Excel Worksheet XP New Perspectives on Microsoft Access 2010 20
  • 21. Importing Data from an Excel Worksheet XP New Perspectives on Microsoft Access 2010 21
  • 22. Creating a Table by Importing an XP Existing Table Structure • Make sure the External Data tab is the active tab on the Ribbon • In the Import & Link group, click the Access button • Click the Browse button • Navigate to the file • Make sure the Import tables, queries, forms, reports, macros, and modules into the current database option button is selected, and then click the OK button • Click the Options button New Perspectives on Microsoft Access 2010 22
  • 23. Creating a Table by Importing an XP Existing Table Structure New Perspectives on Microsoft Access 2010 23
  • 24. Adding Fields to a Table Using the XP Data Type Gallery • The Data Type gallery, available in the Add & Delete group on the Fields tab, allows you to add a group of related fields to a table at the same time, rather than adding each field to the table individually • The group of fields you add is called a Quick Start selection New Perspectives on Microsoft Access 2010 24
  • 25. Adding Fields to a Table Using the XP Data Type Gallery New Perspectives on Microsoft Access 2010 25
  • 26. Deleting a Field from a Table Structure XP • In Datasheet view, click the column heading for the field you want to delete • In the Add & Delete group on the Fields tab, click the Delete button or • In Design view, click the Field Name box for the field you want to delete • In the Tools group on the Design tab, click the Delete Rows button New Perspectives on Microsoft Access 2010 26
  • 27. Deleting a Field from a Table Structure XP New Perspectives on Microsoft Access 2010 27
  • 28. Adding Data to a Table by Importing XP a Text File • Click the External Data tab on the Ribbon • In the Import & Link group, click the Text File button • Click the Browse button • Navigate to the file • Click the Append a copy of the records to the table option button • Select the table • Click the OK button New Perspectives on Microsoft Access 2010 28
  • 29. Adding Data to a Table by Importing XP a Text File New Perspectives on Microsoft Access 2010 29
  • 30. Defining Table Relationships XP • One of the most powerful features of a relational database management system is its ability to define relationships between tables • You use a common field to relate one table to another New Perspectives on Microsoft Access 2010 30
  • 31. Defining Table Relationships XP New Perspectives on Microsoft Access 2010 31
  • 32. Defining Table Relationships XP • A one-to-many relationship exists between two tables when one record in the first table matches zero, one, or many records in the second table, and when one record in the second table matches at most one record in the first table The Primary table is the “one” in a one-to- many relationship The Related table is the “many” table New Perspectives on Microsoft Access 2010 32
  • 33. Defining Table Relationships XP • Referential integrity is a set of rules that Access enforces to maintain consistency between related tables when you update data in a database • The Relationships window illustrates the relationships among a database’s tables • Click the Database Tools tab on the Ribbon • In the Relationships group on the Database Tools tab, click the Relationships button New Perspectives on Microsoft Access 2010 33
  • 34. Defining Table Relationships XP New Perspectives on Microsoft Access 2010 34
  • 35. Defining Table Relationships XP New Perspectives on Microsoft Access 2010 35
  • 36. Defining Table Relationships XP New Perspectives on Microsoft Access 2010 36