데이터베이스
-
데이터베이스 개요SQL/sql 개념 2024. 7. 18. 10:30
▤ 목차" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스 ✔ 데이터베이스⌨ 데이터 베이스의 정의 업무에서 사용되는 데이터를 인식하되 서로 관련되는 데이터들을 일정한 체계와 순서로 모아놓은 데이터의 집합을 말한다.중복이 배제된 통합된 데이터(Integrated Data)의 집합컴퓨터화하여 저장된 데이터(Stored Data)조직의 기능을 수행하는데 반드시 유지해야 할 운영데이터(Operational Data)한 조직에 있는 여러 응용 시스템들이 공동으로 소유하고 유지하며 이용하는 공용 데이터(Shared Data) * 다른 관점의 데이터 베이스 * - 지속성 있는 데이터 : 조직에서 응용시스템에 사용하는 지속적인 데이터의 집합- 개체와 연관성 : 개체(Entity = f..
-
데이터베이스) 파티션, 설계 단계, 논리정보처리기사/개념 2024. 5. 14. 12:40
▤ 목차" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스 ✔ 파티션(Partiton)대용량의 테이블이나 인덱스를 작은 논리적 단위인 파티션으로 나누는 ⌨ 장점과 단점[장점]데이터 접근 시 액세스 범위를 줄여 쿼리 성능이 향상된다.파티션 별로 데이터가 분산되어 저장되므로 디스크의 성능이 향상된다.파티션 별로 백업 및 복구를 수행하므로 속도가 빠르다장애 발생시 데이터 손상 정도를 최소화 할 수 있다.데이터 가용성이 향상된다.파티션 단위로 입출력을 분산시킬 수 있다. [단점]하나의 테이블을 세분화하여 관리해야함으로 세심한 관리가 요구된다.테이블간 조인에 대한 비용이 증가한다.용량이 작은 테이블에 파티셔닝을 수행하면 성능이 저하된다. 💻 종류범위 분할 (Range Partition..
-
무결성 제약(constraint)조건 : Primary Key(PK), Check, Unique, Default, Foreign Key(SQL/sql 문법(mysql, mariaDB) 2024. 4. 29. 09:30
▤ 목차">HTML 삽입미리보기할 수 없는 소스✔ 무결성 제약조건잘못된 자료의 입력을 막고자 다양한 입력 제한 조건을 줄 수 있다.Primary Key Constraint : PK 조건에 만족하는가?Foreign Key Constraint : FK 조건에 만족하는가?UNIQUE Constraint : 유니크한 Value인가?CHECK Constraint : 체크값 만족하는가?DEFAULT Constraint : Default 값을 부여하는 제약조건.크게 5가지로 나눌 수 있다. 💻 코드로 보기 CREATE TABLE aa(bun INT(5), irum VARCHAR(5) NOT NULL, juso CHAR(50));INSERT INTO demo VALUES(1,'tom', 'seoul');INSERT ..
-
DDL _ CREATE / DROP / ALTERSQL/sql 문법(mysql, mariaDB) 2024. 4. 27. 08:30
▤ 목차">HTML 삽입미리보기할 수 없는 소스✔ create create 명령어는 데이터베이스와 테이블을 만들 수 있다.⌨ 형식1. 데이터 베이스 만들기CREATE DATABASE 데이터베이스이름2. 테이블 만들기CREATE TABLE 테이블명(칼럼명 자료형 기타조건들);💻 코드로 보기1. 데이터 베이스 만들기CREATE DATABASE School;2. 테이블 만들기CREATE TABLE student(bun INT primary KEY,irum VARCHAR(10) NOT NULL); 프롬프트 사용 시데이터 베이스 생성MariaDB [(none)]> show databases; create database demo; show databases; ✔ drop존재하는 테이블 전체를 ..