1. Home
  2. Explore
  3. Computer Science
  4. Foreign Keys and Referential Integrity

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Foreign Keys and Referential Integrity

  • 89Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Integrity and Schema
A group of attributes in one relation used to refer to tuples in another relation is called a
.

89 questions

  1. 1
    A group of attributes in one relation used to refer to tuples in another relation is called a
    _____
    .
    Hint

    It establishes a reference between relations.

    Answer

    foreign key

  2. 2
    The constraint requiring foreign-key references to identify existing tuples rather than nonexistent ones is called the
    _____
    constraint.
    Hint

    It prevents references from pointing to missing records.

    Answer

    referential integrity

  3. 3
    A foreign-key reference that does not correspond to an existing tuple is called a
    _____
    reference.
    Hint

    The reference points to something that is not present.

    Answer

    dangling

  4. 4
    In a relational scheme, an underlined attribute or group of attributes indicates a
    _____
    .
    Hint

    The notation identifies attributes that uniquely identify tuples.

    Answer

    key

  5. 5
    If a relational scheme has multiple keys, each key is represented by a separate underlined
    _____
    of attributes.
    Hint

    A key may consist of more than one attribute.

    Answer

    group

  6. 6
    The relational database example is designed to capture academic details about an institute containing departments, students, and various
    _____
    .
    Hint

    Students study in different academic programs.

    Answer

    degrees

  7. 7
    A relational schema diagram displays relation names, attribute names, underlined keys, and arrows showing
    _____
    keys and their referenced relations.
    Hint

    The arrows show references between relations.

    Answer

    foreign

  8. 8
    The attribute used to identify a particular student's academic advisor is the student's
    _____
    attribute.
    Hint

    It stores the identifier of the faculty member who advises the student.

    Answer

    advisor

  9. 9
    The value stored in a student's advisor attribute comes from the
    _____
    ID domain of a faculty member.
    Hint

    Faculty members are institute employees.

    Answer

    employee

  10. 10
    All students in the example database are required to have an
    _____
    .
    Hint

    The student relation includes this required faculty relationship.

    Answer

    advisor

  11. 11
    To find more information about a student's advisor, one must look up the appropriate
    _____
    relation.
    Hint

    The student's tuple stores an identifier, not all advisor details.

    Answer

    other

  12. 12
    The database schema is reused throughout the relational algebra and later
    _____
    modules.
    Hint

    This language is used for database queries.

    Answer

    SQL

  13. 13
    The student relation contains roll number, name, degree, years, sex, department number, and
    _____
    .
    Hint

    This attribute identifies the student's faculty advisor.

    Answer

    advisor

  14. 14
    The key of the student relation is the student's
    _____
    .
    Hint

    It uniquely identifies each student tuple.

    Answer

    roll number

  15. 15
    The student relation's degree attribute records the program in which the student is
    _____
    .
    Hint

    It identifies the academic program the student joined.

    Answer

    enrolled

  16. 16
    In the student relation, the years attribute records the student's year of
    _____
    .
    Hint

    It records when the student entered the institute.

    Answer

    admission

  17. 17
    The department relation contains department ID, name, HOD, and
    _____
    .
    Hint

    This attribute stores the department office contact number.

    Answer

    phone

  18. 18
    The HOD attribute identifies the faculty member who is academically responsible for running a
    _____
    .
    Hint

    HOD stands for head of department.

    Answer

    department

  19. 19
    The department ID is chosen as a numeric
    _____
    for the department relation.
    Hint

    It makes departments easily identifiable.

    Answer

    key

  20. 20
    The professor relation uses employee ID because professors are all
    _____
    of the institute.
    Hint

    The identifier is an employee identifier.

    Answer

    employees

  21. 21
    The professor relation contains employee ID, name, sex, start year, department number, and
    _____
    number.
    Hint

    This is the professor's contact attribute.

    Answer

    phone

  22. 22
    The start year in the professor relation records the year a faculty member joined the particular
    _____
    .
    Hint

    Faculty members work in departments.

    Answer

    department

  23. 23
    A course is described as a
    _____
    of study.
    Hint

    It is an academic area students can take.

    Answer

    subject

  24. 24
    The number of credits earned upon completing a course is stored in the course relation's
    _____
    attribute.
    Hint

    It measures the academic value of the course.

    Answer

    credits

  25. 25
    The attribute that identifies the department offering a course is the course relation's
    _____
    number.
    Hint

    It links the course to its offering department.

    Answer

    department

  26. 26
    The course relation uses course ID as its
    _____
    .
    Hint

    It identifies individual courses.

    Answer

    key

  27. 27
    The relation that records students enrolling in courses and receiving grades is the
    _____
    relation.
    Hint

    It captures the student-course registration relationship.

    Answer

    enrollment

  28. 28
    The enrollment relation has a composite key containing roll number, course ID, semester, and
    _____
    .
    Hint

    A course offering is distinguished by its academic year.

    Answer

    year

  29. 29
    Course ID alone cannot identify an enrollment because a student can take several courses in a particular
    _____
    .
    Hint

    Students usually enroll in multiple subjects during one academic period.

    Answer

    semester

  30. 30
    The same course can be offered repeatedly across different
    _____
    .
    Hint

    The offering in one calendar period must be distinguished from later offerings.

    Answer

    years

  31. 31
    In the example, the semester attribute has the value odd or even, representing the August semester and the
    _____
    semester, respectively.
    Hint

    It is the semester named after the beginning month of the year.

    Answer

    January

  32. 32
    The grade for a student's current semester is assumed to be
    _____
    until the semester ends.
    Hint

    The result has not yet been assigned.

    Answer

    null

  33. 33
    The relation that records which professor teaches which course in a particular semester and year is the
    _____
    relation.
    Hint

    It captures the faculty side of course offerings.

    Answer

    teaching

  34. 34
    All attributes in the teaching relation are needed in its key because no
    _____
    of those attributes uniquely identifies a row.
    Hint

    A smaller group of the attributes would not be sufficient.

    Answer

    subset

  35. 35
    The prerequisite relation contains the two attributes preReqCourse and
    _____
    .
    Hint

    The second attribute identifies the course requiring the prerequisite.

    Answer

    course ID

  36. 36
    If a prerequisite tuple contains courses C1 and C2, it means C1 must be successfully completed before enrolling in
    _____
    .
    Hint

    The second course is the one that has the prerequisite.

    Answer

    C2

  37. 37
    In the example, data structures is a prerequisite for
    _____
    systems.
    Hint

    It is the course concerned with organizing and querying relational data.

    Answer

    database

  38. 38
    The department number in the student relation is a foreign key referring to the department relation's department
    _____
    .
    Hint

    It references the department's identifying attribute.

    Answer

    ID

  39. 39
    The HOD in the department relation is a foreign key referring to the professor relation's
    _____
    ID.
    Hint

    The HOD is identified as a faculty employee.

    Answer

    employee

  40. 40
    Both preReqCourse and course ID in the prerequisite relation are foreign keys referring to the course relation's
    _____
    ID.
    Hint

    Both attributes identify courses.

    Answer

    course

  41. 41
    The employee ID in the teaching relation is a foreign key referring to the
    _____
    relation.
    Hint

    The referenced tuples describe faculty members.

    Answer

    professor

  42. 42
    The roll number in the enrollment relation is a foreign key referring to the
    _____
    relation.
    Hint

    It identifies the student taking the course.

    Answer

    student

  43. 43
    The department number in the professor relation is a foreign key referring to the
    _____
    relation.
    Hint

    It identifies where the professor works.

    Answer

    department

  44. 44
    The course ID in the enrollment relation is a foreign key referring to the
    _____
    relation.
    Hint

    It identifies the course in which the student is enrolled.

    Answer

    course

  45. 45
    The course ID in the teaching relation is a foreign key referring to the
    _____
    relation.
    Hint

    It identifies the course being taught.

    Answer

    course

  46. 46
    The advisor in the student relation is a foreign key referring to the professor relation's
    _____
    ID.
    Hint

    The advisor is a faculty member identified through an employee identifier.

    Answer

    employee

  47. 47
    The department number in the course relation is a foreign key referring to the department relation's department
    _____
    .
    Hint

    It identifies the department offering the course.

    Answer

    ID

  48. 48
    A foreign-key value may be either null or a value that already exists in the referenced relation's relevant
    _____
    .
    Hint

    The value must match an existing value in the referenced attribute.

    Answer

    column

  49. 49
    The attribute names department number and department ID may differ even though they represent the same kind of
    _____
    .
    Hint

    A foreign key and the key it references do not need identical names.

    Answer

    thing

  50. 50
    When the same attribute name appears in multiple relations, conventional
    _____
    notation identifies which relation's attribute is meant.
    Hint

    The relation name is written before a punctuation mark and the attribute name.

    Answer

    dot

  51. 51
    Relational algebra is a set of operators that take relation instances as arguments and return new
    _____
    instances.
    Hint

    The operators work on relations and produce relations.

    Answer

    relation

  52. 52
    The operators of relational algebra may be either unary or
    _____
    .
    Hint

    Unary operators use one relation, while the other type uses two.

    Answer

    binary

  53. 53
    A database query is basically a data
    _____
    request.
    Hint

    It asks the database to return desired information.

    Answer

    retrieval

  54. 54
    Relational algebra is a
    _____
    way of expressing what operations should be performed to obtain a result.
    Hint

    It describes a sequence of operations rather than only the desired result.

    Answer

    procedural

  55. 55
    An algebraic expression can be viewed as a tree in which information flows upward and the output appears at the
    _____
    .
    Hint

    It is the top node of a tree representation.

    Answer

    root

  56. 56
    Relational algebra forms the core component of the relational query
    _____
    .
    Hint

    This is the part of a database system that processes queries.

    Answer

    engine

  57. 57
    In the conceptual treatment, relational algebra operators are considered logical or mathematical operators rather than implementation
    _____
    .
    Hint

    The lesson postpones how programs realize the operators.

    Answer

    details

  58. 58
    SQL is described as a largely
    _____
    way of specifying queries.
    Hint

    It states what data is wanted rather than prescribing every operation.

    Answer

    declarative

  59. 59
    SQL queries are internally translated into
    _____
    algebraic expressions.
    Hint

    The expressions use operators that work on relations.

    Answer

    relational

  60. 60
    Translating SQL into relational algebra provides an opportunity to optimize how the query is actually
    _____
    .
    Hint

    Optimization improves the way the database carries out the request.

    Answer

    executed

  61. 61
    The two unary relational algebra operators introduced are select and
    _____
    .
    Hint

    One filters tuples and the other removes unwanted attributes.

    Answer

    project

  62. 62
    The relational algebra operators listed include cross product, union, intersection, difference, and
    _____
    .
    Hint

    This operation combines related tuples from relations.

    Answer

    join

  63. 63
    The relational algebra select operator chooses tuples that satisfy a specified
    _____
    .
    Hint

    It filters rows according to a Boolean requirement.

    Answer

    condition

  64. 64
    The select operator is a
    _____
    operator because it takes one relation as input.
    Hint

    The prefix means one.

    Answer

    unary

  65. 65
    The selection condition in relational algebra is commonly represented by the Greek letter
    _____
    .
    Hint

    It is the parameter that specifies which tuples qualify.

    Answer

    theta

  66. 66
    Selecting tuples does not change the input relation's scheme; the result has the same set, sequence, and order of
    _____
    .
    Hint

    Selection filters rows rather than columns.

    Answer

    attributes

  67. 67
    The selection operation is
    _____
    because applying condition C1 and then C2 gives the same tuples as applying C2 and then C1.
    Hint

    The order of the two selections does not matter.

    Answer

    commutative

  68. 68
    A basic selection condition can compare one attribute with another attribute or compare an attribute with a
    _____
    .
    Hint

    The second comparison value is not another attribute.

    Answer

    constant

  69. 69
    Attributes used in a selection condition must come from the
    _____
    on which the operator is applied.
    Hint

    The condition refers to attributes available in the input schema.

    Answer

    relation

  70. 70
    A constant compared with an attribute in a selection condition must have an appropriate
    _____
    .
    Hint

    Strings should be compared with strings, and integers with integers.

    Answer

    type

  71. 71
    Basic conditions can be combined with the logical operators and, or, and
    _____
    .
    Hint

    This operator reverses a Boolean condition.

    Answer

    not

  72. 72
    A condition formed by combining basic conditions with logical operators is called a
    _____
    condition.
    Hint

    It is more complex than an atomic condition.

    Answer

    composite

  73. 73
    The six comparison operators listed for selection are less than, less than or equal to, greater than, greater than or equal to, equal to, and
    _____
    equal.
    Hint

    This operator expresses inequality.

    Answer

    not

  74. 74
    Comparison operators are meaningful when the corresponding attribute domains are
    _____
    ordered sets.
    Hint

    The values must have an order relation.

    Answer

    linearly

  75. 75
    To obtain professors named Giridhar, the selection condition compares the professor relation's name attribute with the string
    _____
    .
    Hint

    The requested professor name is given directly in the query.

    Answer

    Giridhar

  76. 76
    If several professors are named Giridhar, the name-based selection returns
    _____
    matching tuples.
    Hint

    Selection does not assume that the name is unique.

    Answer

    all

  77. 77
    To find professors who joined between 1980 and 1985 inclusively, the selection condition constrains the start year to that
    _____
    .
    Hint

    Both endpoints are included.

    Answer

    range

  78. 78
    The relational algebra project operator is used to remove unwanted
    _____
    from a relation.
    Hint

    It focuses on selected attributes rather than selected tuples.

    Answer

    columns

  79. 79
    Unlike select, project chooses a subset of
    _____
    rather than a subset of tuples.
    Hint

    It determines which fields appear in the result.

    Answer

    attributes

  80. 80
    The symbol used for the project operator is the Greek letter
    _____
    .
    Hint

    It is commonly used before a list of desired attributes.

    Answer

    pi

  81. 81
    Every attribute in a projection list must be part of the input relation's
    _____
    .
    Hint

    The input must contain each requested attribute.

    Answer

    scheme

  82. 82
    The attributes in a projection list need not be
    _____
    in the original relation.
    Hint

    Projection can select attributes from different positions.

    Answer

    consecutive

  83. 83
    The scheme of a projection result is exactly the projection
    _____
    .
    Hint

    It contains the attributes selected by the operator.

    Answer

    list

  84. 84
    Because a relation is a set of tuples, a projection result contains no
    _____
    .
    Hint

    Repeated projected values collapse into one tuple.

    Answer

    duplicates

  85. 85
    If several input tuples have the same values for all projected attributes, projection keeps only
    _____
    resulting tuple.
    Hint

    Set semantics do not preserve repeated identical tuples.

    Answer

    one

  86. 86
    Projecting only the name attribute after selecting students whose degree is M.S. can merge two students named
    _____
    .
    Hint

    The example contains students with this same name in different departments.

    Answer

    Mahesh

  87. 87
    Projecting roll number and name from the student relation preserves one tuple per student because roll number is a
    _____
    .
    Hint

    A key uniquely identifies tuples.

    Answer

    key

  88. 88
    If the projection list contains the input relation's key, the number of tuples in the result is exactly the same as in the
    _____
    relation.
    Hint

    Including a key prevents duplicate projected tuples.

    Answer

    input

  89. 89
    If the projection list does not contain the input relation's key, the result may contain
    _____
    tuples than the input.
    Hint

    Different input tuples can collapse into identical projected tuples.

    Answer

    fewer

1 of 89
Question 1 of 89

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent