1.4 Tables Flashcards

1
Q

Characteristics of a table

A

A table has a name, a fixed sequence of columns, and a varying set of rows.

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

What is a column?

A

A column, also known as an attribute or field, represents a single category of data within a table. Each column contains values of a specific type (e.g., text, numbers, dates) and describes a particular characteristic of the data stored in each row.

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

What is a row?

A

A row is an unnamed sequence of values. Each value corresponds to a column and belongs to the column’s data type. Also known as a record or tuple, represents a single, specific entry within a table in a database.

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

What is a cell?

A

single column of a single row.

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

What is an empty table?

A

A table without rows

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

What is data independence?

A

Data independence is a fundamental concept in database management that refers to the separation of data structure from the applications that use the data. This allows changes to be made to the data’s storage or organization without impacting the applications that rely on it.

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

CREATE TABLE

A

Creates a new table by specifying the table name, column names, and column data types.

CREATE TABLE Employees (
EmployeeID INT PRIMARY KEY,
FirstName VARCHAR(50),
LastName VARCHAR(50),
DateOfBirth DATE,
Position VARCHAR(100),
Salary DECIMAL(10, 2)
);

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

DROP TABLE

A

Deletes a table, along with all the table’s rows, from a database.

DROP TABLE Employees;

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

ALTER TABLE

A

The ALTER TABLE statement adds, deletes, or modifies columns on an existing table.

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

Rename a column

A

ALTER TABLE table_name
RENAME COLUMN old_column_name TO new_column_name;

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

Modify a column’s datatype

A

ALTER TABLE table_name
MODIFY COLUMN column_name new_data_type;

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

Delete a column

A

ALTER TABLE table_name
DROP COLUMN column_name;

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