Database Course Lecture 6 Outline 2024/2025

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What does the System Global Area (SGA) contain?

  • Program code only for background processes
  • Control information for one Oracle Database instance (correct)
  • Nonshared memory for server processes
  • Data for each connected user exclusively

Which component is nonshared memory created by Oracle Database?

  • Program Global Area (PGA) (correct)
  • Data blocks
  • Background processes
  • System Global Area (SGA)

How does the physical storage of data relate to logical storage structures in an Oracle database?

  • Physical storage cannot be changed without affecting logical structures.
  • They are always managed together.
  • Logical structures dictate the physical storage method.
  • They can be managed independently. (correct)

What happens every time an Oracle instance is started?

<p>The System Global Area (SGA) is allocated and background processes are initiated. (A)</p> Signup and view all the answers

Which statement correctly describes the SGA?

<p>It is shared among all server and background processes. (D)</p> Signup and view all the answers

Which of the following is NOT a function of the Oracle Database memory structures?

<p>Managing user access rights (B)</p> Signup and view all the answers

What is a key characteristic of the Program Global Area (PGA)?

<p>Access to it is exclusive to the server process. (D)</p> Signup and view all the answers

What constitutes an Oracle database?

<p>An instance and its associated database (D)</p> Signup and view all the answers

Which statement best describes what the background processes do?

<p>They run tasks in the background to support the database instance. (A)</p> Signup and view all the answers

What is stored in the cached data blocks of the SGA?

<p>Data retrieved from the database (B)</p> Signup and view all the answers

Flashcards

Oracle Database Instance

An Oracle database's active component, consisting of memory structures and background processes, used for data management and access.

SGA

System Global Area: shared memory area containing cached data, SQL statements, & other instance-wide information in an Oracle Database instance.

PGA

Program Global Area: non-shared memory area for a server or background process, storing its data and control information.

Oracle Database Architecture

The design and structure of an Oracle database, including its instance, databases (physical and logical structures) and memory areas (SGA & PGA).

Signup and view all the flashcards

Physical Structures

The actual storage of data in files on a computer. They are the underlying storage of the database.

Signup and view all the flashcards

Logical Structures

The organization and relationships of the data in the database, independent of its physical storage.

Signup and view all the flashcards

Instance

The active part of an Oracle database, containing memory structures & background processes.

Signup and view all the flashcards

Database

The actual data and schema stored and managed by the database system, comprising physical and logical structures.

Signup and view all the flashcards

SGA Components

The individual memory structures inside the SGA, holding data and control details for a singular Oracle database instance.

Signup and view all the flashcards

Server Processes

Processes in an Oracle database instance that handle user requests to access the data.

Signup and view all the flashcards

Study Notes

Course Outline

  • Database (2) course, 2024/2025
  • Lecture 6
  • Course outline covers weeks 1-15
  • Topics include: Advanced concepts of databases; implementation of databases; safety/integrity and security of data; data backup & recovery; midterm exam; control of simultaneous treatment; distributed database systems; practical applications of database programming language implementation; practical and oral exam; final exam

Database Topics

  • Week 1-3 (CH1): Advanced concepts of databases
  • Week 4 (CH2): Implementation of databases
  • Week 5 (CH3): Safety, integrity, and security of data
  • Week 6 (CH4): Data backup and recovery
  • Week 7: Midterm Exam
  • Week 7-8 (CH4): Control of simultaneous treatment (concurrency control)
  • Week 10-11 (CH5): Distributed database systems - recent trends of distributed data analytics, e.g., big data analytics
  • Weeks 12-13 (Ch 5): Practical applications in a language of programming and implementation of databases
  • Week 14: Practical Exam & Oral Exam
  • Week 15: Final Exam

Oracle Database Architecture

  • An Oracle database is made up of an instance and its associated databases
  • The instance contains memory structures and background processes
  • When the instance starts, a shared memory area (SGA) is created and background processes are started
  • Databases consist of both physical and logical structures
  • Physical and logical structures are separate, allowing physical storage changes without affecting logical access
  • 2024/2025

Oracle Database Memory Structures

  • System Global Area (SGA):
    • A group of shared memory structures
    • Contains data and control information for one Oracle Database instance
    • Shared by all server and background processes
    • Examples of data stored include cached data blocks, shared SQL areas
  • Program Global Area (PGA):
    • Memory regions containing data and control information for a server or background process
    • Non-shared memory created when the server or background process starts
    • Each server process and background process has its own PGA
  • Database buffer cache:
    • Part of the SGA
    • Holds copies of data blocks read from data files
    • Shared by all concurrent users
  • Redo log buffer:
    • Part of the SGA
    • Circular buffer
    • Holds information about changes made to the database
    • Contains redo entries to redo changes
  • Shared pool:
    • Part of the SGA
    • Contains the library cache, shared SQL area, data dictionary cache, query results, and PL/SQL function result cache
    • Buffers for parallel execution messages and control structures
    • Used by concurrent users to access the data dictionary
    • Contains SQL statement in shared SQL area
  • Large pool: (optional)
    • Large memory allocations
    • Session memory for the shared server and the Oracle XA interface (used when transactions interact with more than one database)
    • I/O server processes and Oracle Database backup and restore operations

Process Architecture

  • User Process:
    • Started when a user or batch process connects to the Oracle database
  • Server Process:
    • Connects to the Oracle instance
    • Starts when a user establishes a session
  • Background Processes:
    • Start when an Oracle instance starts

Background Processes

  • Database writer process (DBWn):
    • Writes modified buffers in the database buffer cache to disk
    • Asynchronously while performing other processing
    • Periodically to advance the checkpoint
  • Log writer process (LGWR):
    • Writes the redo log buffer to a redo log file on disk
    • Writes when a user commits a transaction
    • When the redo log buffer is one-third full
    • Before DBWn process writes modified buffers to disk
  • System Monitor process (SMON):
    • Performs recovery at instance startup
    • Cleans up unused temporary segments
  • Process Monitor process (PMON):
    • Performs process recovery when a user process fails
    • Cleans up the database buffer cache
    • Frees resources used by the user process
    • Monitors sessions for idle session timeouts
    • Registers database services with listeners
  • Recoverer process (RECO):
    • Used with distributed database configuration
    • Connects to other databases involved in in-doubt distributed transactions
    • Automatically resolves in-doubt transactions
    • Removes rows that correspond to in-doubt transactions
  • Archiver processes (ARCn):
    • Copies redo log files to a storage device after a log switch
    • Collects transaction redo data
    • Transmits data to standby destinations

Additional Information

  • Allocation and Reuse of Memory in the Shared Pool: Server processes check the shared pool for shared SQL area; allocates a private SQL area for the session.
  • Oracle Database Memory Structures: Used for various purposes (program code being run, user-shared data, and private data.)
  • Questions section: presented for future reference.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser