Week 6 Flashcards

1
Q

What is the UNIQUE Constraint in MySQL?

A

Ensures values in a column or group of columns are different

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the CHECK Constraint in MySQL?

A

Ensures that values stored in a column or group of columns satisfy a Boolean expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the NOT NULL Constraint in MySQL?

A

Ensures values in a column or a group of columns are different

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a Foreign Key (Constraint)?

A

Refers to Primary Key in another table

Is a column or set of columns used to establish a link between the data in two tables. These columns must match the columns in the referenced table (the parent table) and must have the same data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are Constraints in MySQL?

A

SQL Constraints are rules applied to columns in a table to ensure data integrity and consistency

They help to define the type of data that can be inserted into a table and prevent invalid data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Primary Key (Constraint)?

A

Implicitly means NOT NULL + UNIQUE

A table can have one and only one primary key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly