Lecture 1 Flashcards
(8 cards)
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.
2
Q
Relational Approach
A
Data is stored in form of relations.
3
Q
Document based approach
A
Data is stored in the form of documents.
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
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.
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.
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.
8
Q
SQL
A
Data types, Create/Alter, Insert, Update, Select, Delete, Drop