Presentation is loading. Please wait.

Presentation is loading. Please wait.

WEEK 11 Database Design. TABLE INSTANCE CHARTS Create Tables.

Similar presentations


Presentation on theme: "WEEK 11 Database Design. TABLE INSTANCE CHARTS Create Tables."— Presentation transcript:

1 WEEK 11 Database Design

2 TABLE INSTANCE CHARTS

3 Create Tables

4 TYPES OF DATA

5 Common Data Types in Access Autonumber SHORT Text LONG Text Number Currency Date/Time Yes/No

6 Autonumber Use for unique sequential numbering Commonly used for PK (Primary Key) Increments by 1 Automatically inserted when a record is added.

7 SHORT Text Used for text or combinations of text and numbers, such as addresses, or for numbers that do not require calculations, such as phone numbers, part numbers, or postal codes. Stores up to 255 characters.

8 LONG Text Use for lengthy text and numbers, such as notes or descriptions. Should be used “sparingly”, because it takes up too much room in database Stores up to 65,536 characters (if not more)

9 Number Use for data to be included in mathematical calculations, except calculations involving money (use “Currency” type). When you are creating a RELATIONSHIP with an “AUTOnumber” field with the “PARENT” table

10 Yes/No Use for data that can be only 1 of 2 possible values, such as Yes/No, True/False, On/Off. Null values are NOT allowed

11 Rule One chart completed for each table Click here to open: “TableInstanceChart.xlsx” Click here

12 Review Relationship Essentials Need a primary key EVERY TABLE NEEDS A PRIMARY KEY Should be 1 st field Need a foreign key a Foreign Key is a column in a table used to reference a Primary Key in another table. A table does NOT necessarily have to have a Foreign Key Whenever you see: “MANY”—this will be the Foreign Key Primary key and foreign keys are essential when you create relationships that join together multiple tables in a database

13 CREATE TABLES IN MS ACCESS

14 EXTERNAL DATA tab > select the type of file you would like to import i.e. “Excel” Click on the BROWSE button, to select the location of the file you would like Double-click on the file > OK Select the checkbox: “First Row Contains Column Headings”, if you would like to use the “EXCEL” column headings Click on the NEXT button Importing “EXCEL” Files

15 APPEND A COPY  External Data tab > Import & Link group > click the Excel button > Browse button > double-click the file you would like  Click:  Append a copy of the records to the table > OK > NEXT > FINISH > CLOSE

16 Select the field name, set the Indexed option to Yes (NO Duplicates) and then click NEXT. Select your PRIMARY KEY NEXT> key in a NAME FINISH > CLOSE, without Saving the IMPORT step Importing “EXCEL” Files cont.

17 COMPACTING & REPAIRING A DATABASE DATABASE TOOLS > COMPACT & REPAIR button As you add, edit, & delete objects, a database changes in size To minimize the size of a database & improve performance should be done on a regular basis Rearranges how a fragmented database is stored on disk

18 Want More Information If you would like more information on how to use MS Access, click hereclick here

19 QUERIES

20 Is a QUESTION to the database-asking for a “set of records” from 1 or more Tables/Queries MS Access responds by displaying the requested data is a stored question, rather than a stored response results automatically update, IF table is edited, it allows you to view & operate on “selected subsets” of your data QUERIES: DEFINITION

21 Click here Click here to open: “Northwind Database”

22 Single Table Queries Select fields to display Sort by? Simple Conditions When you enter text into the criteria cell your text should be enclosed in quotes ("") to distinguish it from other expressions and operators that you may need to add.

23 WORKING WITH TEXT

24 Matching Text

25 OR Statement

26 IN Statement

27 NOT Statement

28 NOT IN Statement

29 LIKE “Text*” Statement

30 LIKE “*Text” Statement

31 Hybrid / Homework View “14 Week Schedule” > Week 11 > 3 rd Column


Download ppt "WEEK 11 Database Design. TABLE INSTANCE CHARTS Create Tables."

Similar presentations


Ads by Google