Databases Flashcards

1
Q

What is a relational database?

A

A relational database consists of a set of
relations. A relation has two things in one: a schema and an instance of the schema.

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

What is a schema?

A

schema defines the relation and an instance is the content of the relation at a given time.

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

What does an integrity constraint do?

A

Imposes a condition that all legal instances of the relations must satisfy.

Three types: domain, primary key, foreign key.

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

What are domain constraints?

A

Specify the permissible values for an attribute.

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

What is a primary key?

A

Candidate keys designated by database designer. Often used to identify tuples i a relation.

The primary key constraint specifies that the primary key value of a tuple cannot be null and no two tuples
in the relation can have the same value on the primary key

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

What is a foreign key?

A

Primary key in another table.

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

What does JBDC stand for?

A

Java
DataBase Connectivity

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

What does the SQL SELECT statement do?

A

Used to retrive rows in a table.
SELECT Columns FROM Table

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

What do you use the WHERE clause for?

A

The WHERE clause can be used with the SELECT statement to specify a search
criteria

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