In: Computer Science
QUESTION 71
For first name column in our subsidiary’s database in Japan, we should use _____
A.
nchar(30)
B.
char(30)
C.
varchar(30)
D.
nvarchar(30)
QUESTION 72
for column definition of middle name in US., we should use _____
A.
nchar(20)
B.
char(20)
C.
varchar(20)
D.
varchar2(20)
71)
Answer D) nvarchar(30)
Explanation:
Let us first unserstand the differences between char(n),
varchar(n), nchar(n), nvarchar(n)
char(n): stores fixed length data
varchar(n): stores variable length data
nchar(n): stores fixed length data, but in unicode format (supports
different languages like Japanese, etc)
nvarchar(n): stores variable length data, but in unicode format
(supports different languages like Japanese, etc)
Since we want to store firstname in Japanese, we must use
nvarchar(30), since firstnames are variable length and also first
name should be in Japanese, so we want unicode support.
Hence
Answer D) nvarchar(30)
----------------------------------------------------------------------
71)
Answer D) varchar2(20)
Explanation:
Let us first unserstand the differences between char(n), nchar(n),
varchar(n), varchar2(n)
char(n): stores fixed length data
nchar(n): stores fixed length data, but in unicode format (supports
different languages like Japanese, etc)
varchar(n): stores variable length data
varchar2(n): stores variable length data, but it is recommended to
use over varchar.
Since we want to store middlename in US,
nchar and char cannot be used since middle names are not fixed
length data.
Hence, we want support for variable length, we can either choose
varchar() or varchar2().
But, practically varchar2 is always chosen over varchar, because
varchar2 treats empty string and null values similar.
Hence,
Answer D) varchar2(20)
---------------------------------------------
Please give a thumbs up if you find this answer helpful.
If it doesn't help, please comment before giving a thumbs
down.
Please Do comment if you need any clarification.
I will surely help you.
Thankyou