Homechevron_rightEngineeringchevron_rightRPSC Programmerchevron_rightProgrammer DBMSchevron_right<p style="">Consider the relation Emp Dept with SSn as...

Consider the relation Emp-Dept with SSn as key ...

  • Q.

    Consider the relation Emp-Dept with SSn as key

    Ename

    SSn

    EAddr

    Dept.

    No

    Dept.

    Name

    Dept.

    Manager

    SSn

     

    Which of the following is (are) invalid operation(s)?

    a) Inserting an employee without name and address

    b) Inserting an employee with only SSn

    c) Inserting a department with no employee

    d) Inserting an employee without SSn

  • filter_dramaExplanation
    Answer is : B

    Concept:

    • Here employee and department both table are merged into one table so right most SSn id is foreign key and second entry from left side is key of employee table.


    Statement a:

     Inserting an employee without name and address, is a valid statement because only SSn which is key should not be NULL other entries can be NULL.

    Statement b:

    Inserting an employee with only SSn, is a valid statement because only SSn which is key should not be NULL and here SSn is not NULL so valid statement

    Statement c:

    Inserting a department with no employee is a valid statement because foreign key can have NULL value.

    Statement d:

    Inserting an employee without SSn is not a valid statement because SSn employee id cannot be NULL

    So option 2 is the correct answer.

Discussion

    No one started the discussion yet. Break the ice and start the conversation.
    Please Login to be part of the discussion.

Similar Questions

  • 1.

    Which of the following schedule results unrepeatable read problem

    S1:r2(x) r2(y) r1(x) r1(y) w1(x) r2(x)

    S2: r2(x) r2(y) w1(x) r1(x) r2(y)

    S3: r2(x) r2(y) r1(x) r1(y) w1(x) w2(x)

  • filter_dramaExplanation
    Answer is : A

    Key Points

    Un-Repeatable read problem(R-W conflict):

    If whenever a transaction tries to write the value of a data item twice between two read operations. If another transaction updates the same results in the first transaction to read varied values of some data item during its execution. This is known as the "un-repeatable read problem" also called "read-write conflict".

    S1 is not conflict serializable, but S2 is conflict serializable Schedule S1 T1 T2 --------------------- r1(X) r1(Y) r2(X) r2(Y) w2(Y) w1(X) The schedule is neither conflict equivalent to T1T2, nor T2T1. Schedule S2 T1 T2 --------------------- r1(X) r2(X) r2(Y) w2(Y) r1(Y) w1(X) The schedule is conflict equivalent to T2T1.

    Only S1 has R-W conflict.

  • 2. In relational database minimal super keys is known as -
  • filter_dramaExplanation
    Answer is : B

    The correct option is (2)

    Candidate key

    Concept:-

    The candidate key can be called a super key, as each candidate key is a subset of the super key. The super key with all necessary attributes is known as the candidate key. The super key with unnecessary attributes cannot be considered a candidate key.

    Key Points

    • A Candidate key is a minimal super key, meaning that it would cease to be a super key if you removed any attribute from the set.
    • A minimum super key is referred to as a candidate and the main key since the primary key is chosen from the candidate keys.
    • The minimal set of attributes that can uniquely identify a tuple is known as candidate key. For example, STUD_NO in STUDENT relation. It is a minimal super key.

    Additional InformationForeign keys:- The characteristic that establishes the relationship between tables is the foreign key of a table. A foreign key is a column or columns of data in one table that connects to the primary key data in the original table.

    Primary key:- The very minimum set of characteristics necessary to identify each row in a database is known as the primary key. It is chosen from a list of potential keys. The primary key might be any candidate's key.

    Reference key:- The primary key that is used as a reference in the other table is known as the Reference key.

  • 3. Three or more devices share a link in ________ connection
  • filter_dramaExplanation
    Answer is : B

    Uni point: a User Network Interface (UNI) is a demarcation point between the responsibility of the service provider and the responsibility of the subscriber

    Multi point: It is also called Multidrop configuration. In this connection two or more devices share a single link.

    Point to point: It is a protocol which is used as a communication link between two devices.
  • 4. Which is the reverse process of Specialization?
  • filter_dramaExplanation
    Answer is : A

    Generalization is a abstracting process of viewing sets of objects as a single general class by concentrating on the general characteristics of the constituent sets while suppressing or ignoring their differences.In simple terms, Generalization is a process of extracting common characteristics from two or more classes and combining them into a generalized superclass. So, it is a bottom up approach as two or more lower lever entities are combined to form a higher level entity.

    Specialization may be seen as the reverse process of Generalization. Specialization is the abstracting process of introducing new characteristics to an existing class of objects to create one or more new classes of objects.In simple terms, a group of entities in specialization can be categorized into sub - groups based on their characteristics. So it is a top - down approach in which one higher level entity can be broken down into two lower level entity. It defines one or more subtypes of the supertypes and forming supertype/subtype relationships.

  • 5. The protocol data unit (PDU) for the application layer in the Internet stack is
  • filter_dramaExplanation
    Answer is : C

    The correct answer is option 3

    CONCEPT

    PDU for the application layer is messages.

    Additional Information

    • A protocol data unit (PDU) is a single unit of information transmitted among peer entities of a computer network.
    • PDU for the physical layer is bits.
    • PDU for the data link layer is a frame.
    • PDU for the network layer is packets.
    • PDU for the transport layer is a segment.

Programmer DBMSTopics

leaderboardLeaderboard
  • Rahul Kumar

    191 Points

  • VIKRAM JEET

    54 Points

  • GEETHIKA CHOWDARY

    53 Points

  • sunita saini

    52 Points

  • Zain

    49 Points