relational databases and SQL Flashcards

1
Q

define a database

A

a collection of data organised in a way for computer programs to easily search and store data

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

define a relational database

A

multiple tables linked together

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

what is a primary key?

A

a unique identifier for a record

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

what is a foreign key?

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

what does relational databases do?

A
  • reduce data inconsistency
  • reduce data redundancy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what statements are needed to retrieve data from a relational database?

A

SELECT
FROM
WHERE
ORDER BY .. ASC / DESC

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

what statements are needed to insert data into a relational database?

A

INSERT INTO tablename
VALUES

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

what statements are needed to edit data into a relational database?

A

UPDATE tablename
SET
WHERE condition

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

what statements are needed to delete data from a relational database?

A

DELETE FROM tablename
WHERE condition

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