Database Integration u0026 CRUD Operations Quiz Quiz

  1. Basic CRUD Definition

    What does the acronym CRUD stand for in database operations?

    1. Create, Read, Update, Delete
    2. Create, Run, Undo, Drop
    3. Check, Remove, Upload, Download
    4. Copy, Restore, Update, Delete
    5. Create, Remove, Upload, Download
  2. SQL Insert Syntax

    Which SQL statement correctly inserts a new user with name 'Alice' into the table users?

    1. INSERT INTO users (name) VALUES ('Alice');
    2. INSERT users (name) VALUE ('Alice');
    3. NEW users SET name = 'Alice';
    4. ADD TO users SET name = 'Alice';
    5. SAVE INTO users (name) 'Alice';
  3. Reading Data

    You want to retrieve all records from the 'products' table. Which SQL command should you use?

    1. SELECT * FROM products;
    2. GET ALL FROM products;
    3. RETRIEVE FROM products ALL;
    4. SELECT ALL IN products;
    5. FIND * IN products;
  4. Update Operation Example

    To change the email of user with id = 3 to 'new@mail.com' in a 'users' table, which SQL statement is correct?

    1. UPDATE users SET email = 'new@mail.com' WHERE id = 3;
    2. MODIFY users email TO 'new@mail.com' WHERE id = 3;
    3. SET users.email = 'new@mail.com' FOR id = 3;
    4. CHANGE users SET email TO 'new@mail.com' WHEN id = 3;
    5. ALTER users SET email='new@mail.com' WHERE user_id = 3;
  5. Deleting a Record

    Which SQL statement deletes a single record from the 'orders' table where the order_id is 101?

    1. DELETE FROM orders WHERE order_id = 101;
    2. REMOVE FROM orders WHERE order_id = 101;
    3. DEL orders WHERE order_id = 101;
    4. DESTROY orders WHERE order_id equals 101;
    5. ERASE FROM orders ORDER_ID = 101;
  6. Foreign Key Integration

    Why are foreign keys important in integrating multiple database tables?

    1. They enforce referential integrity between related tables.
    2. They speed up data insertion for large tables.
    3. They encrypt sensitive column values.
    4. They automatically generate primary keys.
    5. They duplicate data for backup purposes.
  7. API Integration Scenario

    A web application fetches product data from a PostgreSQL database and displays it in real time. Which CRUD operation is primarily being utilized?

    1. Read
    2. Create
    3. Update
    4. Delete
    5. Restore
  8. Handling Duplicate Entries

    Which SQL keyword prevents the insertion of duplicate values in a column?

    1. UNIQUE
    2. PRIMARY
    3. INDEX
    4. FIRST
    5. DISTINCT
  9. Practical CRUD in Code

    Consider the following Python code using SQLAlchemy:nnsession.query(User).filter_by(id=5).delete()nnWhich CRUD operation does this line perform?

    1. Delete
    2. Create
    3. Read
    4. Update
    5. Drop
  10. Common Mistake in CRUD APIs

    In RESTful API design, which HTTP method should be used to update a resource fully?

    1. PUT
    2. GET
    3. POST
    4. DELETE
    5. FETCH