Database-MySQL [3i Infotech Placement]: Sample Questions 46 - 46 of 162

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 46


Describe in Detail


What are database files, control files and log files? How many of these files should a database have at least? Why?


  • Database files:
    • The database file holds the actual data and is typically the largest.
    • Depending on size, tables for all user accounts can go one database file but that is not ideal- make the database structure very inflexible for controlling access to storage for different users, putting the database on different disk driver, or backing up and restoring just part of the database.
    • We use at least one database file but usually, more than one files are used.
    • In terms of accessing and using the data in the tables and other objects, the number (or location) of the files is immaterial.
    • The database files are fixed in size and never grow bigger than the size at which they were created.
  • Control files:
    • The control files and redo logs support the rest of the architecture.
    • Control file records the name of the database, the date and time it was created, the location of the database and redo logs, and the synchronization information to ensure that all three sets of files are always in step.
    • Every time you add a new database or redo log file to the database, the information is recorded in the control files.
  • Redo Logs:
    • Any database must have at least two redo logs.
    • These are the journals for the database; the redo logs record all changes to the user objects or system objects.
    • If any type of failure occurs, the changes recorded in the redo logs is used to bring the database to a consistent state without losing any committed transactions.
    • In the case of non-data loss failure, Oracle can apply the information in the redo logs automatically without intervention from the DBA.
    • The redo log files are fixed in size and never grow dynamically from the size at which they were created.

Developed by: