Java Database and Web Dev Flashcards

1
Q

What is normalization?

A

normalization has two basic requirements:
There is no redundancy of data. All data is stored in only one place.
Data dependencies are logical. All related data items are stored together.

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

What are primary and foreign keys, and what are the relationship between them?

A

A primary key-foreign key relationship defines a one-to-many relationship between two tables in a relational database. A foreign key is a column or a set of columns in one table that references the primary key columns in another table. The primary key is defined as a column (or set of columns) where each value is unique and identifies a single row of the table.

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

What are the four kinds of relationships tables can have with other tables?

A

One-to-one, one-to-many or many-to-one, many-to-many

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

What are the ACID guarantees?

A

The acronym ACID stands for atomicity, consistency, isolation, and durability. These describe the set of properties of database transactions.

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

What is Atomicity?

A

Atomicity: Atomicity refers to the fact that a transaction succeeds or it fails. It is an all-or-nothing operation.

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

What is consistency?

A

Consistency: Consistency requires data updated via transactions to respect the other constraints or rules within the database systems to keep data in a consistent state.

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

What is isolation?

A

Isolation: Modern DBMSs allow users to access data concurrently. Isolation is the characteristic that allows concurrency control so modifications from one transaction are not affecting operations in another transaction.

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

What is durability?

A

Durability: Transactions and database modifications are not kept in volatile memory but are saved to permanent storage, such as disks.

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

What are some common data types in SQL?

A

Numeric data types such as int, tinyint, bigint, float, real, etc.
Date and Time data types such as Date, Time, Datetime, etc.
Character and String data types such as char, varchar, text, etc.
Unicode character string data types, for example nchar, nvarchar, ntext, etc.
Binary data types such as binary, varbinary, etc.
Miscellaneous data types - clob, blob, xml, cursor, table, etc.

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

What are joins in SQL?

A

Joins are used to combine data or rows from two or more tables based on a common field between them.

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