1. Home
  2. Explore
  3. Computer Science
  4. Database Design Fundamentals

Study methods

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

Database Design Fundamentals

  • 112Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Database Foundations
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is a database?

Tap to flipClick to flipspace

A database is a system that stores data.

Or swipe the card

112 cards

  1. What is a database?

    A database is a system that stores data.

  2. What is data in the context of databases?

    Data is anything that can be stored and has a value.

  3. Why are database concepts important in modern applications?

    Most platforms, programs, and applications rely on back-end databases to store and manage information.

  4. What is the front end of an application?

    The front end is the part of an application that the user sees and interacts with.

  5. What is the back end of an application?

    The back end is the hidden server-side logic and data storage that supports the front end.

  6. How does a website use a database during login?

    Registration data is stored in the database, and later login values are checked against that stored data.

  7. How does a database differ from a spreadsheet?

    A database supports queries, selective data access, complex relationships, and more detailed security than a basic spreadsheet.

  8. Why are databases more efficient than spreadsheets for complex selections?

    Databases can run queries that automatically find records matching several conditions.

  9. What is a major security advantage of databases over spreadsheets?

    Different users can be granted access to different data.

  10. What is a relational database?

    A relational database stores data in related tables.

  11. What is an entity?

    An entity is anything about which data is stored.

  12. What is an attribute?

    An attribute is a characteristic or piece of information stored about an entity.

  13. What is an entity type?

    An entity type is the category of entities stored in a table.

  14. What is an attribute type?

    An attribute type is a category of attribute, such as username, name, or password.

  15. What is a table?

    A table is the physical representation of a relation used to organize database data.

  16. What is a row?

    A row contains all attribute values for one specific entity.

  17. What is another mathematical term for a row?

    A row is also called a tuple.

  18. What is a column?

    A column contains values for one specific attribute type across multiple entities.

  19. What are the alternative terms file, record, and field?

    File means table, record means row, and field means column.

  20. What is a value in a database?

    A value is the specific information stored in a column for a particular row.

  21. What is an entry?

    An entry is another term for a row or a set of data entered into a table.

  22. What is a database management system (DBMS)?

    A DBMS is software that manages database data and lets users view, query, modify, and organize it.

  23. What is a relational database management system (RDBMS)?

    An RDBMS is a DBMS designed to work with relational databases and their related tables.

  24. What is a query?

    A query is a request that searches, retrieves, changes, or otherwise operates on database data.

  25. What is a view mechanism?

    A view mechanism presents selected database data in a particular way without changing the underlying storage structure.

  26. How can database views improve security?

    Views can limit users to only the columns and rows they are authorized to access.

  27. What is a transaction?

    A transaction is a group of database operations that either completes entirely or is canceled entirely.

  28. What is SQL?

    SQL is a language used to communicate with and manipulate relational databases.

  29. Is SQL tied to one specific relational database management system?

    No. SQL is a general language used across relational database systems, although syntax may vary between vendors.

  30. What is Data Definition Language (DDL)?

    DDL defines the structure of a database, including tables, columns, and relationships.

  31. What is Data Manipulation Language (DML)?

    DML operates on the data stored within an existing database structure.

  32. What is a SQL keyword?

    A SQL keyword is a reserved word with a predefined meaning in SQL.

  33. What is data integrity?

    Data integrity means that database data is accurate, consistent, current, and properly connected.

  34. Why is database design important?

    Good database design prevents data integrity problems, update anomalies, unnecessary repetition, and inefficient storage.

  35. What is an update anomaly?

    An update anomaly occurs when duplicated data is updated inconsistently.

  36. What is an anomaly?

    An anomaly is an unexpected error or inconsistency in database data or operations.

  37. What is the conceptual schema?

    The conceptual schema describes entities and how they are related at a general, implementation-independent level.

  38. What is the logical schema?

    The logical schema specifies tables, columns, data types, and relationships in greater detail.

  39. What is the physical schema?

    The physical schema describes how the database will be implemented using specific servers, DBMS features, access methods, and security settings.

  40. How do the conceptual, logical, and physical schemas relate?

    They form a continuum from general ideas to specific implementation details.

  41. What is entity integrity?

    Entity integrity ensures that each entity is uniquely identifiable.

  42. What is referential integrity?

    Referential integrity ensures that references between related tables remain valid.

  43. What is domain integrity?

    Domain integrity ensures that column values come from an acceptable set or range.

  44. What is a domain?

    A domain is the set or range of values that are acceptable for a column.

  45. What is a null value?

    A null value indicates that no value has been provided for a particular field.

  46. What does the NOT NULL constraint do?

    It requires every row to contain a value in the specified column.

  47. What is a one-to-one relationship?

    A one-to-one relationship means one entity can be associated with only one entity on the other side, and vice versa.

  48. How is a one-to-one relationship usually stored?

    It is usually stored as an attribute or column in the same table.

  49. When might a one-to-one relationship use separate tables?

    Separate tables may be used when the related entity has many additional attributes of its own.

  50. What is a one-to-many relationship?

    A one-to-many relationship means one entity can be associated with many other entities, while each entity on the many side is associated with one entity on the one side.

  51. How is a one-to-many relationship stored?

    The foreign key is placed in the table on the many side and references the primary key on the one side.

  52. What is a many-to-many relationship?

    A many-to-many relationship means many entities on each side can be associated with many entities on the other side.

  53. Why cannot a many-to-many relationship be stored directly in a relational table?

    Direct storage would require repeating groups, variable numbers of columns, null values, or multiple values in one column.

  54. How is a many-to-many relationship implemented?

    It is split into two one-to-many relationships using an intermediary or junction table.

  55. What is an intermediary table?

    An intermediary table is a table that connects two entities in a many-to-many relationship.

  56. What is a parent-child relationship in database design?

    The parent is the referenced table, and the child is the table containing the foreign key that points to the parent.

  57. Where are primary keys and foreign keys placed in a parent-child relationship?

    The primary key is in the parent table, and the foreign key is in the child table.

  58. What is a key in a database?

    A key is one or more columns used to identify records or connect related tables.

  59. What is a super key?

    A super key is any set of columns that guarantees every row in a table is unique.

  60. What is a candidate key?

    A candidate key is the smallest set of columns that guarantees row uniqueness.

  61. What is a primary key?

    A primary key is the candidate key selected as the main unique identifier for a table.

  62. What are the main requirements for a primary key?

    A primary key should be unique, non-null, and stable rather than frequently changing.

  63. What is an alternate key?

    An alternate key is a candidate key that was not selected as the primary key.

  64. What is a foreign key?

    A foreign key is a column that references a primary key, usually in another table.

  65. What is a natural key?

    A natural key is a key based on data that already has real-world meaning in the table.

  66. What is a surrogate key?

    A surrogate key is an artificially created identifier, often an auto-incrementing number with no real-world meaning.

  67. What is the difference between a simple key and a composite key?

    A simple key uses one column; a composite key uses two or more columns together.

  68. What is a compound key?

    A compound key is a key made from multiple columns that are themselves keys, commonly used in junction tables.

  69. What is the difference between primary and foreign keys?

    A primary key uniquely identifies a row in its own table, while a foreign key references a key in another table.

  70. What do foreign key constraints protect?

    Foreign key constraints protect referential integrity by preventing invalid references and controlling updates or deletions.

  71. What does ON DELETE RESTRICT do?

    It prevents deletion of a parent row when related child rows exist.

  72. What does ON DELETE CASCADE do?

    It automatically deletes related child rows when the parent row is deleted.

  73. What does ON DELETE SET NULL do?

    It keeps the child row but changes its foreign key value to null when the parent is deleted.

  74. What is normalization?

    Normalization is the process of organizing database tables to reduce repetition and prevent integrity problems.

  75. What is an atomic value?

    An atomic value contains one indivisible logical item appropriate to the column.

  76. Why should columns contain atomic values?

    Atomic values make data easier to search, update, and query without storing multiple items in one field.

  77. What is the first normal form (1NF)?

    First normal form requires atomic values and prohibits repeating groups or multiple values in one field.

  78. How can multiple emails be modeled in first normal form?

    Store emails in a separate email table with an email ID and a foreign key referencing the user.

  79. What is a functional dependency?

    A functional dependency occurs when one value determines another value.

  80. What is a partial dependency?

    A partial dependency occurs when a non-key column depends on only part of a composite primary key.

  81. What is the second normal form (2NF)?

    Second normal form requires first normal form and removes partial dependencies.

  82. What is a transitive dependency?

    A transitive dependency occurs when a column depends on another non-key column that depends on the primary key.

  83. What is the third normal form (3NF)?

    Third normal form requires second normal form and removes transitive dependencies.

  84. Why must normal forms be applied in order?

    Each normal form builds on the previous one.

  85. What is an index?

    An index is a data structure that helps a database locate rows more efficiently.

  86. What is a table scan?

    A table scan checks rows sequentially throughout a table to find matching data.

  87. What is an index seek?

    An index seek uses an index to go directly to the relevant portion of a table.

  88. What is a clustered index?

    A clustered index organizes the actual table data according to the indexed order.

  89. What is a nonclustered index?

    A nonclustered index is a separate structure containing references to data locations.

  90. How many clustered and nonclustered indexes can a table have?

    A table can generally have one clustered index but multiple nonclustered indexes.

  91. What is a composite index?

    A composite index is an index built from two or more columns.

  92. What is a trade-off of indexes?

    Indexes speed up searches and joins but require extra storage and maintenance when data changes.

  93. What are the three broad categories of database data types?

    String, numeric, and date/time.

  94. What is a string data type?

    A string stores characters or text.

  95. What is the difference between CHAR and VARCHAR?

    CHAR stores a fixed-length character value, while VARCHAR stores a variable-length character value.

  96. What is a numeric data type?

    A numeric data type stores numbers for numerical operations.

  97. What is the difference between signed and unsigned numeric values?

    Signed values can be positive or negative; unsigned values cannot be negative.

  98. What is a date/time data type?

    A date/time type stores dates, times, or combinations of dates and times.

  99. What is a join?

    A join combines related data from multiple tables into a generated result set or view.

  100. Do joins change the underlying database structure?

    No. Joins change how existing data is presented, not how it is stored.

  101. How do joins use primary and foreign keys?

    Joins commonly match foreign-key values with corresponding primary-key values.

  102. What does an inner join return?

    An inner join returns only rows with matching related values in both tables.

  103. What does a left outer join return?

    A left outer join returns every row from the left table and matching rows from the right table.

  104. What does a right outer join return?

    A right outer join returns every row from the right table and matching rows from the left table.

  105. What does a full outer join return?

    A full outer join returns rows from both tables, matching them where possible.

  106. How are joins across three or more tables performed?

    Tables are joined sequentially using a join condition for each additional table.

  107. What is an alias in SQL?

    An alias is a temporary alternative name for a table or column.

  108. Why are aliases required for self-joins?

    Aliases distinguish multiple references to the same table.

  109. What is a self-join?

    A self-join joins a table to itself using separate aliases.

  110. What is a lookup table?

    A lookup table stores a defined set of possible options and is referenced by other tables.

  111. What are the benefits of a lookup table?

    Lookup tables reduce repeated data, protect domain integrity, simplify updates, and allow additional information about each option.

  112. Why are front-end applications commonly used to access databases?

    They provide controlled, user-friendly access without exposing the database server or allowing users to enter arbitrary SQL.

Card 1 of 112
Card 1 of 112

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent