Define different field types in BASE

Q5. Define different field types along with their types in BASE.

Ans. The field type allows you to specify the type of data or information that the field contains or stores. In BASE, you can define two types of fields:

  • Fixed length field: Refers to a type of field length in which the number of characters you can enter is fixed. Fixed length fields can accommodate a fixed number of bytes to store each data element. For example, if we specify the field length as 8, it means that the field can store a maximum of eight characters or 8 bytes of data. It does not mean that the number of characters has to be always eight. The number can vary but it cannot exceed eight. For example, you can type the name Ram in a field that has 8 specified as its field length. However, if you enter Shyam Sharma in the same field, a message appears, informing you that you have exceeded the data length permitted for the field. The main disadvantage of a fixed length field is that there is wastage of space since not all of it is used every time you enter data.
  • Variable length field: Refers to the type of field length whose value changes according to the length of the data in the field. In this type of field length, the size of each field is different from the other field in the table. The length of the field depends on the number of characters in the field. For example, a field of variable length named Student Name can store names of different lengths, such as Kavya Sharma (12 characters) or Himanshu Gupta (14 characters). In other words, the upper limit of characters that you can store in a variable field length is not specified. The field takes the number of characters of the data that you want to store. Therefore, there is no wastage of space.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: