Lecture 1 Flashcards

1
Q

What is a database?

A

Organising data:
- Able to quickly retrieve based on user’s demands
- Can be indexed in many ways
- Has a level of meaning relatable to real world entities
- Can be kept up-to-date and is consistent at all times.

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

Relational Approach

A

Data is stored in form of relations.

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

Document based approach

A

Data is stored in the form of documents.

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

When do you need a database?

A
  • When your data no longer fits in memory
  • When you need persistence
  • If multiple processes need to access and modify the same data
  • When you need to secure your data
  • When integrity and structure of data is important
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

DBMS

A
  • Can be accessed by multiple users, connect to other systems, etc
  • Single point of entry, no redundancy (unless created by users)
  • Abstraction trough common interfacing and query language
  • Networking
  • Separates storage from data
  • Manages redundancy and constraints

Job as developer: Abstract the DBMS.
Job as Data scientists: turn data from DBMS into actionable information.

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

SQL

A
  • SQL is a non-procedural language.
  • Way to communicate with a DBMS
  • The DBMS determines how and when your statement is executed.
  • To use databases in your software, you must use an SDK to communicate using SQL with a DBMS.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Most common data types in MySQL

A
  • Numeric (int, tinting - boolean, smallint, bigint, decimal, float, real, numeric)
  • Date/time
  • Character/String
  • Unicode character / String
  • Binary
  • Miscellaneous (BLOB)

BLOB - stores large data, documents, and even media files.

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

SQL

A

Data types, Create/Alter, Insert, Update, Select, Delete, Drop

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