Computer Science - 7 Relational Databases and SQL - 1 Databases & 2 Relational Databases

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/26

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

27 Terms

1
New cards

Table name

describes the content of a table

2
New cards

Table

arrangement of data made up of horizontal rows and vertical columns

3
New cards

Field

single characteristic of data that appears in a table as a column

4
New cards

Field name

name that identifies a field

5
New cards

Record

collection of related data elements

6
New cards

Data types [7]:

- Integer

- Real/float/decimal

- Date/Time/Datetime

- Char

- Varchar

- Text

7
New cards

Varchar

string of variable length

8
New cards

Char

string of fixed length

9
New cards

Text

string of variable length that can be very long

10
New cards

Flat file database

database which consists of just one table in a single text file

11
New cards

What format is a flat file database stored in?

CSV

12
New cards

CSV

Comma Separated Values

13
New cards

Problems with flat file databases [2]:

- redundancy

- inconsistency

14
New cards

Redundancy [2]

- takes up unnecessary memory or storage

- takes longer to search

15
New cards

Inconsistency [1]

- difficult to search and sort data

16
New cards

Primary key

field that uniquely identifies each record in a table

17
New cards

ID number

number that is unique for each record - stored as autonumber or int

18
New cards

Autonumber

field that automatically adds a unique number to the primary key field for each record in the table

19
New cards

Relational database

database that represents data as a collection of tables with relationships between them

20
New cards

Relationship

links between tables

21
New cards

Relation

another word for each table in a relational database

22
New cards

Why use a relational database? [2]

- reduce redundancy

- reduce inconsistency

23
New cards

Foreign key

field in a table that references the primary key of another table

24
New cards

Types of relationships [3]:

- one-to-one

- one-to-many

- many-to-many

25
New cards

One-to-one

each entity in the relationship will have exactly one related entity

26
New cards

One-to-many

entity on one side of the relationship can have many related entities, but an entity on the other side will have a maximum of one related entity

27
New cards

Many-to-many

entities on both sides of the relationship can have many related entities on the other side