SQL, databases and ORMs Flashcards

1
Q

1NF (First Normal Form) Rules

A

1NF (First Normal Form) Rules

  • Each table cell should contain a single value.
  • Each record needs to be unique.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

2NF (Second Normal Form) Rules

A

2NF (Second Normal Form) Rules

  • Rule 1- Be in 1NF
  • Rule 2- Single Column Primary Key that does not functionally depend on any subset of candidate key relation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

3NF (Third Normal Form) Rules

A

3NF (Third Normal Form) Rules
- Rule 1- Be in 2NF
- Rule 2- Has no transitive functional dependencies
(when changing a non-key column, might cause any of the other non-key columns to change)

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

2 types of databases

A

Relational - SQL

Non Relational - NoSQL

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

Design of all the tables and the relationships is called…

A

a schema

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

Main unique id is called…

A

primary key

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

Link to a unique id in another table is called…

A

foreign key

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

Relationship types:

A

one to one
one to many
many to many

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

What is a migration?

A

It’s a record keeping track of a series of changes to a database (that can be ‘played back’ to reproduce changes on the database)

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

What is an ORM?

A

Object Relational Mapper - maps javascript object to database table

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