Q16. What is the difference between the fixed and variable field lengths?
Ans. In a fixed length field, the number of characters you can enter in the field remains fixed. On the other hand, in variable length field, the length of the field changes according to the data entered.
Fixed Length Field: It is a type of field length in which the number of characters you can enter is fixed. 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. The number of characters can vary but cannot exceed eight. 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: It is a type of field length in which the number of characters is variable. In this type of field length, the size of each field id different from the other fields in the table. Actually, the number of characters of the data entered in the field decides the field length. For example, the field Student Name having variable length can store names of different lengths, such as Kavya Sharma (12 characters) or Himanshu Gutpa (14 characters). The field takes the number of characters of the data that you want to store as its length.