What does Record and file mean in DBMS ?

 

What does Record mean?


In relational databases, a record is a group of related data held within the same structure. More specifically, a record is a grouping of fields within a table that reference one particular object. The term record is frequently used synonymously with row.


For example, a customer record may include items, such as first name, physical address, email address, date of birth and gender.


A record is also known as a tuple.


Tables contain columns and rows that, to simplify, are similar in structure to Microsoft Excel. Relational tables have a very similar but more complex structure, as each table column represents a certain table property.


Let's say there is a table named CUSTOMER_MASTER, which stores basic customer data. It might contain a CUSTOMER_SURNAME column, which is used to store customer surnames. This column may have certain parameters.


Example - each surname must be 30 characters or less and only comprised of alphabetical characters. Thus, each customer surname added to the CUSTOMER_MASTER table must meet these parameters.


However, each complete customer row or record also includes other items, such as first name, physical address, email address, date of birth and gender, etc. 


Each item is categorized into its designated corresponding column. Thus, each customer row or record is one horizontal line of data that holds a collection of items.


What does File mean?


  • The File is a collection of records. Using the primary key, we can access the records. The type and frequency of access can be determined by the type of file organization which was used for a given set of records.
  • File organization is a logical relationship among various records. This method defines how file records are mapped onto disk blocks.
  • File organization is used to describe the way in which the records are stored in terms of blocks, and the blocks are placed on the storage medium.
  • The first approach to map the database to the file is to use the several files and store only one fixed length record in any given file. An alternative approach is to structure our files so that we can contain multiple lengths for records.
  • Files of fixed length records are easier to implement than the files of variable length records.


Objective of file organization


  • It contains an optimal selection of records, i.e., records can be selected as fast as possible.
  • To perform insert, delete or update transaction on the records should be quick and easy.
  • The duplicate records cannot be induced as a result of insert, update or delete.
  • For the minimal cost of storage, records should be stored efficiently.

Types of file organization:

File organization contains various methods. These particular methods have pros and cons on the basis of access or selection. In the file organization, the programmer decides the best-suited file organization method according to his requirement.

Types of file organization are as follows:



File organization


Comments

Popular posts from this blog

Limitations of the File-Based Approach

The Three-Level ANSI-SPARC Architecture

Roles of DA , DBA , Database Designer , Application Developers and Users