KangMoo
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 데이터베이스 데이터베이스를 한 마디로 정의하면 **'데이터의 집합'** 이다. 데이터베이스는 체계화된 데이터의 모음으로 다양한 데이터를 효율적으로 관리하고, 접근하고, 수정할 수 있는 방식으로 구성된다. 이 데이터들은 여러 형태로 저장될 수 있다. 예를 들어, 텍스트, 숫자, 바이너리 등이 있다. ## 텍스트 기반의 데이터 저장 형식의 한계 텍스트 파일은 데이터를 저장하고 전송하는 데 매우 유용한 형식이다. `XML`, `JSON`, `YAML` 등의 데이터 저장 형식을 사용하면 데이터를 쉽게 저장하고 전송할 수 있다. 하지만, 이런 텍스트 파일 형태의 데이터는 공통적인 단점을 가지고 있다. 대표적으로 성능, 보안, 편의성에 한계를 가지고 있다. 텍스트 파일이 크거나 많으면 읽고 쓰는 속도가 느려질 수 있다. 또한 원하는 데이터를 찾기 위해 파일 전체를 읽어야 하는 경우가 있어 효율적이지 못하다. 파일이 가진 이 한계를 극복하기 위해 고안된 전문화된 소프트웨어가 `데이터베이스`이다. 일반인들에게 `데이터베이스` 라는 용어는 생소할 수 있지만, 일상생활에서 많이 사용하는 `스프레드 시트` 같은 소프트웨어도 일종의 데이터베이스라 볼 수 있다. 예를 들어 흔하게 사용되는 `엑셀`은 데이터베이스를 편리하게 사용할 수 있도록 GUI 환경을 제공하는 소프트웨어이다. ## 스프레드시트를 사용한 데이터베이스 간접 체험 스프레드시트를 이용하여 데이터베이스의 기본적인 개념을 체험해 볼 수 있다. 여기서는 엑셀을 예로 들어 데이터베이스와 유사한 환경을 구성하는 방법을 안내한다. ### 단계 1: 테이블 생성하기 1. 새 스프레드시트를 열고, 첫 번째 행에는 열의 이름을 정의한다. 예를 들어, 연락처 데이터베이스를 만든다고 가정하자. 첫 번째 행에 `이름`,`성별`,`나이`,`전화번호`,`이메일` 등의 열 이름을 입력한다. 2. 다음 행부터는 실제 데이터를 입력한다. ### 단계 2: 데이터 필터링 및 정렬하기 1. 데이터베이스에서는 종종 특정 조건에 맞는 데이터를 조회한다. 스프레드시트에서는 '필터' 기능을 사용하여 이를 구현할 수 있다. 2. 열 제목을 선택하고, '데이터' 메뉴에서 '필터'를 선택한다. 이제 각 열 제목 옆에 드롭다운 메뉴가 생기며, 이를 사용하여 데이터를 필터링할 수 있다. ### 단계 3: 데이터 분석하기 1. 스프레드시트에서는 함수와 수식을 사용하여 데이터를 분석할 수 있다. 예를 들어, 모든 연락처의 수를 세고 싶다면, 새로운 셀에 `=COUNTA(범위)` 함수를 사용한다. 2. 또한 합계, 평균, 최대, 최소 값 등을 계산하기 위해 `SUM`, `AVERAGE`, `MAX`, `MIN` 같은 함수를 사용할 수 있다. ## 스프레드시트의 한계 위의 스프레드시트에 더 많은 데이터를 추가하고, 데이터를 정렬하고, 필터링하고, 분석하다 보면 스프레드시트의 한계를 느낄 수 있다. 스프레드 시트에는 다음과 같은 한계가 있다. 1. 성능 : 스프레드시트는 대량의 데이터를 처리하기에 적합하지 않다. 데이터가 많아지면 읽고 쓰는 속도가 느려질 수 있다. 2. 동시성 : 여러 사용자가 동시에 스프레드시트를 수정할 수 없다. 동시에 수정하면 데이터가 꼬일 수 있다. 3. 보안 : 스프레드시트는 보안에 취약하다. 데이터가 노출될 수 있고, 수정되거나 삭제될 수 있다. 4. 복구성 : 실수로 데이터를 삭제하거나 수정하면, 복구하기 어렵다. 5. 확장성 : 스프레드시트는 데이터베이스의 복잡한 기능을 제공하지 않는다. 6. 데이터 관리 : 스프레드시트는 데이터를 관리하기에 적합하지 않다. 7. 데이터 무결성 : 스프레드시트는 데이터 무결성을 보장하지 않는다. 8. ... 즉, 스프레드시트는 대규모의 데이터를 처리하도록 설계되지 않았다. 이러한 한계를 극복하기 위해 데이터베이스가 고안되었다. 세상에는 다양한 데이터베이스 제품이 존재한다. - MySQL - MariaDB - Oracle - SQL Server - PostgreSQL - MongoDB - ... 이러한 데이터베이스 제품들은 각각의 특징과 장단점을 가지고 있으며, 사용자의 요구에 따라 선택하여 사용할 수 있다. ## DBMS(DataBase Management System)란? 데이터베이스를 '데이터 집합'이라고 한다면, 이러한 **데이터베이스를 관리하고 운영하는 소프트웨어를 DBMS(DataBase Management System)** 라고 한다. DBMS는 다양한 데이터를 보관하며, 여러 사용자가나 프로그램이 데이터에 안전하게 접근할 수 있도록 해준다. ![image](https://hackmd.io/_uploads/rkYQDc8J0.png) ### DBMS의 특징 DBMS 다음과 같은 중요한 특징을 가진다 1. 지속성 : 데이터는 영구적으로 저장되며, 시스템이 종료되어도 사라지지 않는다. 2. 신뢰성 : 데이터의 정확성과 일관성이 유지된다. 3. 보안 : 데이터 접근은 인증된 사용자에게만 허용된다. 4. 동시성 : 여러 사용자가 동시에 데이터를 사용할 수 있다. 5. 복구성 : 시스템에 문제가 발생해도 데이터를 복구할 수 있다. ### DBMS의 분류 DBMS는 다양한 기준에 따라 분류될 수 있다. 가장 일반적인 분류는 다음과 같다. ![image](https://hackmd.io/_uploads/B19FwJxJA.png) | | RDBMS(관계형 데이터베이스) | NoSQL(비관계형 데이터베이스) | | ----------- | ------------------------------- | ---------------------------- | | 데이터 모델 | 테이블 | 키-값, 문서, 열, 그래프 등 | | 데이터 저장 | 테이블 형태로 데이터를 저장 | 다양한 형태로 데이터를 저장 | | 데이터 관리 | SQL을 사용하여 데이터를 관리 | SQL을 사용하지 않음 | | 예시 | MySQL, Oracle, MariaDB | MongoDB, Cassandra, Redis | | 확장성 | 수직적 확장 | 수평적 확장 | | 사용 | 전통적인 데이터베이스 | 대용량 데이터 처리 | | 장점 | 데이터 일관성, 정확성 | 대용량 데이터 처리 | | 단점 | 대용량 데이터 처리 시 성능 저하 | 데이터 일관성, 정확성 부족 | ## 관계형 DBMS(RDBMS) 관계형 데이터베이스는 데이터를 테이블 형태로 저장하고, 테이블 간의 관계를 정의하는 데이터베이스로 대부분의 DBMS가 RDBMS에 속한다. RDBMS는 일종의 `표` 형태로 데이터를 저장하고 관리한다. ![image](https://hackmd.io/_uploads/Sk-Fw98y0.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully