목록Study/Database (5)
NY's 개발일기
Redis 란? Redis란 Key-Value 구조의 비정형 데이터를 저장하고 관리하기 위한 오픈 소스 기반의 비관계형 데이터베이스 관리 시스템이다. Redis-cli 기본 명령어 정리 [생성] 데이터 저장하기 set key value 다수의 데이터 저장하기 mset key value key value . . . 만료시간을 지정하여 데이터 저장하기 setex key seconds value + 남은 만료시간 조회하기 ttl key [조회] 모든 key 값 조회하기 keys * 해당 문자열이 포함된 key 값 조회하기 keys *string* key에 해당하는 value 값 조회하기 get key 다수 key의 value 값 조회하기 mget key key . . . [수정] key 이름 변경하기 rena..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/bIit0J/btrpJXxThc3/Lrr2oSKdgvpecfp1FpeGkK/img.png)
Preparation 아래 사이트에 접속하여 Docker Desktop을 설치합니다. https://www.docker.com/products/docker-desktop Docker Desktop for Mac and Windows | Docker Learn why Docker Desktop is the preferred choice for millions of developers building containerized applications. Download for Mac or Windows. www.docker.com 1. redis 디렉토리 생성 mkdir redis cd redis 2. docker-compose.yml 파일 생성 vi docker-compose.yml version: "2" s..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/bEkcm8/btrpJRYFfE4/4Xrk1BSEKK5r2syDlJpGAk/img.png)
Redis 란? Redis란 Key-Value 구조의 비정형 데이터를 저장하고 관리하기 위한 오픈 소스 기반의 비관계형 데이터베이스 관리 시스템입니다. Redis 설치 https://github.com/microsoftarchive/redis/releases Releases · microsoftarchive/redis Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes - microsoftarchive/redis github.com 해당 페이지에 접..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/XDg8O/btq22F6P8Ie/9E9wewxPiNmM4s10785bc1/img.png)
※ JDBC란 JAVA언어로 RDBMS에 접속하여 SQL문을 처리할 때 사용되는 표준 SQL 인터페이스 API입니다. CLI(Call Level Interface) 방식을 이용해 Create문, Insert문, Query를 처리해보도록 하겠습니다. import java.sql.*; import java.util.*; public class Main { public static void main(String[] args) throws SQLException { String url = "jdbc:postgresql://localhost/"; String user = "postgres"; String password = "*****"; //password 입력 try { Scanner scan = new Sc..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/bFtT7j/btqTF2rdX4d/spz7MFfMmRJgVP7F2l6av1/img.png)
※ Java 실행의 경우 IntelliJ IDEA를 사용하였습니다. 1. PostgreSQL JDBC Download https://jdbc.postgresql.org/download.html PostgreSQL JDBC Download Download About Binary JAR file downloads of the JDBC driver are available here and the current version with Maven Repository. Because Java is platform neutral, it is a simple process of just downloading the appropriate JAR file and dropping it into your cl jdbc.pos..