Database Architecture LECTURE 7 Physical Structure One characteristic
Database Architecture LECTURE 7
Physical Structure One characteristic of an RDBMS is the independence of logical data structures such as tables, views, and indexes from physical storage structures. For example, renaming a database file does not rename the tables stored in it. An Oracle database is a set of files that store Oracle data in persistent disk storage. This section discusses the database files generated when you issue a CREATE DATABASE statement:
Physical Structure The physical layer of the database consists of three types of files: a. One or more Datafiles. b. Two or more redo log files. c. One or more control files.
Physical Structure …
Datafiles(. dbf files) Each tablespace in an oracle database consists of one or more files called data files. A data file is a physical file on disk that was created by Oracle Database and contains data structures such as tables and indexes. The database administrator can change the size of a datafile after its creation or can specify that a data file should dynamically grow as objects in the tablespace grow. Datafiles store the information contained in the database.
Redo log files(. rdo &. arc) Oracle maintains logs of all the transaction against the database. These transactions are recorded in files called Online Redo Log Files (Redo Logs). The main purpose of the Redo log files is to hold information as recovery in event of a system failure. The online redo log file is a set of files containing records of changes made to data.
Redo log files… If the redo log file information is lost one cannot recover the system. When a transaction accurse in the database it is entered in the redo log buffer while the data blocks affected by the transactions are not immediately written to disk
Redo log files… In an oracle database there at lest three or more Redo Log files. Oracle writes to redo log file in cyclical order i. e. after the first log file is filled, it writes to the second log file until that one is filled. When all the redo log files have been filled. It returns to the first log file begin overwrite its content with new transaction data.
Redo log files…
Redo log files… Oracle Database uses only one online redo log file at a time to store records written from the redo log buffer. The online redo log file to which the log writer process (LGWR) process is actively writing is called the current online redo log file. A log switch occurs when the database stops writing to one online redo log file and begins writing to another. Normally, a switch occurs when the current online redo log file is full and writing must continue.
Control files(. ctl) Oracle Database uses the control file to locate database files and to manage the state of the database generally. A control file contains information such as the following: The database name and database unique identifier (DBID) The time stamp of database creation Information about data files, online redo log files, and archived redo log files Tablespace information RMAN backups
Control files… The control file serves the following purposes: It contains information about data files, online redo log files, and so on that are required to open the database. The control file tracks structural changes to the database. For example, when an administrator adds, renames, or drops a data file or online redo log file, the database updates the control file to reflect this change. It contains metadata that must be accessible when the database is not open.
- Slides: 12