데이터 베이스(Database) - Introduction

1. DBMS (Database Management System)

- DBMS contains information about a particular enterprise(조직).

* Collection of interrelated data

* Set of programs to access the data

* An environment (=tool) that is both convenient and efficient to use

- Database Applications

Banking, Airlines, Universities …

DBMS가 안쓰이는 조직은 거의 없다.

- Databases can be very large.

- Databases touch all aspects of our lives.

 

2. Purpose of Database Systems

- Drawbacks of using file systems to store data

* Data redundancy(중복) and inconsistency
   한쪽의 데이터가 바뀌면 연관된 다른쪽에 있는 데이터도 바뀌어야 consistency이다.
  
DBMS는 자동으로 바꾸어 준다.

* Difficulty in accessing data

* Data isolation(고립)
  같은 내용의 파일이 이름 또는 포맷이 다른 경우
  -> 데이터 중복으로 storage의 낭비, 또는 inconsistency 발생

* Integrity problems
   Integrity constrains become buried in program code rather than being stated explicitly.
   ex) 통장의 잔고는 항상 양수이어야 한다.
   Hard to add new constraints or change existing ones.

* Atomicity of updates
   ex) ATM의 현금인출 메커니즘은 원자단위(하나의 덩어리)이어야 한다.
         더이상 쪼갤수 없어야 한다.
         -> 현금인출하는 과정에서 정전이 되었을 때 현금인출이 원자단위가 아니라면 문제발생

* Concurrent access by multiple users
   같은 데이터에 여러명이 접근 가능, 이때 일관성을 유지해야한다.

*Security problems

※ Database systems offer solutions to all the above problems.

3. View of Data

- Physical level : describes how a record is stored.
                             ('데이터가 어떻게 저장 되어 있는가'에 초점)

- Logical level : describes data stored in database, and the relationships among the data.
                       ('데이터가 어떻게 구성 되어 있나'에 초점)

- View level : application programs hide details of data types. Views can also hide information
                    for security purposes.
                    ex) 연봉은 개인정보이므로 타인이 데이터를 열람할 때 없는것처럼 숨김

 

4. Instances and Schemas

- Schema : the logical structure of the database (programming language에서 type과 유사)

* Physical schema : database design at the physical level

* Logical schema : database design at the logical level

- Instance : the actual content of the database at a particular point in time
                  (programming language에서 variable과 유사)

 

5, Data Models

- A collection of tools for describing

* Data

* Data relationships

* Data semantics

* Data constraints

- Relational model : 데이터를 기술할 때 데이터간의 relation으로 describe

- Entity-Relationship data model : Relational model을 구체화 시켜 실제 구현하기 위한 모델

 

6. Relational Model

- Example of relational model

Relational Model은 간단히 말해 Table형태로 data를 저장하는것이다.
*
Table에서 가로줄을 row 또는 record 또는 tuple이라 한다.
*
Table에서 세로줄을 column 또는 attribute라 한다.

 

7. SQL (Sequential Query Language)

- Example of SQL DML (Data Manipulation Language)

select name
from instructor
where instructor.ID = '22222'

-> select, from, where은 키워드이다.

- Example of SQL DDL (Data Definition Language)

create table department
     (dept_name    char(20),
       building        char(15),
       budget         numeric(12,2));

-> create tabe은 키워드이다

=> 이런 식으로 컴퓨터와 상호소통하는 방식을 두고 iSQL (interactive SQL)이라 한다.

 

8. Entity와 Object

- Entity : 특정 group 내에서 다른 사물 또는 객체와 구별될 수 있는 객체이다.

- Object : 실제로 컴퓨터에서 수행되기 위한 것을 method등을 가진다.

 

9. The Entity-Relationship Model

* instructor : Entity
* member : relationship
* instructor : Entity

 

10. Object-Relational Data Models

Relational Data Model에 Object Oriented 개념을 추가한 것으로 요즘 시스템의 대부분이 이러하다.

 

11. Database Architecture

* Two-tier architecture : old한 방식으로 옛날 수강신청시스템의 단말기를 예로 들 수 있다.
* Three-tier architecture : 요즘의 방식으로 차세대 수강신청시스템의 웹브라우져(client)와
                                      웹서버(server)를 예로 들 수 있다.

 

Posted by Hello_World_2016
,


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24