TIL/ Database

Agnes Shin·2022년 2월 7일
0

DOM
1. JavaScript 위치
2. DOM tree (header, footer, section, aside)

browser와 user communication 하는 방법
DOM = Document Object Model=> webpage HTML

=====
What is Database?
- A database generally reffers to a structured collectio of structured information or data stored electronically in a computer system. The database is usually controlled by a database......
// need to add additional information

for web developer's perspective... used for web system (DB)

website-> starbucks-> click on the selected drink -> detailed description-> web system, data is sourced from the database.

** information are all saved in a database, saved in the system for long period of time.

This is called three-tiered web system

web client

like(chrome, safari) request ->

web application server

request (detailed information from the database) ->

DBMS software = software data

database = actual hardware data

front-end use web client-> web application server, easier for front-end developers,

back-end use api database server, database (raw data)


DBMS (Database Management System) is a software
보존 (saved) hard disk, usb, permanantly saved, data saved 체계적 관리

DMS 사용하는 이유:
생산성-read, create, delete, update
기능성- advanced search, 대용량 데이터 저장, fast speed, 기능확장의 유여함
신뢰성-scalability,load balancing, data retrieved, data restore


What is 관계형 vs. 비관계형 database?
관계형 database (RDBMS) (relational database)

  • looks like a excel sheet full of data
    column (id,book title, author, publisher, price)
    row (id - holds the numbering in order for primary key)

  • not related database
    When do you use it?

What is table, column, row?
column id - name - id - identification number - user_id
row -
관계형 table database is as below:

One to One, (Name, id) are PK (primary key)
users -> identification numbers (A to B) in 1:1 ratio in two tables.
column (1) : column (1)

One to Many, (users - pets)
1:2 table ratio
one owner can own 2 pets
foreign key is still used

reference pet table -> user id column table -> id(pk)

Many to Many (2+ more authors per column),
... but problem occurs (titles overlap),
the titles with the same title can be two different stories.

author -> author_books -> books
need to create another table,
a separte table with author_id / book_id is added
to make sure there is no overlapping in data

books are usually use foreign keys

Primary Key vs. Foreign Key

ACID (Atomicity, Consistency, Isolation, Durability):
Atomicity-
Consistency-
Isloation-
Durablitiy-

Transaction:
bank system -> from sender -> bank takes out money -> to recipient receives money-> rollback can occur when something is missed...

MySQL:
Database를 지시하기 위해서 programming:

DDL - Data Define Language
** defines the language of the data,

DML - Data Manipulation Language
** insert, update, delete

DQL- Data Query Language
** select , 불러온는 데이터 by using query
where,
like,
inner join - table1 and table2

profile
30기 신윤숙 / FE

0개의 댓글