Relational Databases

studied byStudied by 5 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 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 57 people
Updated ... ago
5.0 Stars(3)
note Note
studied byStudied by 18 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 1418 people
Updated ... ago
4.8 Stars(25)

Explore top flashcards

flashcards Flashcard29 terms
studied byStudied by 297 people
Updated ... ago
4.5 Stars(10)
flashcards Flashcard50 terms
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard80 terms
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard21 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard144 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard47 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard49 terms
studied byStudied by 82 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard146 terms
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)