Oracle logical structures
Oracle logical structures can be summarised by the following:
Schema. Tablespace. Datablock. Redo log.
Schema
- collection of objects (table, view, etc)
- owned by db user
- name is the same as db user
- mixed up (user is often used interchangeably with schema)
- access – user has access to all objects in schema
- name – user only has access to schema of the same name
Tablespace
- Logical storage units – oracle divided into one or more logical storage units
- objects – tablespace stores related database objects
- access – tablespace can be online (accessible) or offline (not accessible)
- normally online so users can access data
Datablock
Tablespace > Segment > Extent > Data block
- tablespace made of one or more segments.
- segments made of one or more extents.
- extents made of one or more data blocks.
- data block id the smallest logical unit oracle can use or allocate.
- block size can be specified at db creation.
- block size should be a multiple of o/s block size.
Redo Log
- 1 or more redo logs per database
- record for recovery – records all actions in case of failure so that data can be recovered.
- duplicate disks – redo logs stored on multiple disks incase og failure due to redo log itsself.
- crash changes – if data cant be written to datafile due to failure then changes can be recovered from redo log so that no data is lost.
sources: oracle database documentation