Databases

Cards (22)

  • What is a relational database?
    Data is held in more than one table
  • What does an entity represent in a database?
    An object in the real world
  • What is an attribute in the context of a database?
    A characteristic that describes an entity
  • What are instances in a database?
    A set of values corresponding to an entity
  • What is a primary key?
    An attribute that uniquely identifies each instance
  • What is a composite primary key?
    A combination of primary keys used together
  • What is a foreign key?
    A set of attributes referring to another table's primary key
  • What is the standard notation for defining an entity in a database?
    • Entity_Name (Entity_Identifier, attribute_1, attribute_2, ...)
    • Names should be singular (e.g., student)
  • What are the types of relationships shown in entity relationship diagrams?
    • One-to-one
    • One-to-Many
    • Many-to-Many
  • How would you represent a student entity with attributes in standard notation?
    Student (Student_ID, Name, Age)
  • How do entity relationship diagrams help in database design?
    They show the relationship between attributes
  • What is the purpose of producing entity relationship diagrams?
    To represent a data model and entity descriptions
  • What is the first step in producing a data model from given data requirements?
    Identify multiple entities in the scenario
  • What is the goal of normalisation in databases?
    To reduce data duplication
  • Why are databases normalised?
    To improve data integrity
  • What are the key features of 1st Normal Form?
    • Each record has a primary key
    • Data is atomic (cannot be split)
    • No repeating groups of attributes
  • What defines 2nd Normal Form in database design?
    • No partial dependencies
    • Applies when a composite key is used
  • What is the requirement for 3rd Normal Form?
    • No non-key dependencies
    • All attributes depend only on the primary key
  • What does the term 'dependency' mean in database design?
    An element relies on another for functionality
  • What does 'atomic' mean in the context of database attributes?
    An attribute can't be sensibly divided
  • If a name attribute is split into first and last names, what does this violate?
    1st Normal Form
  • How does 3rd Normal Form differ from 2nd Normal Form?
    3rd Normal Form eliminates non-key dependencies