Databases Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

what is a relational database

A

A database that organizes data into tables, where rows represent records and columns represent attributes, with relationships established between tables

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

What is an attribute in a database?

A

a column in a table that represents a specific characteristic of the data.

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

Define a primary key.

A

a unique identifier for each row in a table, ensuring that no two rows have the same key.

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

What is a composite primary key?

A

A primary key that consists of two or more attributes combined to uniquely identify each row

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

What is a foreign key?

A

an attribute that links two tables by referencing the primary key of another table.

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

What is database normalization?

A

The process of organizing data in a database to reduce redundancy and improve integrity by splitting larger tables into smaller, related ones.

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

Why normalize a database?

A

To eliminate redundancy, maintain data integrity, and improve query performance.

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

what is first normal form

A
  • Ensures each column contains atomic (indivisible) values.
  • Eliminates repeating groups of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

second normal form

A
  • Meets all requirements of 1NF.
  • Ensures that all non-key attributes are fully dependent on the primary key.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

third normal form

A
  • Meets all requirements of 2NF.
  • Ensures that no non-key attribute depends on another non-key attribute (i.e., no transitive dependencies).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the SQL JOIN statement do?

A

combines rows from two or more tables based on a related column, usually a foreign key

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

What is an SQL SELECT statement used for

A

An SQL SELECT statement is used to retrieve data from one or more tables.

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

What does the SQL INSERT statement do?

A

adds new rows of data to a table.

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

properties that the relations in a fully normalised database must have

A
  • data is atomic
  • no partial key dependencies
  • every non key attribute is dependent upon the key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly