Database Introduction Section 14 – Lesson 01 Use the student note section below for further...

11
Database Introduction Section 14 – Lesson 01 Section 14 – Lesson 01 Use the student note section below for Use the student note section below for further explanation of the slide further explanation of the slide content. content. Use your mouse to resize the content Use your mouse to resize the content pane and read all of the student note pane and read all of the student note section. section.

Transcript of Database Introduction Section 14 – Lesson 01 Use the student note section below for further...

Page 1: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

Database IntroductionDatabase Introduction

Section 14 – Lesson 01Section 14 – Lesson 01

• Use the student note section below for further Use the student note section below for further explanation of the slide content.explanation of the slide content.

• Use your mouse to resize the content pane and Use your mouse to resize the content pane and read all of the student note section.read all of the student note section.

Page 2: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -22

What’s going on inside? What’s going on inside?

Sql.ico

Page 3: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -33

Web-based SQLWeb-based SQL

• The SQL Command Processor window allows you to:

– run ad-hoc SQL statements (SQL tab)

– upload script files to create Oracle database objects (Scripts tab)

– browse existing database object data dictionary information (Data tab)

• The SQL Command Processor window allows you to:

– run ad-hoc SQL statements (SQL tab)

– upload script files to create Oracle database objects (Scripts tab)

– browse existing database object data dictionary information (Data tab)

Page 4: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -44

Overview of Web-based SQLOverview of Web-based SQL

• Execute SQL statements to retrieve, modify, add, and remove data from the database

• Format, perform calculations on, store, and print query results in the form of reports

• Create script files to store SQL statements for repetitive use in the future

• For this lesson, simply upload, execute and view the sample tables from the Practice Exercise.

• Execute SQL statements to retrieve, modify, add, and remove data from the database

• Format, perform calculations on, store, and print query results in the form of reports

• Create script files to store SQL statements for repetitive use in the future

• For this lesson, simply upload, execute and view the sample tables from the Practice Exercise.

Page 5: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -55

Logging In to Project MarvelLogging In to Project Marvel

• From Windows environment:

– Enter School Name

– Enter username (whatever was generated on original account)

– Enter password (whatever was generated on original account)

• Click on the Script tab.

• Upload the script to the script repository

• Run the script under appropriate schema

• From Windows environment:

– Enter School Name

– Enter username (whatever was generated on original account)

– Enter password (whatever was generated on original account)

• Click on the Script tab.

• Upload the script to the script repository

• Run the script under appropriate schema

Page 6: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -66

Preparation: Create the TablePreparation: Create the Table

ID

1

2

3

4

5

6

7

8

9

artist_name type

Bob Marley Reggae

Brittney Spears Pop

N’Sync Pop

Shaggy Reggae

Jimmy Cliff Reggae

Kid Rock Rock

Third World Reggae

Lenny Kravitz Rock

Yellow Man Reggae

[email protected]

Database

Page 7: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -77

ClientDatabase

First Step: “The Query”First Step: “The Query”

????SQLSQLAreaArea

music

SELECT artist_name

FROM music

WHERE type = ‘reggae’;

Page 8: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -88

Client Database

SQLArea

??

Second Step: “The Cache”Second Step: “The Cache”

Database Buffer Cache

music

SELECT artist_name

FROM music

WHERE type = ‘reggae’;

Page 9: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -99

Third Step: “Data Disk”Third Step: “Data Disk”

Database Buffer Cache

ReggaeReggaeYellow ManYellow Man99RockLenny Kravitz8

ReggaeReggaeThird WorldThird World77RockKid Rock6

ReggaeReggaeJimmy CliffJimmy Cliff55ReggaeReggaeShaggyShaggy44

PopN’Sync3PopBrittney Spears2

ReggaeReggaeBob MarleyBob Marley11TypeArtist_nameID

SELECT artist_name

FROM music

WHERE type = ‘reggae’;

Page 10: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -1010

Fourth Step: “Redo Log Buffer”Fourth Step: “Redo Log Buffer”

Client Database

SQLArea

Database Buffer Cache

music

Redo Log Buffer

SELECT artist_name

FROM music

WHERE type = ‘reggae’;

or

CREATE table MUSIC…

Page 11: Database Introduction Section 14 – Lesson 01 Use the student note section below for further explanation of the slide content.Use the student note section.

14 -14 -1111

SummarySummary

• Steps in a database transaction.

• Components of the the database system.

– Cache

– Data Disk

– Redo Log Buffer

• Continue entering sample data into the MUSIC table.

• Steps in a database transaction.

• Components of the the database system.

– Cache

– Data Disk

– Redo Log Buffer

• Continue entering sample data into the MUSIC table.