Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
User Feedback Collection Database
📖 Scenario: You are building a simple database to collect user feedback for a website. This database will store user names, their email addresses, and their feedback messages.
🎯 Goal: Create a database table to store user feedback with fields for user name, email, and feedback message. Then, configure a status field to track if feedback is reviewed. Finally, write a query to select all unreviewed feedback and mark them as reviewed.
📋 What You'll Learn
Create a table called feedback with columns username (text), email (text), and message (text).
Add a column status (text) to track if feedback is 'new' or 'reviewed'.
Write a query to select all feedback where status is 'new'.
Write a query to update the status of selected feedback to 'reviewed'.
💡 Why This Matters
🌍 Real World
Collecting and managing user feedback is essential for improving websites and services. This project simulates a simple feedback database.
💼 Career
Database skills like creating tables and writing queries are fundamental for roles in data management, customer support systems, and web development.
Progress0 / 4 steps
1
Create the feedback table
Create a table called feedback with columns username as text, email as text, and message as text.
No-Code
Hint
Use CREATE TABLE statement with the exact column names and types.
2
Add a status column
Add a column called status of type text to the feedback table to track if feedback is 'new' or 'reviewed'.
No-Code
Hint
Add the status column inside the CREATE TABLE statement.
3
Select unreviewed feedback
Write a SQL query to select all columns from the feedback table where the status is 'new'.
No-Code
Hint
Use SELECT * FROM feedback WHERE status = 'new' to get unreviewed feedback.
4
Mark feedback as reviewed
Write a SQL query to update the status to 'reviewed' for all feedback entries where the status is currently 'new'.
No-Code
Hint
Use UPDATE feedback SET status = 'reviewed' WHERE status = 'new' to mark feedback as reviewed.
Practice
(1/5)
1. What is the main purpose of collecting user feedback in a database?
easy
A. To delete old user data automatically
B. To store opinions that help improve products
C. To increase the size of the database
D. To prevent users from accessing the system
Solution
Step 1: Understand the role of user feedback
User feedback is collected to learn what users think about a product or service.
Step 2: Connect feedback to product improvement
Storing opinions helps teams improve features and fix problems.
Final Answer:
To store opinions that help improve products -> Option B
Quick Check:
User feedback = product improvement [OK]
Hint: Feedback stores opinions to improve products [OK]
Common Mistakes:
Thinking feedback deletes data
Confusing feedback with database size
Assuming feedback blocks user access
2. Which of the following is the correct way to define a feedback table with fields for user name, rating, comment, and date?
easy
A. MAKE TABLE feedback (user_name CHAR, rate FLOAT, comment VARCHAR, date_time DATETIME);
B. CREATE feedback TABLE (user TEXT, stars TEXT, note TEXT, time TEXT);
C. TABLE feedback CREATE (name STRING, score NUMBER, feedback STRING, day DATE);
D. CREATE TABLE feedback (username TEXT, rating INTEGER, comment TEXT, date DATE);
Solution
Step 1: Identify correct SQL syntax for table creation
The correct syntax starts with CREATE TABLE, followed by table name and fields with types.
Step 2: Match field names and types to feedback data
username as TEXT, rating as INTEGER, comment as TEXT, and date as DATE are appropriate.
Final Answer:
CREATE TABLE feedback (username TEXT, rating INTEGER, comment TEXT, date DATE); -> Option D