Informatics Practices
Consider a table Student having two fields—FName varchar(20) and LName char(20). If in a record, value stored in Fname is 'Anuj' and LName is 'Batra', then FName and LName will consume …………… and …………… character space respectively.
- 4, 5
- 4, 20
- 20, 4
- 20, 20
Relational Database
3 Likes
Answer
4, 20
Reason — FName
is a varchar(20) field, which means it can store a variable-length string up to a maximum of 20 characters. Since the value stored in FName is 'Anuj', it will consume 4 character spaces (A-n-u-j). LName
is a char(20) field, which means it is a fixed-length string that always occupies 20 character spaces, regardless of the actual length of the string. Since the value stored in LName is 'Batra', it will still consume 20 character spaces, with the remaining 15 characters being padded with spaces.
Answered By
1 Like
Related Questions
The symbol Asterisk (*) in a select query retrieves …………… .
- All data from the table
- Data of primary key only
- NULL data
- None of these
Consider the attributes ( RollNumber, SName, SDateofBirth, GUID ) of the table Student. According to you, which of the following options is the correct representation of the table after executing the following query?
Insert Into Student (RollNumber, SName, SDateofBirth) Values(2, 'Sudha', '2002-02-28') ;
1.
RollNumber SName SDateofBirth GUID 1 Atharv 2003-05-15 12354899 2 Sudha 2002-02-28 NULL 2.
RollNumber SName SDateofBirth GUID 1 Atharv 2003-05-15 12354899 2 Sudha 2002-02-28 00000000 3.
RollNumber SName SDateofBirth GUID 1 Atharv 2003-05-15 12354899 2 Sudha 2002-02-28 0 4.
RollNumber SName SDateofBirth GUID 1 Atharv 2003-05-15 12354899 2 Sudha 2002-02-28 Assertion (A): Database management system is an application software which arranges data in a well-organized manner in the form of tables.
Reasoning (R): DBMS acts as an interface between the database stored in the computer memory and the user.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Assertion (A): A database consists of multiple tables.
Reasoning (R): A foreign key is used to represent the relationship between two tables.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.