Top Banner
Database & Database Designs 1
37

Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

Jan 12, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

1

Database & Database Designs

Page 2: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

2

Welcome to DatabasesOur goal is to have a basic

understanding of databasesResources:

◦Slides◦In Class Activities◦No textbook required◦Videos

Page 3: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

Why Learn Databases?STORE INFORMATIONInformation is a valuable commodity Information is used for marketing and

BI (Business Information)Used by all kinds of businessesAccess to good information (if properly

done)Market to individuals creatively, rather

than “mass mailing”, more customized (Business

Intelligence) 4

Page 4: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

5

Database TermsDATA

◦From dictionary.reference.com, “INDIVIDUAL facts, statistics, or items of information”.

◦NEVER “CONTRIVED” OR “DERIVED” VALUES

Page 5: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

Database Terms

DATASET

According to Dictionary.com, a database is “a

comprehensive collection of related data organized for convenient access, generally in a computer.”

 usually refers to data selected and arranged in rows and columns

◦ for processing by statistical software. The data might have come from a database, but it might not

Simply put, an: “ORGANIZED COLLECTION OF DATA.”

6

Page 6: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

Database Terms

DATABASE

◦A COMPREHENSIVE collection of RELATED data organized for convenient access

A database is usually under the control of a DATABASE MANAGEMENT SYSTEM, which is software that, among other things, manages MULTI-USER ACCESS to the database. (usually, but not necessarily. )

◦Wk9_Flat_File.accdb 7

Page 7: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

8

Database Terms

DATABASE MANAGEMENT SYSTEM (DBMS)

Provides TOOLS needed to organize data in a flexible manner. It includes:

facilities to add, modify or delete data Never DELETE, instead flag the data as REDUNDANT.

ask questions (queries) about the data stored

produce reports

Page 8: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

9

Looks complicated, we’ll go into more detail shortly

Entity Relationship Diagram (ERD)

Visual display of tables and their relationships for a database

Database Terms

Page 9: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

10

Many Types of Databases

File Maker ProOracleMicrosoft

◦Excel◦Access

Page 10: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

11

Database Models

According to Wikipedia: A database model is the theoretical foundation of a database and fundamentally determines in which manner data can be stored, organized, and manipulated in a database system. It thereby defines the infrastructure offered by a particular database system.

Simply put, a database model determines HOW data is STORED and ORGANIZED

Page 11: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

12

Database Model – RelationalRelational database model is

the most commonComposed of tables, each

constructed like a flat fileClick here to open an Excel file which illustrates Flat files

Keep this file OPEN

Page 12: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

13

What are Tables or Entities?

TABLES (aka “ENTITIES”) in the relational model are used to represent "things" in the real world.

ENTITIES are made up of ROWS and Columns.

Columns are called fields or attributes. ROWS are called RECORD

Within a table, each ROWS is called a RECORD and it represents 1 particular instance of its entity, not unlike the flat file.

Page 13: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

14

POLL ON THE GO

CLICK HERE TO GO TO “POLLONTHE GO:

OPEN POLL

Page 14: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

15

Movies

mID Movie

1 Toy Story

2 Brave Heart

3 Dark Skies

4 A Beautiful Mind

5 Forrest Gump

Movie Rentals

rID cID mID

1 1 5

2 2 1

3 2 2

4 2 4

5 3 4

6 3 5

7 4 3

8 4 1

9 4 5

Customers

cID FirstName

1 John

2 Mary

3 Linda

4 Shaun

5 James

Puzzle-USE THIS TO ANSWER NEXT 5 SLIDES

Page 15: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

16

How many customers are there?

3

4

5

Page 16: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

17

How many times have movies been rented?

9

12

8

Page 17: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

18

How many times has customer #3 (Linda) rented a movie?

2

3

4

Page 18: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

19

How many times has movie #5 (Forrest Gump) been rented?

3

4

2

Page 19: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

20

Who was the first customer to rent the movie “A Beautiful Mind”?

Mary

Linda

Shaun

Page 20: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

What is a Primary Key?

A FIELD in the database that guarantees UNIQUENESS

SPEEDS data RETRIEVAL

Each RECORD in a table must have a PRIMARY KEY

Each PRIMARY KEY is the 1ST attribute (column) listed

Click here to take a look again at the Excel file but this time the: RELATIONAL Tab 21

Page 21: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

22

What are Foreign Keys?

A FOREIGN KEY is used to indicate a relationship between 2 or more TABLES

Each FOREIGN KEY is a PRIMARY key in another table

Page 22: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

23

CREATE RELATIONSHIPSIN MS ACCESS

Page 23: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

24

Create Relationships

DATABASE TOOLS ribbon >

RELATIONSHIPS grouping

Page 24: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

25

“Enforce Referential Integrity”

A system of rules that MS Access uses to ensure that relationship data is valid and that you CANNOT ACCIDENTALLY DELETE a record in 1 table if a matching record is present in a related table.

You can NOT set “Referential Integrity” unless the MATCHING field from the PRIMARY table is a primary key

The related fields must have the same Data TYPE

Page 25: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

myitlab

27

Page 26: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

ASSIGNMENTS-BE CAREFUL WHEN DOWNLOADING “CHEATING” possibilities

• BE CAREFUL when you are DOWNLOADING your assignment files. When you DOWNLOAD them, the files come with an embedded ENCRYPTION code

• IF you COPY THE FILE from another student, your assignment will be flagged with a “POTENTIAL INTEGRITY VIOLATION”,(cheating).

•EVEN IF YOU SEND AN UNedited file, you may be legitimately doing your own work, but, the file has the ENCRYPTION code

•your assignment will be flagged with a “POTENTIAL INTEGRITY VIOLATION”,(cheating).

28

Page 27: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

ASSIGNMENTS—READ INSTRUCTIONS VERY, VERY CAREFULLY!!

• You have to be very, very careful with ALL the components in myitlab. The software is extremely specific—it IS case-sensitive, and if you add a space where there shouldn’t be (or vice versa), or forget to include a punctuation mark (or vice versa), myitlab will mark it wrong.

• When you do your assignments, you must read the instructions extremely carefully, not “skimming over” any of the instructions, just in case you miss a tiny requirement.

29

Page 28: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

PRINT OUT ASSIGNMENT MARKS • Please make sure that as soon as you get your MARK for ANY assignment,

that you do the following:• DO NOT CLOSE the dialog box with your mark on it--before doing the

following:1. Hit your PRINT SCREEN button on your keyboard2. Open MS WORD3. PASTE4. Enlarge the “screen capture”, so that it’s readable5. PRINT out your MARK, AND SAVE the file to the DESKTOP

-then UPLOAD the file to SkyDrive6. You may now close the dialog box.

• There have been some students who have gotten their mark, but when they close the dialog box with the mark on it-- they receive a “0” in their GRADEBOOK. (This is the mark that I see). This “print out” will be your backup copy—put it in a safe place, until the end of the semester.

30

Page 29: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

31

SUBMITTING ASSIGNMENTS: 3 STEPS

1.Click on:

2.Navigate to where your completed assignment file is, double-click on the file, and then click on:

Page 30: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

32

AFTER submitting assignment, there is a “TIME LAPSE”You can view results by going to VIEW SUBMISSIONS

3. IMPORTANT: THEN CLICK ON:

Page 31: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

33

1. SUBMITTED FILEOpens a .zip file which is a COPY of the file you submitted for your assignment

Will give 3 files:1. SUBMITTED FILE2. SUMMARY REPORT3. MARKED UP REPORT

Page 32: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

34• click on the arrow to EXPAND the information, to

find out exactly where you went wrong.

• SUMMARY REPORT:

Page 33: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

35

1. MARKED UP REPORT: Click on the check-mark or x-

icons to view the detailed results and score of the corresponding instruction step.

If the project required you to insert images or art, those items are hyperlinked and can be selected for more details.

Missing items are highlighted in tan color.

Hidden elements are highlighted in pale yellow color.

Elements that were to be deleted are highlighted in orange color.

Page 34: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

36

• When doing an exam you must click on the: button to exit.

• Can do a task 5 times, then it’s wrong• myitlab tracks how many attempts you have left

• Can navigate to another question by hitting

• If a question does not appear to be working OR if you get to a question & you do not have 5 attempts:• Hit your button at the bottom-right of the window

myitlab

Page 35: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

37

• You can skip and go back to questions by clicking

on: and

myitlab Logistics cont.

Page 36: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

38

• If you are doing your Training, you do not have to complete it in 1 setting but can click on: • And then resume your Training session at a later date

• will show you step-by-step how to perform the skill

• will also show you step-by-step BUT: you will need to perform each action along with the prompts

• You can increase or decrease your font size of your instructions by clicking on these buttons:

myitlab TRAINING

Page 37: Database & Database Designs 1. Welcome to Databases Our goal is to have a basic understanding of databases Resources: ◦ Slides ◦ In Class Activities ◦

39

HYBRID/HOMEWORK

View “14 Week Schedule” > Week 09 > 3rd Column