All Exams Test series for 1 year @ ₹349 only
Question

Assume standard SQL semantics: VARCHAR stores a variable-length character value without padding, while CHAR(n) pads it to n character positions. Attribute A is VARCHAR(20) with value ‘xyz’; attribute B is CHAR(20) with value ‘Imnop’. Excluding storage metadata, how many character positions do the stored values of A and B occupy, respectively?

The correct answer is

3, 20

VARCHAR retains the three characters in xyz without padding. CHAR(20) pads the five-character value Imnop with 15 trailing blanks, giving 20 character positions. Excluding storage metadata, the respective lengths are therefore 3 and 20.

Was this answer helpful?

Important Questions from ER Model

  1. ______ are some problems that can occur when creating an entity-relationship model.

  2. The values of the attributes in a database describe a particular _______.

  3. Which of the following data item is not broken down into smaller units is?

  4. Which of the following statements is/are TRUE?


    (i) A weak entity set is identified solely by its partial key (discriminator).


    (ii) The identifying relationship type between a weak entity type and its owner entity type must have total participation from the weak entity type.

  5. Consider an ER model with the entities E1(A11, A12, A13) and E2(A21, A22, A23), where, A11, A12, A13 are the attributes of E1, and A21, A22, A23 are the attributes of E2. Let A22 be a multi-valued attribute. A11 and A21 are the primary keys of E1 and E2, respectively.

    Let R12 be a many-to-many relationship between E1 and E2. Participation of both E1 and E2 in R12 is total.

    The minimum number of relations required to convert the ER model into relational model (assuming there is no other functional dependency) where each relation is in third normal form (3NF) is __________ . (Answer in integer)
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App