Fundamentals of Databases Flashcards

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

What is a data model?

A

A data model is an abstract model that determines what things to store in a database and what information should be recorded about them.

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

What are entities and attributes in database design?

A

In database design, an entity is a thing about which data is stored, such as a customer. Attributes are characteristics or information about entities, like the customer’s name or address.

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

How are entities and their attributes stored in a database table?

A

Entities are stored as rows in a table, and the fields of each row hold the attributes of the entity.

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

What is an entity identifier?

A

An entity identifier is a unique attribute given to each entity in a table, typically used as a primary key to ensure uniqueness.

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

What is the primary key?
Customer (CustomerID, CustomerName, CustomerAddress, CustomerEmail)

A

CustomerID

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

What is an entity description?

A

An entity description is used to describe how information about an entity is stored in a database table. It lists the entity’s attributes, with the entity identifier typically underlined.

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

What are the three degrees of relationship between tables in a database?

A

The three degrees of relationship are one-to-one, one-to-many, and many-to-many.

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

What are primary and foreign keys in a database?

A

A primary key is an attribute that uniquely identifies an entity in a table. A foreign key is an attribute in one table that references the primary key of another table.

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

What is database normalization?

A

Database normalization is the process of organizing a database to eliminate redundancy and improve data integrity. It involves removing repeating or duplicated data.

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

What are the three levels of database normalization?

A

The three levels of normalization are first normal form (1NF), second normal form (2NF), and third normal form (3NF).

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

What are the main SQL commands?

A

The main SQL commands are SELECT, UPDATE, INSERT, and DELETE

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

What is the SELECT command used for in SQL?

A

The SELECT command is used to retrieve data from a database table based on specified condition

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

What is the UPDATE command used for in SQL?

A

The UPDATE command is used to modify the attributes of existing entities in a database table.

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

What is the DELETE command used for in SQL?

A

The DELETE command is used to remove entities from a database table based on specified conditions.

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

What is the INSERT command used for in SQL?

A

The INSERT command is used to add new records (entities) to an existing database table

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

What are wildcards in SQL?

A

Wildcards are used in SQL commands to specify any possible value. They are usually denoted with an asterisk (*) and can be used to select all attributes or entities.

17
Q

What is the CREATE command used for in SQL?

A

The CREATE command is used to create a new database table with specified attributes and data types.

18
Q

What are SQL data types?

A

Fixed-length string: CHAR(size)
Variable-length string: VARCHAR(size)
Integer: INT(size)
Number with fractional part: FLOAT(size, precision)
Date: DATE

19
Q

What is the requirement for a database to conform to the first normal form (1NF)?

A

A database in 1NF contains no repeating attributes, and its data is atomic (no single column contains more than one value).

20
Q

What does a database need to satisfy to meet the second normal form (2NF)?

A

To meet 2NF, a database must satisfy 1NF and remove partial key dependencies.

21
Q

What is a partial key dependency?

A

A partial key dependency occurs in databases with composite primary keys when a non-key attribute depends on only a portion of the composite key.

22
Q

What additional requirement does a database need to meet to achieve third normal form (3NF)?

A

In addition to 2NF, a database in 3NF must have no non-key dependencies.