Relational Databases

studied byStudied by 10 people
0.0(0)
Get a hint
Hint

First Normal Form

1 / 28

flashcard set

Earn XP

29 Terms

1

First Normal Form

Data must be atomic for each attribute in a record

New cards
2

Second Normal Form

Data must be atomic, every non key attribute must be depended on the whole of the primary key (single primary key tables that are in 1NF are automatically in 2NF)

New cards
3

Third Normal Form

Data must be atomic, every non-key attribute must be dependent on the whole of the primary key and non-key attributes are functionally independent

New cards
4

Why are databases normalised?

To minimise data duplication, eliminate update, insertion, and deletion anomalies, eliminate data inconsistency

New cards
5

Databases

Structured way of storing, managing and retrieving data/information

New cards
6

‘Flat file’ databases

One long text/csv file, has data redundancies and inconsistencies

New cards
7

Entity

Category of objects about which data will be stored

New cards
8

Attribute

Characteristic about an entity, which would be stored as a field

New cards
9

Record

All characteristics of a specific object. They are the rows in a table

New cards
10

Primary key

Must be a unique characteristic for that specific record, is a unique identifier for a record

New cards
11

Composite Key

When the primary key of a relation is made of two or more attributes

New cards
12

Foreign Key

Attribute that links two tables. When two tables are in a one-to-many relationship, that relationship is modelled with an attribute

New cards
13

select specifics (SQL)

SELECT…FROM…WHERE…ORDER BY…

New cards
14

select and group (SQL)

SELECT…FROM…GROUP BY…

New cards
15

Data Definition Language (DDL)

Defines how the data is stored, organised and managed in the database

New cards
16

Data Manipulation Language (DML)

Manipulates the data, updates/changes it, selects subsets

New cards
17

CHAR(n)

Char string of fixed length n

New cards
18

VARCHAR(n)

Character string variable length max n

New cards
19

BOOLEAN

TRUE or FALSE

New cards
20

INTEGER, INT

Integer

New cards
21

FLOAT

Number with a floating decimal point

New cards
22

DATE

Stores Day, Month, Year values

New cards
23

TIME

Stores Hour, Minute, Second

New cards
24

MONEY, SMALLMONEY

Formats numbers in the currency used in your region. MONEY uses 8 bytes, SMALLMONEY uses 4 bytes

New cards
25

Deleting a column

ALTER TABLE...DROP…

New cards
26

Changing data type of a column

ALTER TABLE…MODIFY COLUMN…(VARCHAR(n))NOT NULL

New cards
27

Inserting a new record

INSERT INTO…VALUES…

New cards
28

Updating data

UPDATE…SET…WHERE…

New cards
29

Deleting a record

DELETE FROM…WHERE…

New cards

Explore top notes

note Note
studied byStudied by 4 people
... ago
5.0(1)
note Note
studied byStudied by 94 people
... ago
5.0(1)
note Note
studied byStudied by 433 people
... ago
5.0(3)
note Note
studied byStudied by 33 people
... ago
5.0(1)
note Note
studied byStudied by 28 people
... ago
5.0(1)
note Note
studied byStudied by 32 people
... ago
5.0(2)
note Note
studied byStudied by 11 people
... ago
5.0(1)
note Note
studied byStudied by 29 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (121)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (84)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 16 people
... ago
5.0(1)
flashcards Flashcard (27)
studied byStudied by 8 people
... ago
5.0(1)
flashcards Flashcard (83)
studied byStudied by 12 people
... ago
5.0(1)
flashcards Flashcard (53)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (48)
studied byStudied by 50 people
... ago
5.0(1)
flashcards Flashcard (24)
studied byStudied by 16 people
... ago
5.0(1)
robot