Presentation is loading. Please wait.

Presentation is loading. Please wait.

Access Tables William Klingelsmith. Exam Review/Reminders Grades were okay for the most part Common errors Incorrect references in formula Incorrect difference.

Similar presentations


Presentation on theme: "Access Tables William Klingelsmith. Exam Review/Reminders Grades were okay for the most part Common errors Incorrect references in formula Incorrect difference."— Presentation transcript:

1 Access Tables William Klingelsmith

2 Exam Review/Reminders Grades were okay for the most part Common errors Incorrect references in formula Incorrect difference formula Chart errors Homework 3 due tonight!

3 Access Interface

4 A Basic Table Holding Song Information ArtistTitleAlbum_ID Black Moth Super Rainbow Hairspray Heart1 White LungThick lip4 Mind.in.a.boxLament for Lost Dreams2 The ShinsThe Rifle’s Spiral3

5 A Few Questions How many fields does this table contain? Which data types should we use for the fields in this table? Text, Number, Memo, Currency, etc. Can we specify a primary key (uniquely identifying field) on field in this table? Why or why not? ArtistTitleAlbum_ID Black Moth Super Rainbow Hairspray Heart 1 White LungTwo of You4 Mind.in.a.b ox Lament for Lost Dreams 2 The ShinsThe Rifle’s Spiral 3

6 An Updated Basic Table Song_IDArtistTitleAlbum_ID 1Black Moth Super Rainbow Hairspray Heart 1 2White LungThick lip4 3Mind.in.a.boxLament for Lost Dreams 2 4The ShinsThe Rifle’s Spiral 3

7 Let’s Create this Table in Access Move to the Create Tab Click Table Switch to the Design View of the table and name it “Songs” Keep the Auto numbered ID field and call it Song_ID Specify it as the primary key using the large key button in the top left Add the remaining fields for the table (name and data type)

8 Views in Access Each object in Access, be it a query, table, form, etc, has multiple views associated with it Each of these views allows the design or data of the object to be changed For tables, the design view is where you will construct the table fields and data types and the datasheet view is where data will actually be inputted.

9 Placing Data in the Table The design view you are currently in is for constructing the table ONLY. Data is entered in a different view Switch to Datasheet View and enter the values into the table You will notice the Autonumbering ID field auto increments and you don’t have to type anything in for it. Add one new song of your choosing as a record in the table For the album_ID, use the number four

10 A Note About Saving in Access Once you have finished entering data into your table, close your database Reopen your database You will notice all data you entered is still there even though you didn’t save All changes made to data in Access tables is saved automatically Only changes to the structure of objects in your database will prompt a save dialog Access can’t undo everything

11 Album Table Album_IDAlbum_Na me GenrePriceNumber_S old Release Date 1Cobra Juicy1$9.99234,0147/5/2012 2Dreamweb1$10.5065,5651/1/2005 3Port of Morrow 1$15768,0003/20/2012 4sorry1$5.99125,3871/1/2012

12 Relationships As introduced Tuesday, the proper way to construct tables in databases involves segmenting related data into distinct tables. At this point, we have a table which holds information about songs and another that has album information. We will now link these using a relationship.

13 Creating Relationships Move to the Database Tools tab Click Relationships You will be presented with a Show Table dialog in which you can choose the tables on which the relationship will be made Add Songs and Albums To create a relationship, you simply drag one field from one table to another The fields must be of the same data type The contents of the fields must be the same in each table

14 Same type and content? Suppose three students were meeting at a café for lunch. Each student speaks different languages. How will they communicate?

15 Same type and content? John French English Dutch Sara French German Tim German Russian Icelandic

16 Same type and content? John French English Dutch Sara French German Tim German Russian Icelandic

17 Creating Relationships Once you begin the relationship, you will see different options available to you Referential Integrity: All entries from one table must be present in the other Cascading Updates: Any changes made in one table will be propagated to the others linked to it Cascading Deletes: Any deletions made in one table will delete corresponding entries in the other tables Enable all three

18 Creating Relationships Also, at the bottom of the relationship will be a small phrase detailing the type of relationship that is going to be created. One-to-One: every entry in one table has exactly one entry in the other table One-to-Many: one entry in a table may have relationships with multiple entries in another table Many-to-many: multiple entries from one table can be associated with multiple entries from another table If you ever see “Indeterminate”, it’s usually an indicator that your relationship is incorrect.

19 Importing Data from External Resources Similar to Excel, Access has the capability to import data from other sources which include: XML Files CSV Files Excel Spreadsheets Etc. All of these import options are located on the External Data tab. XML files allow you to import just the structure of a table, both the data and structure, or append data to an existing table


Download ppt "Access Tables William Klingelsmith. Exam Review/Reminders Grades were okay for the most part Common errors Incorrect references in formula Incorrect difference."

Similar presentations


Ads by Google