Database Design Flashcards

1
Q

DDL (Database Definition Language)

A

is a sublanguage of SQL that consists of a set of commands used to define the database, tables, indexes, keys, constraints, and other metadata that comprise a database schema

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

Schema

A

is a skeletal structure of the database that focuses on the tables and constraints without the data.

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

CREATE TABLE

A

creates a new table and defines its structure. The columns and data types are required. The Primary Key, Foreign Keys, and other constraints are typically included, but can be added later.

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

DROP TABLE

A

removes a table

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

ALTER TABLE

A

can change the structure of a table or add a constraint

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

Sequences

A

are incrementing numbers that are commonly used as Surrogate Primary Keys. Start at 0, unless given a starting value. Never stops incrementing.

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

Creating a Sequence manually:

Getting the next number manually:

A
CREATE SEQUENCE custom_seq;
SELECT nextval('custom_seq');
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

DCL

A

Database Control Language
GRANT
REVOKE

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

Database Control Language

A

used to administer the database, users, and permissions.

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

GRANT

A

gives access to a specific action for a resource to a user.

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

REVOKE

A

removes access to specific action for a resource from a user.

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

Normalization

A

The process of improving a database design in steps, called forms of normalization

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

Normalization has 4 goals:

A
  1. arranging data into logical groupings such that each group describes a small part of the whole;
  2. minimizing the amount of duplicate data stored in a database;
  3. organizing the data such that, when you modify it, you make the change in only one place
  4. building a database in which you can access and manipulate the data quickly and efficiently without compromising the integrity of the data in storage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly