0
0
No-Codeknowledge~10 mins

Data types and database setup in No-Code - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a text data type in a database.

No-Code
CREATE TABLE users (name [1](50));
Drag options to blanks, or click blank then click option'
ADATE
BNUMBER
CVARCHAR
DBOOLEAN
Attempts:
3 left
💡 Hint
Common Mistakes
Using NUMBER instead of VARCHAR for text fields.
Using DATE for storing names.
2fill in blank
medium

Complete the code to set up a primary key in a database table.

No-Code
CREATE TABLE products (id [1] PRIMARY KEY, name VARCHAR(100));
Drag options to blanks, or click blank then click option'
ATEXT
BINT
CFLOAT
DBOOLEAN
Attempts:
3 left
💡 Hint
Common Mistakes
Using TEXT for primary keys which should be numeric.
Using BOOLEAN which only stores true or false.
3fill in blank
hard

Fix the error in the data type declaration for a date field.

No-Code
CREATE TABLE events (event_date [1]);
Drag options to blanks, or click blank then click option'
ADATETIME
BVARCHAR
CNUMBER
DDATE
Attempts:
3 left
💡 Hint
Common Mistakes
Using VARCHAR to store dates as text.
Using NUMBER which is for numeric values.
4fill in blank
hard

Fill both blanks to create a table with an auto-incrementing integer ID and a boolean active status.

No-Code
CREATE TABLE accounts (id [1] PRIMARY KEY [2], active BOOLEAN);
Drag options to blanks, or click blank then click option'
AINT
BAUTO_INCREMENT
CNOT NULL
DDEFAULT TRUE
Attempts:
3 left
💡 Hint
Common Mistakes
Using BOOLEAN for the ID field.
Forgetting to set the ID as auto-incrementing.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps uppercase keys to values greater than zero.

No-Code
result = [1]: [2] for k, v in data.items() if v [3] 0}
Drag options to blanks, or click blank then click option'
Ak.upper()
Bv
C>
Dk.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using k.lower() instead of k.upper().
Using < instead of > in the condition.