Database Management Systems Quiz
70 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What does DBMS stand for?

Database Management System

What is the definition of data integrity?

Data integrity refers to the consistency of data in a database, ensuring adherence to defined rules to maintain accuracy and reliability.

Which of the following is NOT a potential advantage of using a database?

  • Lower Cost (correct)
  • Improved Data Consistency
  • Enhanced Data Accessibility
  • Increased Data Security
  • What is a backup in the context of databases?

    <p>A backup is a copy of the database created to recover data in case of failures, such as hardware malfunctions or human errors.</p> Signup and view all the answers

    What does the term "concurrent" refer to in database management?

    <p>Concurrent database access means that multiple users can access and manipulate the database simultaneously without interfering with each other's operations.</p> Signup and view all the answers

    What is meant by "data security" in database management?

    <p>Data security involves protecting the database from unauthorized access, modification, or deletion, ensuring the confidentiality, integrity, and availability of the data.</p> Signup and view all the answers

    In a database system, what is a query?

    <p>A query is a request for specific information from a database, often expressed in a structured language like SQL.</p> Signup and view all the answers

    Who are naive users in the context of database management?

    <p>Naive users are those who access data in a database only through application programs, without directly interacting with the database itself.</p> Signup and view all the answers

    It is typically the responsibility of the database administrator to write commands for creating a database structure.

    <p>True</p> Signup and view all the answers

    What is data consistency?

    <p>Data consistency means that all occurrences of the same data item in a database must agree, ensuring that the data is accurate and reliable.</p> Signup and view all the answers

    Which level of the three-level database architecture contains user views?

    <p>External</p> Signup and view all the answers

    What is Data Manipulation Language (DML)?

    <p>DML is a part of a data sublanguage used for retrieving, inserting, updating, and deleting data in a database.</p> Signup and view all the answers

    What are the two essential parts of a data sublanguage?

    <p>Data Definition Language (DDL) and Data Manipulation Language (DML)</p> Signup and view all the answers

    Give an example of data rather than information.

    <p>An unordered list of grades on a test</p> Signup and view all the answers

    On the logical level of the database, what is metadata?

    <p>Metadata is data about the data, providing descriptions and characteristics of the data within the database.</p> Signup and view all the answers

    Which of the following can be an entity?

    <p>All of the above</p> Signup and view all the answers

    Which of the following can be an attribute?

    <p>All of the above</p> Signup and view all the answers

    In an ER diagram, what participation constraint is indicated by a single line between an entity set rectangle and a relationship diamond?

    <p>Partial Participation</p> Signup and view all the answers

    No two attributes in a relationship can share a domain.

    <p>False</p> Signup and view all the answers

    In the ER model, what symbol is used to represent an attribute that can have multiple values for an entity instance?

    <p>Double Oval</p> Signup and view all the answers

    A primary key can consist of more than one attribute.

    <p>True</p> Signup and view all the answers

    The basic objects in the ER model include all of the following EXCEPT:

    <p>Classes</p> Signup and view all the answers

    In the ER model, a dashed oval is used to indicate which kind of attribute?

    <p>Derived</p> Signup and view all the answers

    A relationship set cannot have attributes of its own.

    <p>False</p> Signup and view all the answers

    Which data model level does an ER diagram best describe?

    <p>Conceptual</p> Signup and view all the answers

    On an ER diagram, how is the primary key of an entity indicated?

    <p>Underlining the attribute name in an ER diagram indicates that it is the primary key for the entity.</p> Signup and view all the answers

    In the ER model, what is a composite attribute?

    <p>An attribute that can be broken down into smaller elements, such as an address attribute that can be divided into street, city, state, and zip code.</p> Signup and view all the answers

    What is a superkey in the context of the ER model?

    <p>Any attribute or set of attributes that uniquely identifies an entity instance within the entity set.</p> Signup and view all the answers

    In the ER model, what is a binary relationship?

    <p>A relationship that links two entity sets.</p> Signup and view all the answers

    What type of model is the ER model classified as?

    <p>Semantic</p> Signup and view all the answers

    In the ER model, what is the set of values permitted for an attribute called?

    <p>Domain</p> Signup and view all the answers

    In a bank, if savings accounts can be jointly owned by multiple customers, and customers can have multiple savings accounts, what type of relationship exists between the SavingsAccounts entity set and the Customer entity set?

    <p>Many-to-Many</p> Signup and view all the answers

    In a university, students can get at most one parking permit for one car. Not all students have cars, and no car is allowed on campus without a permit. What is the participation constraint for the "Car" entity in the relationship to the "Student" entity?

    <p>Total</p> Signup and view all the answers

    In a business, if a department can have many workers, but each worker belongs to only one department, what is the cardinality of the department-to-worker relationship?

    <p>One-to-Many</p> Signup and view all the answers

    In the ER model, what does cardinality refer to?

    <p>The number of entities that can map to one another under a relationship.</p> Signup and view all the answers

    A relationship in an ER diagram always connects two entity sets.

    <p>False</p> Signup and view all the answers

    In the relational model, the number of columns in a table corresponds to which property of a relation?

    <p>Degree</p> Signup and view all the answers

    What is referential integrity in the relational model?

    <p>Referential integrity ensures that foreign keys in a table correctly reference primary keys in the referenced table, maintaining data consistency and preventing data errors.</p> Signup and view all the answers

    If A and B are entity sets with a one-to-one relationship, which of the following is NOT true of the relational model representation?

    <p>There is a separate table for the relationship.</p> Signup and view all the answers

    In mapping a relationship to a relational schema, which of the following always requires a separate table?

    <p>Many-to-Many Relationship</p> Signup and view all the answers

    Which of the following types of attributes can be directly represented as a column in a relational model?

    <p>Single-Valued, Non-Composite</p> Signup and view all the answers

    What is a foreign key in the relational model?

    <p>A foreign key is an attribute in a relation that references the primary key of another relation, indicating the relationship between the two tables.</p> Signup and view all the answers

    In converting from an ER diagram to a relational model, what do tables represent?

    <p>Both entities and relationships</p> Signup and view all the answers

    What property must a superkey have to be a candidate key?

    <p>It has no proper subset that is also a superkey.</p> Signup and view all the answers

    If S = {a,b} and T = {1,2,3}, then how many ordered pairs are in the Cartesian product S × T?

    <p>6</p> Signup and view all the answers

    The attributes of a relation are represented in a table by what?

    <p>Columns</p> Signup and view all the answers

    In the relational model, what does referential integrity place restrictions on?

    <p>Foreign Keys</p> Signup and view all the answers

    What is the customary way to indicate a primary key in a relation schema?

    <p>Underline it</p> Signup and view all the answers

    What is the entity integrity constraint in the relational model?

    <p>Entity integrity ensures that no attribute of a primary key can have a null value, guaranteeing the uniqueness of each entity instance.</p> Signup and view all the answers

    In the relational model, what is the relation schema?

    <p>The structure of a relation, including attribute names, domains, constants, and other relevant information.</p> Signup and view all the answers

    The degree of a relation is a characteristic of the intention of the relation.

    <p>True</p> Signup and view all the answers

    Every relation in a relational database schema must have a foreign key.

    <p>False</p> Signup and view all the answers

    If S = {a,b} and T = {1,2,3}, which of the following can be a relation for S × T?

    <p>{(a,1), (b,2)}</p> Signup and view all the answers

    All of the following are characteristics of relations in the relational model EXCEPT:

    <p>Each column has the same data-type.</p> Signup and view all the answers

    All of the following are examples of constraints on relations in the relational model EXCEPT:

    <p>Boundary Constraints</p> Signup and view all the answers

    What is the best method for representing a weak entity in a relational schema?

    <p>Create a table for the strong entity and one for the weak entity, but include the primary key of the owner in the weak entity table.</p> Signup and view all the answers

    The SQL option HAVING can only be used with which other option?

    <p>GROUP BY</p> Signup and view all the answers

    To eliminate duplicates in the results of an SQL query, use which option?

    <p>DISTINCT</p> Signup and view all the answers

    What is the proper way to create an alias, E, for relational table EMPLOYEE and retrieve all employee data?

    <p>SELECT * FROM EMPLOYEE E;</p> Signup and view all the answers

    Which SQL function returns the number of values in a column?

    <p>COUNT</p> Signup and view all the answers

    If NAME contains character string data, what SQL SELECT specification should be used with WHERE NAME LIKE ___________ to retrieve only records where NAME begins with M and ends with 'ton'?

    <p>'M%ton'</p> Signup and view all the answers

    To display data retrieved using an SQL SELECT in ascending order, use which option?

    <p>ORDER BY</p> Signup and view all the answers

    All of the following are SQL DDL commands EXCEPT:

    <p>ADD TABLE</p> Signup and view all the answers

    Which SQL predicate is used to find rows in the Employee table that have no value for rating?

    <p>WHERE RATING IS NULL</p> Signup and view all the answers

    What specification in the SQL CREATE TABLE command enforces referential integrity?

    <p>FOREIGN KEY</p> Signup and view all the answers

    To retrieve all columns from table A in a SQL SELECT operation, what should the SELECT read?

    <p>SELECT * FROM A...</p> Signup and view all the answers

    To delete all records from a table EMPLOYEE and destroy its structure, which command should be used?

    <p>DROP EMPLOYEE;</p> Signup and view all the answers

    To insert a record into a table with an always IDENTITY column, should the column be included in the set of values for attributes?

    <p>do not include the column in the set of values for attributes</p> Signup and view all the answers

    Given an Employee table with columns for salary and dept, how would you raise the salaries of all employees in the sales department by 10%?

    <p>UPDATE Employee SET salary = salary*1.10 WHERE dept='sales';</p> Signup and view all the answers

    All relational database management systems support all features of the SQL standard.

    <p>False</p> Signup and view all the answers

    Study Notes

    Database Management Systems (DBMS)

    • DBMS is the software that manages a database.
    • Data Integrity is the consistency rules a database must follow.
    • A Backup is a copy of the database for disaster recovery.
    • Concurrent access means multiple users can access the database simultaneously.
    • Data Security protects the database from unauthorized access.
    • A Query is a question posed to the database (e.g., "Find students in ENG210").
    • Naive Users interact with the database through application programs.
    • The Database Administrator (DBA) writes commands to create database structure.
    • Data Consistency means all copies of the same data item agree.
    • The External level in the database architecture contains user views.
    • Data Manipulation Language (DML) retrieves data from a database.
    • Data Definition Language (DDL) and Data Manipulation Language (DML) are the core parts of a data sublanguage.
    • An unordered list of grades is data, not information.
    • Metadata is data about data (at the logical level).
    • An entity can be a vendor.
    • StudentID can be an attribute.
    • Partial participation in an ER diagram is indicated by a single line between entities and relationship.
    • Two attributes in a relationship cannot share the same domain.
    • A double oval in an ER model represents an attribute with multiple values for an entity.
    • A primary key can have multiple attributes.
    • Classes are not basic objects in the ER Model.
    • A dashed oval in the ER model shows a derived attribute.
    • A relationship can have its own attributes.
    • The ER diagram describes the conceptual data model.
    • A primary key in an ER diagram is underlined.
    • A composite attribute is an attribute divided into smaller parts (e.g., address).
    • A superkey uniquely identifies an entity instance.
    • A binary relationship links two entity sets.
    • The ER model is a semantic model.
    • The domain is the set of valid values for an attribute.
    • The relationship between Savings Accounts and Customers is many-to-many.

    Relational Databases

    • Entity Integrity: A primary key cannot contain null values.
    • Referential Integrity: A foreign key must match a primary key or be null.
    • A many-to-many relationship requires a separate table when mapping to relations (SQL).
    • A single-valued, non-composite attribute maps directly to a relation column.
    • A foreign key references a primary key in another table.
    • Tables represent both entities and relationships when converting from ER diagrams.
    • A candidate key is a superkey with no proper subset that is also a superkey.
    • Cartesian product size calculation (example given using S={a, b} and T={1, 2, 3}).
    • A relation's attributes are represented as columns in a table.
    • Foreign keys are constrained by referential integrity.
    • An SQL primary key is indicated by underlining.
    • The schema is the structure of a relation, including attributes and domain information.
    • Relation degree is the number of columns in a table, not a characteristic of the relation's intent.
    • Relations do not always have foreign keys.
    • A relation for a Cartesian product example is given (S×T).
    • A relation's cells contain only one value.
    • Boundary constraints are not constraints on relations.
    • Represent a weak entity by creating tables for both the strong and weak entities, including the strong entity's primary key in the weak entity's table.
    • HAVING can only be used with GROUP BY.
    • DISTINCT removes duplicates in SQL queries.
    • SELECT * FROM EMPLOYEE E; aliases EMPLOYEE as E and retrieves all its data.
    • COUNT returns the number of values in a column in SQL.
    • 'M%ton' retrieves names beginning with M and ending with 'ton' in SQL.
    • ORDER BY sorts data in SQL.

    SQL Commands

    • SQL DDL commands are not ADD TABLE.
    • WHERE RATING IS NULL retrieves rows with null ratings.
    • The FOREIGN KEY clause enforces referential integrity.
    • SELECT * FROM A... retrieves all columns from table A.
    • DROP EMPLOYEE; deletes a table (and all its data).
    • WHERE RATING IS NULL finds rows with null 'rating' values.
    • Always IDENTITY columns in SQL should not include columns in the set of values.
    • The SQL command UPDATE Employee SET salary = salary*1.10 WHERE dept='sales'; raises sales department salaries by 10%.
    • Not all relational database systems support all SQL standard features.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    Test your knowledge on Database Management Systems (DBMS) with this quiz. Explore concepts such as data integrity, security, and the roles of database administrators. Perfect for anyone looking to solidify their understanding of database fundamentals.

    More Like This

    DBMS Quiz
    3 questions

    DBMS Quiz

    TopIndicolite avatar
    TopIndicolite
    Distributed Databases
    5 questions
    Database Management Systems Overview
    40 questions
    Database Concepts: Security and Integrity
    9 questions
    Use Quizgecko on...
    Browser
    Browser