Download presentation
Presentation is loading. Please wait.
1
DAY 14: DATABASES RAHUL KAVI Rahul.Kavi@mail.wvu.edu Rahul.Kavi@mail.wvu.edu February 25, 2016 1
2
DATABASES A database is an organized collection of data There are many types of databases –Flat File –XML –Workbooks –Relational –Key-Value Store 2
3
WHERE ARE DATABASES USED? Storing bank records, corporate data, etc. Storing login credentials for websites/blogs. Store content of popular websites like Flickr.com, YouTube.com, etc. Store content of popular services like Netflix, Instagram, Pandora, iTunes, Spotify, Game Center (iOS), App Store, Play Store (Android App Store). 3
4
RELATIONAL DATABASES Access is a relational database –A relational database is a collection of data items organized as a set of formally described tables. –Data stored in tables. –In addition to table definitions, there are also relationships between tables 4
5
EXCEL VS ACCESS Excel: Spreadsheet application to arrange, and analyze data in sheets. Sheets have no relation enforced with each other. May have duplicate data. Access: Database application to store, retrieve, edit, delete, add data (using relationships between data). We can enforce relation between tables you can avoid redundant data. 5
6
EXCEL VS ACCESS Access provides more structured way to storing data. 6
7
RELATION BETWEEN TABLES? Example: Table Name: UserTable Contents/Fields of UserTable: (username, password) Username: String/Character data (includes special characters) Password: String/Character data (includes special characters) Other examples: –iTunes Account ---> Apple ID <---- App Store account. –Mix Email Account --> My ID <---- WVU WiFi There is a user table for each of the above accounts. 7
8
RECORDS AND FIELDS REVIEW A single entry in a table is called a “record” (horizontal entries/rows) Each piece of data in a record is a “field” (vertical column names/column). Rows Records. Columns Fields. 8
9
CASCADING Example of a Cascade Delete: If you delete your Google account, you lose access to YouTube, Gmail, etc. Your ability to login is lost across all Google Services. Example of a Cascade Update: If you lose your credit card and get a new one, your information is updated (not deleted) across all of your services (provided by credit card company). 9
10
OPEN ACCESS Start->Access-> Blank desktop database. Enter name of the database “Day1Access_LastName_FirstName. Click create. 10
11
DESIGN TABLE Right click on Table 1 tab. Click design. Enter “UserName” (no spaces between words). Ensure UserName is a primary key. Field Name 1: “NameOfUser” Data Type: “Short Text”. Field Name2: “Password”. Data Type: “Short Text”. 11
12
DATASHEET VIEW Right click on Table 1 tab. Click datasheet view. Enter 5 usernames and passwords. Try entering duplicate usernames. 12
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.