Mid Term Exam Semester 1.pdf

download Mid Term Exam Semester 1.pdf

of 150

Transcript of Mid Term Exam Semester 1.pdf

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    1/150

    Mid Term Exam Semester 1

    1. Oracle Database Software provides which of the following functionality? (Choose two) Mark

    for Review(1) Points

    (Choose all correct answers)

    Graphical User Interface (*)

    Internet Browser

    Server (*)

    Operating System

    2. The first step in system development is to document the requirements. Why? Mark for Review(1) Points

    Wrong. A blueprint for the database design is not needed. We can just start coding straight away.

    It clarifies what a business wants to accomplish, and provides measures for deciding if the systemdelivers all that is required. (*)

    It allows application development to be conducted without having to consider database design.

    It keeps businesses honest.

    3. The main subject areas taught by the Oracle Academy are: Mark for Review

    (1) Points

    Computer Repairs

    Database performance tuning.

    Data Modeling, SQL and PL/SQL (*)

    Systems programming and computer architecture

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    2/150

    4. Consider your school library. It will have a database with transaction details of which student

    borrows which books. Is details of the total number of books out on loan in one given month Data

    or Information? Mark for Review(1) Points

    Data

    Information (*)

    Both

    Neither

    5. Data modelling is performed for the following reasons: (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    The ERDs becomes a blueprint for designing the actual system. (*)

    It helps discussions and reviews. (*)

    We do not need datamodels, we can just start coding right away.

    We just draw the ERDs to please the users, once they are finished we never look at them again. Theyserve no purpose in the real world.

    6. Entity and Attribute names are always interchangable, so you need not worry about choosingthe right type. True or False? Mark for Review(1) Points

    True

    False (*)

    7. All of the following would be instances of the entity ANIMAL SPECIES except which? Mark

    for Review(1) Points

    Dog

    Bird

    Elephant

    Leaf (*)

    8. The entity/relationship model is created before the physical database design model? True or

    False? Mark for Review(1) Points

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    3/150

    True (*)

    False

    9. In a physical data model, a relationship is represented as a? Mark for Review (1) Points

    Column

    Row

    Instance

    Foreign Key (*)

    10. Volatile entities have special requirements and need special attention when you are doingdata modelling. True or False? Mark for Review(1) Points

    True (*)

    False

    11. A/an _________ is a picture of all the information that will form the basis for the finished

    system. Mark for Review(1) Points

    ERD (*)

    Process

    Table

    Attribute

    12. When reading an ERD including Relationships you are said to be speaking: Mark for Review(1) Points

    Relationship-ish

    Gibberish

    ERDish (*)

    Entity-ish

    13. All the Attributes in a system are just written on the ERD, and they all go in the Top Left

    Hand Corner of the paper. True or False? Mark for Review(1) Points

    True

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    4/150

    False (*)

    14. A Matrix Diagram should be developed by your users. True or False? Mark for Review(1) Points

    True

    False (*)

    15. Relationship Degree/Cardinality is important. True or False? Mark for Review (1) Points

    True (*)

    False

    16. Relationship Names are optional. True or False? Mark for Review(1) Points

    True

    False (*)

    17. A new system would have a mixture of both Procedural and Structural Business Rules as part

    of the documentation of that new system. True or False? Mark for Review

    (1) Points

    True (*)

    False

    18. The Other subtype is mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    19. A supertype can only have two subtypes and no more. True or False? Mark for Review(1) Points

    True

    False (*)

    20. You can only create relationships to a Supertype, not to a Subtype. True or False? Mark for

    Review(1) Points

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    5/150

    True

    False (*)

    21. A Supertype can have only one subtype. True or False? Mark for Review(1) Points

    True

    False (*)

    22. When creating entities you must follow these rules: (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    Name them in Plural

    Name them in Singular (*)

    Exclude Attributes

    Include Attributes (*)

    23. If a relationship can NOT be moved between instances of the entities it connects, it is said to

    be: Mark for Review(1) Points

    Mandatory

    Optional

    Transferrable

    Non-Transferrable (*)

    24. Which of the following pairs of entities is most likely to be modeled as a M:M relationship?

    Mark for Review(1) Points

    CAR and WHEEL

    TREE and BRANCH

    PERSON and FINGERPRINT

    TEACHER and SUBJECT AREA (*)

    25. If two entities have two relationships between them, these relationships can be either

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    6/150

    _____________ or _____________ ? Mark for Review(1) Points

    Redundant or Required (*)

    Replicated or Required

    Resourced and Really Good

    Redundant and Replicated

    26. What uncommon relationship is described by the statements: Each DNA SAMPLE may be

    taken from one and only one PERSON and each PERSON may provide one and only one DNA

    SAMPLE Mark for Review(1) Points

    One to Many Optional

    One to Many Mandatory

    One to One Optional (*)

    Many to Many Mandatory

    27. How do you include a relationship as part of the UID for an entity? Mark for Review (1) Points

    By barring the relationship in question (*)

    By reporting it in an external document

    By including the UID from the parent entity as an attribute in the entity

    You cannot model that.

    28. When you resolve a M-M you simply re-draw the relationships between the two original

    entities, no new entities are created. True or False? Mark for Review (1) Points

    True

    False (*)

    29. Intersection Entities often have the relationships participating in the UID, so the relationships

    are often barred. True or False? Mark for Review(1) Points

    True (*)

    False

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    7/150

    30. What do you call the entity created when you resolve a M:M relationship? Mark for Review(1) Points

    Intersection entity (*)

    Inclusion entity

    Recursive entity

    M:M entity

    31. When is an entity in 2nd Normal Form? Mark for Review (1) Points

    When all non-UID attributes are dependent upon the entire UID. (*)

    When no attritibutes are mutually independant and fully independent on the primary key.

    When no attritibutes are mutually independent and all are fully dependent on the primary key.

    None of the Above.

    32. All entities must be given a new artificial UID. True or False? Mark for Review(1) Points

    True

    False (*)

    33. There is no limit to how may UIDs an entity can have. True or False? Mark for Review (1) Points

    True (*)

    False

    34. Normalizing an Entity to 1st Normal Form is done by removing repeated or redundant

    attributes. True or False? Mark for Review(1) Points

    True (*)

    False

    35. No commercial database systems in the world will accept tables that are not on 3rd Normal

    Form. True or False? Mark for Review(1) Points

    True

    False (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    8/150

    36. If Audit trail attributes are added to an entity they must be in the entities they are auditing.

    True or False? Mark for Review(1) Points

    True (*)

    False

    37. Which of the following would be good as a Unique Identifier for its Entity? (Choose Three)

    Mark for Review(1) Points

    (Choose all correct answers)

    Personal Identification number for Person (*)

    Vehicle Registration Number for Car (*)

    ISBN Number for Book (*)

    Date of birth for Baby

    38. No parts of an UID are mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    39. Primary UIDs are: Mark for Review(1) Points

    Something that each Entity should have, but is not mandatory (*)

    Useful as an alternative means of identifying instances of an entity, independent of their datatype

    Mandatory in data modeling

    Always comprised of numbers

    40. Arcs are Mandatory in Data modeling. All ERDs must have at least one Arc. True or False?

    Mark for Review(1) Points

    True

    False (*)

    31. When is an entity in 2nd Normal Form? Mark for Review

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    9/150

    (1) Points

    When all non-UID attributes are dependent upon the entire UID. (*)

    When no attritibutes are mutually independant and fully independent on the primary key.

    When no attritibutes are mutually independent and all are fully dependent on the primary key.

    None of the Above.

    32. All entities must be given a new artificial UID. True or False? Mark for Review(1) Points

    True

    False (*)

    33. There is no limit to how may UIDs an entity can have. True or False? Mark for Review

    (1) Points

    True (*)

    False

    34. Normalizing an Entity to 1st Normal Form is done by removing repeated or redundant

    attributes. True or False? Mark for Review

    (1) Points

    True (*)

    False

    35. No commercial database systems in the world will accept tables that are not on 3rd Normal

    Form. True or False? Mark for Review(1) Points

    True

    False (*)

    36. If Audit trail attributes are added to an entity they must be in the entities they are auditing.

    True or False? Mark for Review(1) Points

    True (*)

    False

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    10/150

    37. Which of the following would be good as a Unique Identifier for its Entity? (Choose Three)

    Mark for Review(1) Points

    (Choose all correct answers)

    Personal Identification number for Person (*)

    Vehicle Registration Number for Car (*)

    ISBN Number for Book (*)

    Date of birth for Baby

    38. No parts of an UID are mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    39. Primary UIDs are: Mark for Review(1) Points

    Something that each Entity should have, but is not mandatory (*)

    Useful as an alternative means of identifying instances of an entity, independent of their datatype

    Mandatory in data modeling

    Always comprised of numbers

    40. Arcs are Mandatory in Data modeling. All ERDs must have at least one Arc. True or False?

    Mark for Review(1) Points

    True

    False (*)

    41. All relationships participating in an arc must be mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    42. An arc can also be modeled as Supertype and Subtypes. True or False? Mark for Review(1) Points

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    11/150

    True (*)

    False

    43. Modeling historical data is Optional. True or False? Mark for Review(1) Points

    True (*)

    False

    44. When you add the concept of time to your data model, your model becomes more complex.

    True or False? Mark for Review(1) Points

    True (*)

    False

    45. Which of the following is a logical constraint that could result from considering how time

    impacts an example of data storage? Mark for Review(1) Points

    An ASSIGNMENT may only refer to an EMPLOYEE with a valid employee record at the Start Dateof the ASSIGNMENT. (*)

    EMPLOYEE periods can overlap causing the database to crash.

    End Date must be before the Start Date.

    Dates must be stored with Time.

    46. All systems must include functionality to provide logging or journaling in conceptual data

    models. True or False? Mark for Review(1) Points

    True

    False (*)

    47. All datamodels must be transformed from specific to generic. True or False? Mark for

    Review(1) Points

    True

    False (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    12/150

    48. A datamodel containing generic modeling techniques must not be mixed in with non-generic

    models. The generic entities MUST be drawn on a diagram of their own. True or False? Mark

    for Review(1) Points

    True

    False (*)

    49. There is no point in trying to group your entities together on your diagram according to

    volume. Making a diagram pretty is a waste of time. True or False? Mark for Review (1) Points

    True

    False (*)

    50. Which of the following statements are true for ERDs to enhance their readability. (Choose

    Two) Mark for Review(1) Points

    (Choose all correct answers)

    Is is OK to break a big ERD down into subsets of the overall picture. This way you end up with morethan one ERD, that together documents the entire system. (*)

    Try to avoid crossing lines (*)

    The crows feet (many ends) can point whichever way is the easiest to draw

    You must ensure you have all the entities on one single, big diagram, even if you have hundreds

    1. Entities are transformed into Tables during the Database Design process. True or False? Mark

    for Review(1) Points

    True (*)

    False

    2. Oracle Database Software provides which of the following functionality? (Choose two) Mark

    for Review(1) Points

    (Choose all correct answers)

    Graphical User Interface (*)

    Internet Browser

    Server (*)

    Operating System

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    13/150

    3. Consider your school library. It will have a database with transaction details of which student

    borrows which books. Is details of the total number of books out on loan in one given month Data

    or Information? Mark for Review(1) Points

    Data

    Information (*)

    Both

    Neither

    4. The main subject areas taught by the Oracle Academy are: Mark for Review(1) Points

    Computer Repairs

    Database performance tuning.

    Data Modeling, SQL and PL/SQL (*)

    Systems programming and computer architecture

    5. Data modelling is performed for the following reasons: (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    The ERDs becomes a blueprint for designing the actual system. (*)

    It helps discussions and reviews. (*)

    We do not need datamodels, we can just start coding right away.

    We just draw the ERDs to please the users, once they are finished we never look at them again. Theyserve no purpose in the real world.

    6. Entity Relationship modeling is dependent on the hardware or software used for

    implementation, so you will need to change your ERD if you decide to change Hardware Vendor.

    True or False? Mark for Review(1) Points

    True

    False (*)

    7. All of the following could be attributes of an ENTITY called PERSON except one. Select the

    incorrect one: Mark for Review(1) Points

    Haircolor

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    14/150

    Weight

    Gender

    Natacha Hansen (*)

    Correct

    8. Which of the following statements about relationships are true? (Choose Two) Mark for

    Review(1) Points

    (Choose all correct answers)

    They become foreign keys in the database. (*)

    They must be mandatory to be created in the database.

    They can be either mandatory or optional. (*)

    They must exist between two different Entities.

    9. Volatile entities have special requirements and need special attention when you are doing data

    modelling. True or False? Mark for Review(1) Points

    True (*)

    False

    10. All of the following would be instances of the entity ANIMAL SPECIES except which? Mark

    for Review(1) Points

    Dog

    Bird

    Elephant

    Leaf (*)

    11. An entity is instantiated as a ? Mark for Review (1) Points

    Experience

    Instance

    Table (*)

    None of the above

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    15/150

    12. Relationship Degree/Cardinality is important. True or False? Mark for Review (1) Points

    True (*)

    False

    13. Which of the following are valid relationship degrees? (Choose two) Mark for Review(1) Points

    (Choose all correct answers)

    1:1 (*)

    1:M (*)

    1:O

    O:O

    14. Matrix Diagrams are mandatory when doing data modelling. True or False? Mark for

    Review(1) Points

    True

    False (*)

    15. A Matrix Diagram should be developed by your users. True or False? Mark for Review(1) Points

    True

    False (*)

    16. Entity names are always singular. True or False? Mark for Review(1) Points

    True (*)

    False

    17. A new system would have a mixture of both Procedural and Structural Business Rules as part

    of the documentation of that new system. True or False? Mark for Review(1) Points

    True (*)

    False

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    16/150

    18. When creating entities you must follow these rules: (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    Name them in Plural

    Name them in Singular (*)

    Exclude Attributes

    Include Attributes (*)

    19. You can only create relationships to a Supertype, not to a Subtype. True or False? Mark for

    Review(1) Points

    True

    False (*)

    20. All ER diagrams must have one of each of the following: (Choose two) Mark for Review (1) Points

    (Choose all correct answers)

    One or more Entities (*)

    Relationships between entities (*)

    Arcs

    At least one supertype and subtype

    21. The Other subtype is mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    22. A Supertype can have only one subtype. True or False? Mark for Review(1) Points

    True

    False (*)

    23. Intersection Entities are at the Master end in the relationships between it and the original

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    17/150

    entities. So the original entities are details or children of the newly created intersection entity.

    True or False? Mark for Review(1) Points

    True

    False (*)

    24. When you resolve a M-M you simply re-draw the relationships between the two original

    entities, no new entities are created. True or False? Mark for Review (1) Points

    True

    False (*)

    25. Intersection Entities often have the relationships participating in the UID, so the relationships

    are often barred. True or False? Mark for Review

    (1) Points

    True (*)

    False

    26. If a relationship can NOT be moved between instances of the entities it connects, it is said to

    be: Mark for Review

    (1) Points

    Mandatory

    Optional

    Transferrable

    Non-Transferrable (*)

    27. What uncommon relationship is described by the statements: Each DNA SAMPLE may be

    taken from one and only one PERSON and each PERSON may provide one and only one DNA

    SAMPLE Mark for Review(1) Points

    One to Many Optional

    One to Many Mandatory

    One to One Optional (*)

    Many to Many Mandatory

    28. How do you include a relationship as part of the UID for an entity? Mark for Review

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    18/150

    (1) Points

    By barring the relationship in question (*)

    By reporting it in an external document

    By including the UID from the parent entity as an attribute in the entity

    You cannot model that.

    29. Many to many relationships must be left in the Model. It is important to have them

    documented as M-M. True or False? Mark for Review(1) Points

    True

    False (*)

    30. Which of the following pairs of entities is most likely to be modeled as a M:M relationship?

    Mark for Review(1) Points

    CAR and WHEEL

    TREE and BRANCH

    PERSON and FINGERPRINT

    TEACHER and SUBJECT AREA (*)

    31. The first UID for an entity is called the Primary UID, the second is called Secondary UID and

    so on. Mark for Review(1) Points

    Yes, this is the way UIDs are named. (*)

    No, it is not possible to have more than one UID for an Entity.

    Yes, but then it stops. No entities can have more than two UIDs.

    No, each Entity can only have one UID, the secondary one.

    32. There is no limit to how may UIDs an entity can have. True or False? Mark for Review (1) Points

    True (*)

    False

    33. As a database designer you do not need to worry about where in the datamodel you store a

    particular attribute, as long as you get it onto the ERD your job is done. True or False? Mark for

    Review

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    19/150

    (1) Points

    True

    False (*)

    34. Would it be a good idea to model age as an attribute of STUDENT? Mark for Review (1) Points

    Yes

    Maybe it could stop us having to calculate someones age every time we need it

    Sometimes

    No it breaks the Normalization rules (*)

    35. Until all attributes are single-valued, the database model is said to be: Mark for Review

    (1) Points

    Normalized

    Not Normalized (*)

    1st Normal Form

    2nd Normal Form

    Incorrect. Refer to Section 6 Lesson 2.

    36. Primary UIDs are: Mark for Review(1) Points

    Something that each Entity should have, but is not mandatory (*)

    Useful as an alternative means of identifying instances of an entity, independent of their datatype

    Mandatory in data modeling

    Always comprised of numbers

    37. Which of the following is NOT a relationship type? Mark for Review (1) Points

    Some to None (*)

    One to One

    One to Many

    Many to Many

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    20/150

    38. No parts of an UID are mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    39. Which of the following would best be represented by an arc? Mark for Review(1) Points

    TEACHER (Female, Bob)

    DELIVERY ADDRESS (Home, Office) (*)

    PARENT (Girl, Bob)

    STUDENT (Grade A student, Average Student)

    40. Arcs are Mandatory in Data modeling. All ERDs must have at least one Arc. True or False?

    Mark for Review(1) Points

    True

    False (*)

    41. Historical data must never be kept. True or False? Mark for Review(1) Points

    True

    False (*)

    42. A recursive relationship must Mandatory at both ends. True or False? Mark for Review(1) Points

    True

    False (*)

    43. If a system includes the concept of time and it stores Start Dates, then End Dates becomes

    Mandatory. For each Start Date attribute you create, you MUST create an End Date attribute

    and it must be mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    21/150

    44. All systems must have an entity called WEEK with a holiday attribute, so you know when to

    give your employees a holiday. True or False? Mark for Review(1) Points

    True

    False (*)

    45. All systems must include functionality to provide logging or journaling in conceptual data

    models. True or False? Mark for Review(1) Points

    True

    False (*)

    46. Which of the following is a logical constraint that could result from considering how time

    impacts an example of data storage? Mark for Review(1) Points

    An ASSIGNMENT may only refer to an EMPLOYEE with a valid employee record at the Start Dateof the ASSIGNMENT. (*)

    EMPLOYEE periods can overlap causing the database to crash.

    End Date must be before the Start Date.

    Dates must be stored with Time.

    47. All datamodels must be transformed from specific to generic. True or False? Mark for

    Review(1) Points

    True

    False (*)

    48. Generic models are generally far more complex than a specific model. True or False? Mark

    for Review(1) Points

    True

    False (*)

    49. There are formal rules for how to draw ERDs, even though they are only guidelines, you

    should always try to follow them. True or False? Mark for Review(1) Points

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    22/150

    True (*)

    False

    50. There is no point in trying to group your entities together on your diagram according tovolume. Making a diagram pretty is a waste of time. True or False? Mark for Review (1) Points

    True

    False (*)

    1. Oracle Database Software provides which of the following functionality? (Choose two) Mark

    for Review(1) Points

    (Choose all correct answers)

    Graphical User Interface (*)

    Internet Browser

    Server (*)

    Operating System

    2. The market for IT professionals is still increasing and will continue to do so in the future, asthe world gets ever more dependent on computer systems. True or False? Mark for Review (1) Points

    True (*)

    False

    3. Information which was gained from data is the same as: (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    Knowledge (*)

    Raw Materials

    Intelligence (*)

    There is no difference between data and information.

    4. Entities are transformed into Tables during the Database Design process. True or False? Mark

    for Review(1) Points

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    23/150

    True (*)

    False

    5. Entity and Attribute names are always interchangable, so you need not worry about choosing

    the right type. True or False? Mark for Review(1) Points

    True

    False (*)

    6. An entity can have many Unique Identifiers. True or False? Mark for Review(1) Points

    True (*)

    False

    7. All of the following could be attributes of an ENTITY called PERSON except one. Select theincorrect one: Mark for Review(1) Points

    Haircolor

    Weight

    Gender

    Natacha Hansen (*)

    8. Which of the following statements about relationships are true? (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    They become foreign keys in the database. (*)

    They must be mandatory to be created in the database.

    They can be either mandatory or optional. (*)

    They must exist between two different Entities.

    9. A/an _________ is a picture of all the information that will form the basis for the finished system.Mark for Review

    (1) Points

    ERD (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    24/150

    Process

    Table

    Attribute

    10. An entity is instantiated as a ? Mark for Review(1) Points

    Experience

    Instance

    Table (*)

    None of the above

    Section 2

    11. Documenting Business Requirements helps developers control the scope of the systems, so users donot suddenly want the new system to contain twice as much functionality. True or False? Mark forReview(1) Points

    True (*)

    False

    12. When reading a relationship between 2 entities, the relationship is read both from left to right andright to left. True or False? Mark for Review(1) Points

    True (*)

    False

    13. Relationship Names are optional. True or False? Mark for Review(1) Points

    True

    False (*)

    14. Relationships represents something of significance to the business. True or False? Mark for Review(1) Points

    True (*)

    False

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    25/150

    15. All the Attributes in a system are just written on the ERD, and they all go in the Top Left HandCorner of the paper. True or False? Mark for Review(1) Points

    True

    False (*)

    16. A Matrix Diagram should be developed by your users. True or False? Mark for Review

    (1) Points

    True

    False (*)

    17. A Supertype can have only one subtype. True or False? Mark for Review(1) Points

    True

    False (*)

    18. You can only create relationships to a Supertype, not to a Subtype. True or False? Mark for Review(1) Points

    True

    False (*)

    19. When creating entities you must follow these rules: (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    Name them in Plural

    Name them in Singular (*)

    Exclude Attributes

    Include Attributes (*)

    20. Which of the following is true about subtypes? Mark for Review(1) Points

    One instance may belong to two subtypes of the same supertype.

    Subtypes must be mutually exclusive. (*)

    Subtypes must not be mutually exclusive.

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    26/150

    Subtype entities may not have relationships to the other subtype entities, only the supertype itself.

    21. A supertype can only have two subtypes and no more. True or False? Mark for Review

    (1) Points

    True

    False (*)

    22. Business rules are important to data modelers. True or False? Mark for Review(1) Points

    True (*)

    False

    23. Transferable relationships can only be mandatory, not optional. True or False? Mark for Review(1) Points

    True

    False (*)

    24. A relationship from an entity back to itself is called a ___________ relationship. Mark for Review

    (1) Points

    Mandatory

    Recursive (*)

    Many to Many Optional

    Transferrable

    25. Many to many relationships must be left in the Model. It is important to have them documented asM-M. True or False? Mark for Review(1) Points

    True

    False (*)

    26. Relationships can be Redundant. True or False? Mark for Review(1) Points

    True (*)

    False

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    27/150

    27. How do you include a relationship as part of the UID for an entity? Mark for Review(1) Points

    By barring the relationship in question (*)

    By reporting it in an external document

    By including the UID from the parent entity as an attribute in the entity

    You cannot model that.

    28. Intersection Entities often have the relationships participating in the UID, so the relationships areoften barred. True or False? Mark for Review(1) Points

    True (*)

    False

    29. When you resolve a M-M you simply re-draw the relationships between the two original entities,no new entities are created. True or False? Mark for Review(1) Points

    True

    False (*)

    30. What do you call the entity created when you resolve a M:M relationship? Mark for Review(1) Points

    Intersection entity (*)

    Inclusion entity

    Recursive entity

    M:M entity

    31. Normalizing an Entity to 1st Normal Form is done by removing repeated or redundant attributes.True or False? Mark for Review(1) Points

    True (*)

    False

    32. No commercial database systems in the world will accept tables that are not on 3rd Normal Form.True or False? Mark for Review

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    28/150

    (1) Points

    True

    False (*)

    33. Would it be a good idea to model age as an attribute of STUDENT? Mark for Review(1) Points

    Yes

    Maybe it could stop us having to calculate someones age every time we need it

    Sometimes

    No it breaks the Normalization rules (*)

    34. All entities must be given a new artificial UID. True or False? Mark for Review

    (1) Points

    True

    False (*)

    35. There is no limit to how may UIDs an entity can have. True or False? Mark for Review

    (1) Points

    True (*)

    False

    Section 7

    36. A relationship can be both Recursive and Hierachal at the same time. True or False? Mark forReview(1) Points

    True

    False (*)

    37. Modeling historical data can produce a unique identifier that always excludes dates. True or False?Mark for Review(1) Points

    True

    False (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    29/150

    38. Arcs are Mandatory in Data modeling. All ERDs must have at least one Arc. True or False? Markfor Review(1) Points

    True

    False (*)

    39. Primary UIDs are: Mark for Review(1) Points

    Something that each Entity should have, but is not mandatory (*)

    Useful as an alternative means of identifying instances of an entity, independent of their datatype

    Mandatory in data modeling

    Always comprised of numbers

    40. All relationships participating in an arc must be mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    41. Arcs are used to visually represent _________ between two or more relationships in an ERD. Markfor Review(1) Points

    Sameness

    Differences

    Exclusivity (*)

    Inheritance

    42. Which of the following would best be represented by an arc? Mark for Review

    (1) Points

    TEACHER (Female, Bob)

    DELIVERY ADDRESS (Home, Office) (*)

    PARENT (Girl, Bob)

    STUDENT (Grade A student, Average Student)

    43. You are doing a data model for a computer sales company, where the price of postage is dependent

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    30/150

    on what day of the week goods are shipped. So shipping is more expensive if the customer wants adelivery to take place on a Saturday or Sunday. What would be the best way to model this? Mark forReview(1) Points

    Use a Delivery Day entity, which holds prices against week days, and ensure the we also have an

    attribute for the Requested Delivery Day in the Order Entity. (*)

    Email current price to all employees whenever the prices change.

    Update the prices in the system, print out the current prices when they change and pin them on thecompany noticeboard

    Allow them to enter whatever ever delivery charge they want.

    44. All systems must include functionality to provide logging or journaling in conceptual data models.True or False? Mark for Review

    (1) Points

    True

    False (*)

    45. Modeling historical data is Optional. True or False? Mark for Review(1) Points

    True (*)

    False

    46. If a system includes the concept of time and it stores Start Dates, then End Dates becomesMandatory. For each Start Date attribute you create, you MUST create an End Date attribute and itmust be mandatory. True or False? Mark for Review

    (1) Points

    True

    False (*)

    47. There are formal rules for how to draw ERDs, even though they are only guidelines, you shouldalways try to follow them. True or False? Mark for Review

    (1) Points

    True (*)

    False

    48. Which of the following statements are true for ERDs to enhance their readability. (Choose Two)

    Mark for Review(1) Points

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    31/150

    (Choose all correct answers)

    Is is OK to break a big ERD down into subsets of the overall picture. This way you end up with morethan one ERD, that together documents the entire system. (*)

    Try to avoid crossing lines (*)

    The crows feet (many ends) can point whichever way is the easiest to draw

    You must ensure you have all the entities on one single, big diagram, even if you have hundreds

    49. A datamodel containing generic modeling techniques must not be mixed in with non-genericmodels. The generic entities MUST be drawn on a diagram of their own. True or False? Mark forReview(1) Points

    True

    False (*)

    50. All datamodels must be transformed from specific to generic. True or False? Mark for Review(1) Points

    True

    False (*)

    1. The market for IT professionals is still increasing and will continue to do so in the future, as theworld gets ever more dependent on computer systems. True or False? Mark for Review(1) Points

    True (*)

    False

    2. Consider your school library. It will have a database with transaction details of which studentborrows which books. Is a record of one student borrowing one book Data or Information? Mark forReview(1) Points

    Data (*)

    Information

    Both

    Neither

    3. Information which was gained from data is the same as: (Choose Two)

    Mark for Review(1) Points(Choose all correct answers)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    32/150

    Knowledge (*)Raw MaterialsIntelligence (*)There is no difference between data and information.

    4. Databases are used in most countries and by most governments. Life, as we know it, would changedrastically if we no longer had access to databases. True or False? Mark for Review(1) Points

    True (*)

    False

    5. Oracle Database Software provides which of the following functionality? (Choose two) Mark forReview(1) Points

    (Choose all correct answers)

    Graphical User Interface (*)

    Internet Browser

    Server (*)

    Operating Systems

    6. Which of the following are types of databases? Mark for Review

    (1) Points

    (Choose all correct answers)

    Hierarchical (*)

    Relational (*)

    SQL

    Network (*)

    7. In a physical data model, a relationship is represented as a? Mark for Review(1) Points

    Column

    Row

    Instance

    Foreign Key (*)

    8. All of the following are examples of ENTITY: Instance except two. Select the answers that areENTITY: Instance. (Choose Two) Mark for Review

    (1) Points

    (Choose all correct answers)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    33/150

    TRANSPORTATION METHOD: Car (*)

    ANIMAL: Dog (*)

    MEAT PRODUCT: Lettuce

    BODY PART: Larry Ellison

    9. Relationship names are usually verbs. True or False? Mark for Review(1) Points

    True (*)

    False

    10. All of the following would be instances of the entity ANIMAL SPECIES except which? Mark forReview(1) Points

    Dog

    Bird

    Elephant

    Leaf (*)

    11. Primary Unique Identifiers (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    Are Required. The data model is not complete until all entities have a Primary UID. (*)

    Distinguish each instance of an entity from all others (*)

    Are not required

    You may create more than one Primary Unique Identifier for an entity

    12. The entity/relationship model is created before the physical database design model. True or False?Mark for Review(1) Points

    True (*)

    False

    13. An entity can have many Unique Identifiers. True or False? Mark for Review(1) Points

    True (*)

    False

    14. Relationship Names are optional. True or False?Mark for Review(1) Points

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    34/150

    TrueFalse (*)

    15. Which of the following are valid relationship degrees? (Choose two) Mark for Review(1) Points

    (Choose all correct answers)

    1:1 (*)

    1:M (*)

    1:O

    O:O

    16. Entity Boxes are drawn with 90 degree angles, also known as Hard Boxes. True or False? Mark for

    Review(1) Points

    True

    False (*)

    17. To identify an attribute as part of a unique identifier on an ER diagram, the # symbol goes in frontof it. True or False? Mark for Review(1) Points

    True (*)

    False

    18. When reading an ERD including Relationships you are said to be speaking: Mark for Review(1) Points

    Relationship-ish

    Gibberish

    ERDish (*)

    Entity-ish

    19. When creating entities you must follow these rules: (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    Name them in Plural

    Name them in Singular (*)

    Exclude Attributes

    Include Attributes (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    35/150

    20. All instances of a subtypes may be an instance of the supertype but does not have to. True or False?Mark for Review(1) Points

    True

    False (*)

    21. You can only create relationships to a Supertype, not to a Subtype. True or False? Mark for Review(1) Points

    True

    False (*)

    22. The Other subtype is mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    23. Which of the following are suitable Entity names? (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    DOGS

    ANIMAL (*)

    ANIMALS

    DOG (*)

    24. Only teachers may supervise exams is an example of which of the following? Mark for Review

    (1) Points

    A procedural business rule (*)

    An attribute that should be stored on the PERSON entity

    A structural business rule

    An attribute that is not be inherited from the PERSON supertype and is unique to the TEACHER

    subtype

    25. A business rule such as We only ship goods after customers have completely paid any outstandingbalances on their account is best enforced by: Mark for Review(1) Points

    Making the payment attribute null.

    Making the payment attribute optional.

    We need to trust our customers, and we know they will pay some day.

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    36/150

    Hiring a programmer to create additional programming code to verify no goods are shipped until theaccount has been settled in full. (*)

    26. A new system would have a mixture of both Procedural and Structural Business Rules as part of thedocumentation of that new system. True or False? Mark for Review

    (1) Points

    True (*)

    False

    27. Why is it important to identify and document structural rules? Mark for Review(1) Points

    Ensures we know what data to store and how that data works together. (*)

    Ensures nothing. There is no benefits to be gained from documenting your Structural Business Rules.We need to concentrate on the Procedural Business Rules only.

    Ensures we know what Information to store and how that Information works together.

    All of the Above.

    28. A Diamond on a relationship indicates the Relationship as Non-Tranferrable. True or False? Markfor Review(1) Points

    True (*)

    False

    29. How do you include a relationship as part of the UID for an entity? Mark for Review(1) Points

    By barring the relationship in question (*)

    By reporting it in an external document

    By including the UID from the parent entity as an attribute in the entity

    You cannot model that.

    30. Relationships can be Redundant. True or False? Mark for Review(1) Points

    True (*)

    False

    31. Which of the following pairs of entities is most likely to be modeled as a M:M relationship? Markfor Review(1) Points

    CAR and WHEEL

    TREE and BRANCH

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    37/150

    PERSON and FINGERPRINT

    TEACHER and SUBJECT AREA (*)

    32. Many to many relationships must be left in the Model. It is important to have them documented as

    M-M. True or False? Mark for Review(1) Points

    True

    False (*)

    33. All entities must be given a new artificial UID. True or False?Mark for Review(1) PointsTrue

    False (*)

    34. An entity without repeated values is said to be on 1st Normal Form. True or False? Mark for

    Review(1) Points

    True (*)

    False

    35. When is an entity in 2nd Normal Form? Mark for Review

    (1) Points

    When all non-UID attributes are dependent upon the entire UID. (*)

    When no attritibutes are mutually independant and fully independent on the primary key.

    When no attritibutes are mutually independent and all are fully dependent on the primary key.

    None of the Above.

    36. Consider the entity ADDRESS with the attributes:ADDRESS:# House Number* Street

    * Town* City* Year of Buildo City Population

    This entity is NOT in 3rd Normal Form (no non-UID attribute can be dependent on another non-UIDattribute). True or False?Mark for Review(1) Points

    True (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    38/150

    False

    37. An arc can be modelled as Supertype and Subtypes. True or False? Mark for Review(1) Points

    True (*)

    False

    38. No parts of a UID are mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    39. Which of the following is NOT a relationship type? Mark for Review(1) Points

    Some to None (*)

    One to One

    One to Many

    Many to Many

    40. All relationships participating in an arc must be mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    41. Which of the following would be good as a Unique Identifier for its Entity? (Choose Three) Markfor Review(1) Points

    (Choose all correct answers)

    Personal Identification number for Person (*)

    Vehicle Registration Number for Car (*)

    ISBN Number for Book (*)

    Date of birth for Baby

    Section 7 Lesson 3(Answer all questions in this section)

    42. Historical data must never be kept. True or False? Mark for Review(1) Points

    True

    False (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    39/150

    Section 8 Lesson 1(Answer all questions in this section)

    43. Database Design projects must use Consultants or they will fail. True or False? Mark for Review(1) Points

    True

    False (*)

    Section 8 Lesson 2(Answer all questions in this section)

    44. Which of the following are NOT valid techniques for effective public speaking? (Choose Two)Mark for Review(1) Points

    (Choose all correct answers)

    Whispering (*)

    Using specialist language and technical abbreviations when communicating technical information (*)

    Being enthusiastic

    All of the Above

    Section 10 Lesson 1(Answer all questions in this section)

    45. All systems must have an entity called WEEK with a holiday attribute, so you know when to give

    your employees a holiday. True or False? Mark for Review

    (1) Points

    True

    False (*)

    46. Modeling historical data is Optional. True or False? Mark for Review

    (1) Points

    True (*)

    False

    47. If a system includes the concept of time, and it stores Start Dates, then End Dates becomesMandatory. For each Start Date attribute you create, you MUST create an End Date attribute and itmust be mandatory. True or False? Mark for Review

    (1) Points

    True

    False (*)

    48. When you add the concept of time to your data model, your model becomes more complex. True orFalse? Mark for Review(1) Points

    True (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    40/150

    False

    Section 10 Lesson 2(Answer all questions in this section)

    49. Which of the following is a logical constraint, that could result from considering how time impacts

    data storage? Mark for Review(1) Points

    An ASSIGNMENT may only refer to an EMPLOYEE with a valid employee record at the Start Dateof the ASSIGNMENT. (*)

    EMPLOYEE periods can overlap causing the database to crash.

    End Date must be before the Start Date.

    Dates must be stored with Time.

    50. You are doing a data model for a computer sales company, where the price of postage is dependant

    on what day of the week goods are shipped. So shipping is more expensive if the customer wants adelivery to take place on a Saturday or Sunday. What would be the best way to model this? Mark forReview

    (1) Points

    Use a Delivery Day entity, which holds prices against week days, and ensure the we also have anattribute for the Requested Delivery Day in the Order Entity. (*)

    Email current price to all employees whenever the prices change.

    Update the prices in the system, print out the current prices when they change and pin them on thecompany noticeboard

    Allow them to enter whatever delivery charge they want.

    2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222

    Section 1 Lesson 1(Answer all questions in this section)

    1. The main subject areas taught by the Oracle Academy are: Mark for Review(1) Points

    Computer Repairs

    Database performance tuning.

    Data Modeling, SQL and PL/SQL (*)

    Systems programming and computer architecture

    Section 1 Lesson 2(Answer all questions in this section)

    2. Consider your school library. It will have a database with transaction details of which studentborrows which books. Is details of the total number of books out on loan in one given month Data orInformation? Mark for Review

    (1) Points

    Data

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    41/150

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    42/150

    Gender

    Natacha Hansen (*)

    8. All of the following are examples of ENTITY: Instance except two. Select the answers that are

    ENTITY: Instance. (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    TRANSPORTATION METHOD: Car (*)

    ANIMAL: Dog (*)

    MEAT PRODUCT: Lettuce

    BODY PART: Larry Ellison

    9. Primary Unique Identifiers (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    Are Required. The data model is not complete until all entities have a Primary UID. (*)

    Distinguish each instance of an entity from all others (*)

    Are not required

    You may create more than one Primary Unique Identifier for an entity

    10. A/an _________ is a picture of all the information that will form the basis for the finished system.Mark for Review(1) Points

    ERD (*)

    Process

    Table

    Attribute

    Section 2 Lesson 2(Answer all questions in this section)

    11. An entity can have many Unique Identifiers. True or False? Mark for Review

    (1) Points

    True (*)

    False

    12. Volatile entities have special requirements and need special attention when you are doing datamodelling. True or False? Mark for Review(1) Points

    True (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    43/150

    False

    13. Which of the following statements about relationships are true? (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    They become Foreign Keys in the database. (*)

    They Must be Mandatory to be created in the database.

    They can be either mandatory or optional. (*)

    They must exist between two different Entities.

    Section 3 Lesson 1(Answer all questions in this section)

    14. Relationship Names are optional. True or False?

    Mark for Review(1) PointsTrue

    False (*)

    15. In a business that sells pet food choose the best relationship name between FOOD TYPE andANIMAL (e.g. dog, horse or cat). (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    Each FOOD TYPE must be suitable for one or more ANIMALs. (*)

    Each ANIMAL must be the seller of one or more FOOD TYPES.

    Each FOOD TYPE may be made from one or more ANIMALs.

    Each FOOD TYPE may be given to one or more ANIMALs. (*)

    Section 3 Lesson 2

    (Answer all questions in this section)

    16. Entity names are always singular. True or False? Mark for Review(1) Points

    True (*)

    False

    17. All the Attributes in a system are just written on the ERD, and they all go in the Top Left HandCorner of the paper. True or False? Mark for Review(1) Points

    True

    False (*)

    Section 3 Lesson 3

    (Answer all questions in this section)

    18. When reading an ERD including Relationships you are said to be speaking: Mark for Review

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    44/150

    (1) Points

    Relationship-ish

    Gibberish

    ERDish (*)

    Entity-ish

    Section 4 Lesson 1(Answer all questions in this section)

    19. All instances of the supertype must be an instance of one of the subtypes. True or False? Mark forReview(1) Points

    True (*)

    False

    20. When creating entities you must follow these rules: (Choose Two) Mark for Review

    (1) Points

    (Choose all correct answers)

    Name them in Plural

    Name them in Singular (*)

    Exclude Attributes

    Include Attributes (*)

    Section 4 Lesson 1(Answer all questions in this section)

    21. All instances of a subtypes may be an instance of the supertype but does not have to. True or False?Mark for Review

    (1) Points

    True

    False (*)

    22. A supertype can only have two subtypes and no more. True or False? Mark for Review(1) Points

    True

    False (*)

    23. All ER diagrams must have one of each of the following: (Choose two) Mark for Review(1) Points

    (Choose all correct answers)

    One or more Entities (*)

    Relationships between entities (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    45/150

    Arcs

    At least one supertype and subtype

    Section 4 Lesson 2

    (Answer all questions in this section)

    24. Can all constraints be modeled on an ER diagram? Mark for Review(1) Points

    No, in which case you should let the database administrator handle them

    No, but you just explain them to the users so they can enforce them

    Yes, all constraints must be modeled and shown on the ER diagram

    No, so you should list them on a separate document to be handled programmatically (*)

    25. A new system would have a mixture of both Procedural and Structural Business Rules as part of thedocumentation of that new system. True or False? Mark for Review(1) Points

    True (*)

    False

    26. Why is it important to identify and document structural rules? Mark for Review(1) Points

    Ensures we know what data to store and how that data works together. (*)

    Ensures nothing. There is no benefits to be gained from documenting your Structural Business Rules.We need to concentrate on the Procedural Business Rules only.

    Ensures we know what Information to store and how that Information works together.

    All of the Above.

    27. Business rules are important to data modelers. True or False? Mark for Review(1) Points

    True (*)

    False

    Section 5 Lesson 1(Answer all questions in this section)

    28. A Diamond on a relationship indicates the Relationship as Non-Tranferrable. True or False? Markfor Review(1) Points

    True (*)

    False

    Section 5 Lesson 2(Answer all questions in this section)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    46/150

    29. Which of the following pairs of entities is most likely to be modeled as a M:M relationship? Markfor Review(1) Points

    CAR and WHEEL

    TREE and BRANCH

    PERSON and FINGERPRINT

    TEACHER and SUBJECT AREA (*)

    30. Relationships can be Redundant. True or False? Mark for Review

    (1) Points

    True (*)

    False

    Section 5 Lesson 2(Answer all questions in this section)

    31. What uncommon relationship is described by the statements: Each DNA SAMPLE may be takenfrom one and only one PERSON and each PERSON may provide one and only one DNA SAMPLEMark for Review(1) Points

    One to Many Optional

    One to Many Mandatory

    One to One Optional (*)

    Many to Many Mandatory

    32. If two entities have two relationships between them, these relationships can be either __________or __________? Mark for Review(1) Points

    Redundant or Required (*)

    Replicated or Required

    Resourced and Really Good

    Redundant and Replicated

    Section 6 Lesson 1

    (Answer all questions in this section)

    33. All entities must be given a new artificial UID. True or False?Mark for Review(1) PointsTrueFalse (*)

    Section 6 Lesson 2

    (Answer all questions in this section)

    34. When data is stored in one place in a database, the database conforms to the rules of ___________.

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    47/150

    Mark for Review(1) Points

    Normality

    Reduction

    Normalization (*)

    Multiplication

    Section 6 Lesson 3(Answer all questions in this section)

    35. Would it be a good idea to model age as an attribute of STUDENT Mark for Review(1) Points

    Yes

    Maybe it could stop us having to calculate someones age every time we need it

    Sometimes

    No it breaks the Normalization rules (*)

    Section 7 Lesson 1(Answer all questions in this section)

    36. Which of the following is NOT a relationship type? Mark for Review(1) Points

    Some to None (*)

    One to One

    One to Many

    Many to Many

    37. Consider the entity ADDRESS with the attributes:ADDRESS:# House Number* Street* Town* City* Year of Buildo City Population

    This entity is NOT in 3rd Normal Form (no non-UID attribute can be dependent on another non-UIDattribute). True or False?Mark for Review(1) Points

    True (*)

    False

    38. Which of the following would best be represented by an arc? Mark for Review(1) Points

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    48/150

    TEACHER (Female, Bob)

    DELIVERY ADDRESS ( Home, Office) (*)

    PARENT (Girl, Bob)

    STUDENT (Grade A student, Average Student)

    39. Arcs are used to visually represent _________ between two or more relationships in an ERD. Markfor Review(1) Points

    Sameness

    Differencies

    Exclusivity (*)

    An Arc is what Noah sailed on with all the animals.

    40. No parts of a UID are mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    Section 7 Lesson 2(Answer all questions in this section)

    41. A relationship can be both Recursive and Hierarchal at the same time. True or False? Mark for

    Review

    (1) Points

    True

    False (*)

    Section 7 Lesson 3

    (Answer all questions in this section)

    42. If Audit trail attributes are added to an entity they must be in the entities they are auditing. True orFalse? Mark for Review(1) Points

    True (*)

    False

    Section 8 Lesson 1(Answer all questions in this section)

    43. Database Design projects must use Consultants or they will fail. True or False? Mark for Review(1) Points

    True

    False (*)

    Section 8 Lesson 2

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    49/150

    (Answer all questions in this section)

    44. Your apperance at a presentation is important. You need to look smart and presentable. True orFalse? Mark for Review(1) Points

    True (*)

    False

    Section 10 Lesson 1(Answer all questions in this section)

    45. If a system includes the concept of time, and it stores Start Dates, then End Dates becomesMandatory. For each Start Date attribute you create, you MUST create an End Date attribute and itmust be mandatory. True or False? Mark for Review(1) Points

    True

    False (*)

    46. There is only one way to model time in a Data Model. True or False? Mark for Review(1) Points

    True

    False (*)

    47. Modeling historical data is Optional. True or False? Mark for Review(1) Points

    True (*)

    False

    48. Which of the following would be a logical constraint when modeling time for a City entity? Markfor Review(1) Points

    People are born in the city and people die in the city.

    Cites may change their name and/or which country they are placed in, if the borders of a countrychange. (*)

    If you are doing a system for any French City, you would need security clearance

    You need a constant record of cities because they are still cities, even if leadership changes over time,

    e.g. they get a new Mayor

    Section 10 Lesson 2(Answer all questions in this section)

    49. All systems must include functionality to provide logging or journaling in conceptual data models.True or False? Mark for Review(1) Points

    True

    False (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    50/150

    50. Why would you want to model a time component when designing a system that lets people buyshares via the Internet? (Choose Two) Mark for Review(1) Points

    (Choose all correct answers)

    This would only be required in the US to allow the New York Stock Exchange to be notified of thisinformation.

    To allow the sales people to determine when the shared were bought and therefore at what price. (*)

    You would not want to model this, it is not important.

    The price of shares fluctuates and for determining price, you need to know the time of purchase (*)1. Once you have learned how to write programs and build systems, you no longer need any input orinvolvement from any users, as you are perfectly capable of delivering the systems the business needsand wants.- True. All that perfect systems need are correct programs.

    - False. Business requirements can and will change. For instance new legal requirements may arise. (*)- True. All users do is delay systems delivery with their forever changing minds and new requirements.- True. Users never know what they want anyway, so building systems are best left to the professionals.

    2. Information which was gained from data is the same as: (Choose Two)- Knowledge (*)- Raw Materials- Intelligence (*)- There is no difference between data and information3. Consider your school library. It will have a database with transaction details of which studentborrows which books. Is details of the total number of books out on loan in one given month Data orInformation?- Data

    - Information (*)

    - Both- Neither4. The first step in system development is to document the requirements. Why?- Wrong. A blueprint for the database design is not needed. We can just start coding straight away- It clarifies what a business wants to accomplish, and provides measures for deciding if the systemdelivers all that is required. (*)- It allows application development to be conducted without having to consider database design.

    - It keeps businesses honest5. Databases were invented in 1989. True or False?- True- False (*)6. Oracle Database Software do not provide or does not comprise of which functionality?- Graphical User Interface- Internet Browser- Server- Operating System (*)

    7. An entity is instantiated as a ?- experience- instance- table (*)- none of the above8. Relationship names are usually verbs. True or False?- True (*)- False9. The entity/relationship model is created before the physical database design model. True or False?

    - True (*)- False10. All of the following could be attributes of an ENTITY called PERSON except one. Select the

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    51/150

    incorrect one:- Haircolor- Weight- Gender- Natacha Hansen (*)

    11. An entity can have many Unique Identifiers. True or False?

    - True (*)- False12. Volatile entities have special requirements and need special attention when you are doing datamodelling. True or False?- True (*)- False13. Which of the following entities most likely contains valid attributes?

    - Entity: Home. Attributes: Number of Bedrooms, Owner, Address, Date Built (*)- Entity: Pet. Attributes: Name, Birthdate, Owner (*)- Entity: Car. Attributes: Owner Occupation, Owner Salary, Speed- Entity: Mother. Attributes: Name, Birthdate, Occupation, Salary14. Relationship Names are optional. True or False?- True

    - False (*)15. Which of the following are valid relationship degrees- 1:1 (*)

    - 1:M (*)- 1:O- O:O16. Which symbol is used to show that a particular attribute is mandatory?- * (*)- O- #- &17. The many end of a Relationship is called:

    - Gulls Foot

    - Pigs Ear- Crows Ear- Crows Foot (*)18. When reading a relationship between 2 entities, the relationship is read both from left to right andright to left. True or False?- True (*)- False

    19. All ER diagrams must have one of each of the following:- One or more Entities (*)- Relationships between entities (*)- Arcs- At least one supertype and subtype20. Which of the following are suitable Entity names? (Choose Two)- DOGS- ANIMAL (*)- ANIMALS

    - DOG (*)21. Which of the following is true about subtypes?- One instance may belong to two subtypes of the same supertype.- Subtypes must be mutually exclusive. (*)- Subtypes must not be mutually exclusive.- Subtype entities may not have relationships to the other subtype entities, only the supertype itself.22. All instances of the supertype must be an instance of one of the subtypes. True or False?- True (*)- False

    23. All instances of the subtypes can be an instance of the supertype but do not have to. True or False?- True- False (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    52/150

    24. How would you model a business rule that states that girls and boys may not attend classestogether?- Use a supertype- Use two subtypes with relationships from class to student gender (*)- Make the attribute Gender mandatory

    - You cannot model this. You need to document it.

    25. Can all constraints be modeled on an ER diagram?- No, in which case you should let the database administrator handle them- No, but you just explain them to the users so they can enforce them- Yes, all constraints must be modeled and shown on the ER diagram- No, so you should list them on a separate document to be handled programmatically (*)26. Business rules are not important to data modelers. True or False?- True

    - False (*)27. Why is it important to identify and document structural rules?- Ensures we know what data to store and how that data interrelate. (*)- Ensures nothing. There is no benefits to be gained from documenting your Structural Business Rules.We need to concentrate on the Procedural Business Rules only.- Ensures we know what Information to store and how that Information interrelate.

    - All of the Above.28. A non-transferable relationship means the detail cannot be changed to point to a new master. Trueor False?

    - True (*)- False29. If two entities have two relationships between them, these relationships can be either_____________ or _____________ ? (Choose Two)- Redundant or Required (In which case they would depict different relationships) (*)- Replicated or Required (In which case they would depict different relationships)- Resourced and Really Good- Redundant and Replicated30. What uncommon relationship is described by the statements: Each DNA SAMPLE may be taken

    from one and only one PERSON and each PERSON may provide one and only one DNA SAMPLE

    - One to Many Optional- One to Many Mandatory- One to One Optional (*)- Many to Many Mandatory31. How do you include a relationship as part of the UID for an entity?- By barring the relationship in question (*)- By reporting it in an external document

    - By including the UID from the parent entity as an attribute in the entity- You cannot model that.32. Many to many relationships must be left in the Model. It is important to have them documented asM-M. True or False?- True- False (*)33. The first UID for an entity is called the Primary UID, the second is called Secondary UID and soon.- Yes, this is the way UIDs are named. (*)

    - No, it is not possible to have more than one UID for an Entity.- Yes, but then it stops. No entities can have more than two UIDs.- No, each Entity can only have one UID, the secondary one.34. When data is stored in one place in a database, the database conforms to the rules of- Normality- Reduction- Normalization (*)- Multiplication35. When is an entity in 2nd Normal Form?

    - When all non-UID attributes are dependent upon the entire UID. (*)- When no attritibutes are mutually independant and fully independent on the primary key.- When no attritibutes are mutually independent and all are fully dependent on the primary key.

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    53/150

    - None of the Above.36. No parts of a UID are mandatory. True or False?- True- False (*)37. Which of the following is NOT a relationship type?

    - Some to None (*)

    - One to One- One to Many- Many to Many38. All relationships participating in an arc must be mandatory. True or False?- True- False (*)39. Which of the following would best be represented by an arc?

    - STUDENT (Female, Bob)- DELIVERY ADDRESS ( Home, Office) (*)- PARENT (Girl, Bob)- STUDENT (Grade A student, Average Student)40. Arcs are Mandatory in Data modelling. All ERDs must have at least one Arc. True or False?- True

    - False (*)41. Which of the following would be good as a Unique Identifier for its Entity?- Personal Identification number for Person (*)

    - Vehicle Registration Number for Car (*)- ISBN Number for Book (*)- Date of birth for Baby42. Modeling historical data can produce a unique identifier that always excludes dates. True or False?- True- False (*)43. Consultants often use their experience in ensuring projects stay on track and delivers within thetimescales set out for the project. True or False?- True (*)

    - False

    44. Your apperance at a presentation is important. You need to look smart and presentable. True orFalse?- True (*)- False45. Which of the following would be a logical constraint when modeling time for a City entity?- People are born in the city and people die in the city.- Cites may change their name and/or which country they are placed in, if the borders of a country

    change. (*)- If you are doing a system for any French City, you would need security clearance- You need a constant record of cities because they are still cities, even if leadership changes over time,e.g. they get a new Mayor46. If a system includes the concept of time, and it stores Start Dates, then End Dates becomesMandatory. For each Start Date attribute you create, you MUST create an End Date attribute and itmust be mandatory. True or False?- True- False (*)

    47. Modeling historical data is Optional. True or False?- True (*)- False48. What do users of a system without the concept of time loose?- Journalling becomes much easier.- Journalling becomes slightly harder.- The ability to track data over time. (*)- Nothing is lost if a system does not track time.49. Why would you want to model a time component when designing a system that lets people buy

    shares via the Internet?- This would only be required in the US to allow the New York Stock Exchange to be notified of thisinformation.

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    54/150

    - To allow the sales people to determine when the shared were bought and therefore at what price. (*)- You would not want to model this, it is not important.- The price of shares fluctuates and for determining price, you need to know the time of purchase (*)50. You are doing a data model for a computer sales company, where the price of postage is ependanton what day of the week goods are shipped. So shipping is more expensive if the customer wants a

    delivery to take place on a Saturday or Sunday. What would be the best way to model this?

    - Use a Delivery Day entity, which holds prices against week days, and ensure the we also have anattribute for the Requested Delivery Day in the Order Entity. (*)- Email current price to all employees whenever the prices change.- Update the prices in the system, print out the current prices when they change and pin them on thecompany noticeboard- Allow them to enter whatever ever delivery charge they want.

    Section 1 Lesson 1

    (Answer all questions in this section)

    1.You query the database with this SQL statement:

    SELECT CONCAT(last_name, (SUBSTR(LOWER(first_name), 4))) Default PasswordFROM employees;Which function will be evaluated first? Mark for Review

    (1) Points

    CONCAT

    SUBSTR

    LOWER (*)

    All three will be evaluated simultaneously.

    Correct

    2.Evaluate this SELECT statement:SELECT LENGTH(email)FROM employee;What will this SELECT statement display?

    The longest e-mail address in the EMPLOYEE table.

    The email address of each employee in the EMPLOYEE table.

    The number of characters for each value in the EMAIL column in the employees table. (*)

    The maximum number of characters allowed in the EMAIL column.

    Correct

    3.You issue this SQL statement:SELECT INSTR (organizational sales, al)FROM dual;Which value is returned by this command?

    1

    2

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    55/150

    13 (*)

    17

    Correct

    4.You need to display the number of characters in each customers last name. Which function should youuse?

    LENGTH (*)\\

    LPAD

    COUNT

    SUBSTR

    Correct

    5.

    The PRICE table contains this data:PRODUCT_ID MANUFACTURER_ID86950 59604You query the database and return the value 95. Which script did you use? s

    SELECT SUBSTR(product_id, 3, 2)FROM priceWHERE manufacturer_id = 59604; (*)

    SELECT LENGTH(product_id, 3, 2)

    FROM priceWHERE manufacturer_id = 59604;

    SELECT SUBSTR(product_id, -1, 3)FROM priceWHERE manufacturer_id = 59604;

    SELECT TRIM(product_id, -3, 2)FROM priceWHERE manufacturer_id = 59604;

    Correct

    6.Which three statements about functions are true? (Choose three.)

    (Choose all correct answers)

    The SYSDATE function returns the Oracle Server date and time. (*)

    The ROUND number function rounds a value to a specified decimal place or the nearest wholenumber. (*)

    The CONCAT function can only be used on character strings, not on numbers.

    The SUBSTR character function returns a portion of a string beginning at a defined character positionto a specified length. (*)

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    56/150

    Correct

    7.Which SQL function can be used to remove heading or trailing characters (or both) from a characterstring?

    LPAD

    CUT

    NVL2

    TRIM (*)

    Correct

    Section 1 Lesson 2

    (Answer all questions in this section)

    8.Which comparison operator retrieves a list of values?

    IN (*)

    LIKE

    BETWEENIN

    IS NULL

    Correct

    9.You issue this SQL statement:SELECT TRUNC(751.367,-1)FROM dual;Which value does this statement display?

    700

    750 (*)

    751

    751.3

    Correct

    10.You issue this SQL statement:SELECT ROUND (1282.248, -2)FROM dual;What value does this statement produce?

    1200

    1282

    1282.25

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    57/150

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    58/150

    SELECT (30 + hire_date) + 1440/24FROM employees;

    SELECT (SYSDATE hire_date) + 10*8

    FROM employees; (*)

    SELECT SYSDATE TO_DATE(25-JUN-02!) + hire_dateFROM employees;

    SELECT (hire_date SYSDATE) + TO_DATE(25-JUN-02!)

    FROM employees;

    Correct

    15.The EMPLOYEE table contains these columns:LAST_NAME VARCHAR2(20)FIRST_NAME VARCHAR2(20)

    HIRE_DATE DATEEVAL_MONTHS NUMBER(3)Evaluate this SELECT statement:SELECT hire_date + eval_monthsFROM employee;The values returned by this SELECT statement will be of which data type?

    DATE (*)

    NUMBER

    DATETIME

    INTEGER

    Incorrect. Refer to Section 1

    Section 2 Lesson 1

    (Answer all questions in this section)

    16.The EMPLOYEES table contains these columns:EMPLOYEE_ID NUMBER(9)LAST_NAME VARCHAR2 (25)FIRST_NAME VARCHAR2 (25)

    HIRE_DATE DATEYou need to display HIRE_DATE values in this format:January 28, 2000Which SELECT statement could you use? Mark for Review(1) Points

    SELECT TO_CHAR(hire_date, Month DD, YYYY)FROM employees;

    SELECT TO_CHAR(hire_date, Month DD, YYYY)FROM employees;(*)

    SELECT hire_date(TO_CHAR Month DD, YYYY)FROM employees;

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    59/150

    SELECT TO_CHAR(hire_date, Month DD, YYYY)FROM employees;

    Correct

    17.Which statement concerning single row functions is true?

    Single row functions can accept only one argument, but can return multiple values.

    Single row functions cannot modify a data type.

    Single row functions can be nested. (*)

    Single row functions return one or more results per row.

    Incorrect. Refer to Section 2

    18.You have been asked to create a report that lists all customers who have placed orders of at least$2,500. The reports date should be displayed in the Day, Date Month, Year format (For example,

    Tuesday, 13 April, 2004 ). Which statement should you issue?

    SELECT companyname, TO_CHAR (sysdate, fmdd, dy month, yyyy), totalFROM customers NATURAL JOIN ordersWHERE total >= 2500;

    SELECT companyname, TO_DATE (date, day, dd month, yyyy), totalFROM customers NATURAL JOIN ordersWHERE total >= 2500;

    SELECT companyname, TO_DATE (sysdate, dd, dy month, yyyy), totalFROM customers NATURAL JOIN ordersWHERE total >= 2500;

    SELECT companyname, TO_CHAR (sysdate, fmDay, dd Month, yyyy), totalFROM customers NATURAL JOIN ordersWHERE total >= 2500; (*)

    Correct

    19.Which two statements concerning SQL functions are true? (Choose two.)

    (Choose all correct answers)

    Character functions can accept numeric input.

    Not all date functions return date values. (*)

    Number functions can return number or character values.

    Conversion functions convert a value from one data type to another data type. (*)

    Single-row functions manipulate groups of rows to return one result per group of rows.

    Incorrect. Refer to Section 2

    20.

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    60/150

    All Human Resources data is stored in a table named EMPLOYEES. You have been asked to create areport that displays each employees name and salary. Each employees salary must be displayed in thefollowing format: $000,000.00. Which function should you include in a SELECT statement to achievethe desired result?

    TO_CHAR (*)

    TO_DATE

    TO_NUMBER

    CHARTOROWID

    Correct

    Section 2 Lesson 2

    (Answer all questions in this section)

    22.The STYLES table contains this data:STYLE_ID STYLE_NAME CATEGORY COST

    895840 SANDAL 85940 12.00968950 SANDAL 85909 10.00869506 SANDAL 89690 15.00809090 LOAFER 89098 10.00890890 LOAFER 89789 14.00857689 HEEL 85940 11.00758960 SANDAL 86979Evaluate this SELECT statement:SELECT style_id, style_name, category, cost

    FROM styles

    WHERE style_name LIKE SANDAL AND NVL(cost, 0) < 15.00ORDER BY category, cost;Which result will the query provide?

    STYLE_ID STYLE_NAME CATEGORY COST895840 SANDAL 85940 12.00968950 SANDAL 85909 10.00

    758960 SANDAL 86979

    STYLE_ID STYLE_NAME CATEGORY COST895840 SANDAL 85909 12.00968950 SANDAL 85909 10.00869506 SANDAL 89690 15.00758960 SANDAL 86979

    STYLE_ID STYLE_NAME CATEGORY COST

    895840 SANDAL 85909 12.00968950 SANDAL 85909 10.00758960 SANDAL 86979869506 SANDAL 89690 15.00

    STYLE_ID STYLE_NAME CATEGORY COST968950 SANDAL 85909 10.00895840 SANDAL 85940 12.00758960 SANDAL 86979

    Correct23.

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    61/150

    When executed, which statement displays a zero if the TUITION_BALANCE value is zero and theHOUSING_BALANCE value is null?

    SELECT NVL (tuition_balance + housing_balance, 0) Balance DueFROM student_accounts; (*)

    SELECT NVL(tuition_balance, 0), NVL (housing_balance), tuition_balance + housing_balanceBalance DueFROM student_accounts;

    SELECT tuition_balance + housing_balanceFROM student_accounts;

    SELECT TO_NUMBER(tuition_balance, 0), TO_NUMBER (housing_balance, 0), tutition_balance +housing_balance Balance DueFROM student_accounts;

    Correct

    24.You need to replace null values in the DEPT_ID column with the text N/A. Which functions shouldyou use?

    TO_CHAR and NVL (*)

    TO_CHAR and NULL

    TO_CHAR and NULLIF

    TO_NUMBER and NULLIF

    Correct

    Section 3 Lesson 2

    (Answer all questions in this section)

    25.You have been asked to create a report that lists all corporate customers and all orders that they have

    placed. The customers should be listed alphabetically beginning with the letter A, and theircorresponding order totals should be sorted from the highest amount to the lowest amount.Which of the following statements should you issue? Mark for Review(1) Points

    SELECT c.custid, c.companyname, o.orderdate, o. custid, o.amountFROM customers c, orders oWHERE c.custid = o.custidORDER BY amount DESC, companyname;

    SELECT c.custid, c.companyname, o.orderdate, o. custid, o.amountFROM customers c, orders oWHERE c.custid = o.custidORDER BY companyname, amount DESC;(*)

    SELECT c.custid, c.companyname, o.orderdate, o. custid, o.amountFROM customers c, orders o

    WHERE c.custid = o.custidORDER BY companyname, amount;

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    62/150

    SELECT c.custid, c.companyname, o.orderdate, o. custid, o.amountQ FROM customers c, orders oWHERE c.custid = o.custidORDER BY companyname ASC, amount ASC;

    Correct

    26.Your company stores its business information in an Oracle9i database. The EMPLOYEES tableincludes the following columns:EMP_ID NUMBER(5) NOT NULL PRIMARY KEYFNAME VARCHAR2(25)LNAME VARCHAR2(25)

    ADDRESS VARCHAR2(35)CITY VARCHAR2(25)STATE VARCHAR2(2)ZIP NUMBER(9)TELEPHONE NUMBER(10)DEPT_ID NUMBER(5) NOT NULL FOREIGN KEY

    The BONUS table includes the following columns:BONUS_ID NUMBER(5) NOT NULL PRIMARY KEYANNUAL_SALARY NUMBER(10)

    BONUS_PCT NUMBER(3, 2)EMP_ID VARCHAR2(5) NOT NULL FOREIGN KEYYou want to determine the amount of each employees bonus. Which of the following queries shouldyou issue?

    SELECT e.fname, e.lname, b.annual_salary * b. bonus_pctFROM employees e, bonus bWHERE e.emp_id = b.emp_id; (*)

    SELECT e.fname, e.lname, b.annual_salary, b. bonus_pct

    FROM employees e, bonus bWHERE e.emp_id = b.emp_id;

    SELECT e.fname, e.lname, b.annual_salary, b. bonus_pctFROM employees, bonusWHERE e.emp_id = b.emp_id;

    SELECT fname, lname, annual_salary * bonus_pctFROM employees, bonus NATURAL JOIN;

    Incorrect. Refer to Section 3

    27.What is produced when a join condition is not specified in a multiple-table query?

    a self-join

    an outer join

    an equijoin

    a Cartesian product (*)

    Correct

    28.The CUSTOMERS and SALES tables contain these columns:CUSTOMERS

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    63/150

    CUST_ID NUMBER(10) PRIMARY KEYCOMPANY VARCHAR2(30)LOCATION VARCHAR2(20)SALESSALES_ID NUMBER(5) PRIMARY KEY

    CUST_ID NUMBER(10) FOREIGN KEY

    TOTAL_SALES NUMBER(30)Which SELECT statement will return the customer ID, the company and the total sales?

    SELECT c.cust_id, c.company, s.total_salesFROM customers c, sales sWHERE c.cust_id = s.cust_id (+);

    SELECT cust_id, company, total_salesFROM customers, salesWHERE cust_id = cust_id;

    SELECT c.cust_id, c.company, s.total_salesFROM customers c, sales s

    WHERE c.cust_id = s.cust_id; (*)

    SELECT cust_id, company, total_sales

    FROM customers c, sales sWHERE c.cust_id = s.cust_id;

    Correct

    29.Which statement about the join syntax of a SELECT statement is true?

    The ON keyword must be included.

    The JOIN keyword must be included.

    The FROM clause represents the join criteria.

    The WHERE clause represents the join criteria. (*)

    Correct

    30.When joining 3 tables in a SELECT statement, how many join conditions are needed in the WHEREclause? Mark for Review(1) Points

    0

    1

    2 (*)

    3

    Correct

    Section 3 Lesson 4

    (Answer all questions in this section)

    31.

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    64/150

    Which statement about outer joins is true? Mark for Review(1) Points

    The tables must be aliased.

    The FULL, RIGHT, or LEFT keyword must be included.

    The OR operator cannot be used to link outer join conditions. (*)

    Outer joins are always evaluated before other types of joins in the query.

    Correct

    32.Which two operators can be used in an outer join condition using the outer join operator (+)? Mark forReview(1) Points

    AND and = (*)

    OR and =

    BETWEENAND and IN

    IN and =

    Incorrect. Refer to Section 3

    33.Which operator would you use after one of the column names in the WHERE clause when creating anouter join? Mark for Review

    (1) Points

    (+) (*)

    *

    +

    =

    Correct

    Section 4 Lesson 2

    (Answer all questions in this section)

    34.

    Which of the following best describes a natural join? Mark for Review(1) Points

    A join between two tables that includes columns that share the same name, datatypes and lengths (*)

    A join that produces a Cartesian product

    A join between tables where matching fields do not exist

    A join that uses only one table

    Correct

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    65/150

    35.You need to join two tables that have two columns with the same name and compatible data types.Which type of join would you create to join the tables on both of the columns? Mark for Review(1) Points

    Natural join (*)

    Cross join

    Outer join

    Self-join

    Correct

    36.Which of the following conditions will cause an error on a NATURAL JOIN? Mark for Review(1) Points

    When you attempt to write it as an equijoin.

    When the NATURAL JOIN clause is based on all columns in the two tables that have the same name.

    If it selects rows from the two tables that have equal values in all matched columns.

    If the columns having the same names have different data types, then an error is returned. (*)

    Correct

    Section 4 Lesson 3

    (Answer all questions in this section)

    37.Which SELECT clause creates an equijoin by specifying a column name common to both tables? Markfor Review(1) Points

    A HAVING clause

    The FROM clause

    The SELECT clause

    A USING clause (*)

    Incorrect. Refer to Section 4

    38.The primary advantage of using JOIN ON is: Mark for Review(1) Points

    The join happens automatically based on matching column names and data types

    It will display rows that do not meet the join condition

    It permits columns with different names to be joined (*)

    It permits columns that dont have matching data types to be joined

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    66/150

    Correct

    39.Evaluate this SELECT statement:

    SELECT a.lname || , || a.fname as Patient, b.lname || , || b.fname as Physician, c.admission

    FROM patient aJOIN physician bON (b.physician_id = c.physician_id);JOIN admission cON (a.patient_id = c.patient_id);Which clause generates an error? Mark for Review(1) Points

    JOIN physician b

    ON (b.physician_id = c.physician_id); (*)

    JOIN admission c

    ON (a.patient_id = c.patient_id)

    Incorrect. Refer to Section 4

    40.Below find the structure of the CUSTOMERS and SALES_ORDER tables:CUSTOMERSCUSTOMER_ID NUMBER NOT NULL, Primary KeyCUSTOMER_NAME VARCHAR2 (30)CONTACT_NAME VARCHAR2 (30)CONTACT_TITLE VARCHAR2 (20)

    ADDRESS VARCHAR2 (30)

    CITY VARCHAR2 (25)REGION VARCHAR2 (10)POSTAL_CODE VARCHAR2 (20)COUNTRY_ID NUMBER Foreign key to COUNTRY_ID column of the COUNTRY tablePHONE VARCHAR2 (20)FAX VARCHAR2 (20)CREDIT_LIMIT NUMBER(7,2)

    SALES_ORDERORDER_ID NUMBER NOT NULL, Primary KeyCUSTOMER_ID NUMBER Foreign key to CUSTOMER_ID column of the CUSTOMER tableORDER_DT DATEORDER_AMT NUMBER (7,2)SHIP_METHOD VARCHAR2 (5)You need to create a report that displays customers without a sales order. Which statement could youuse? Mark for Review(1) Points

    SELECT c.customer_nameFROM customers cWHERE c.customer_id not in (SELECT s.customer_id FROM sales_order s);(*)

    SELECT c.customer_nameFROM customers c, sales_order sWHERE c.customer_id = s.customer_id(+);

    SELECT c.customer_nameFROM customers c, sales_order s

  • 8/14/2019 Mid Term Exam Semester 1.pdf

    67/150

    WHERE c.customer_id (+) = s.customer_id;

    SELECT c.customer_nameFROM customers cRIGHT OUTER JOIN sales_order s ON (c.customer_id = s.customer_id);

    Incorrect. Refer to Section 4

    Section 4 Lesson 4

    (Answer all questions in this section)

    41.

    You need to join the EMPLOYEE_HIST and EMPLOYEE tables. The EMPLOYEE_HIST table wi