Tagging
Try bookmarklet. Easy tagging.
Do you want to delete?
Do you want to modify?
  • LINKTAG
  • New
  • Tag
  • Comment
  • Tag, db
Sign in

db

it ops db softdelete unique

MySQL에서 이메일 재사용 가능하게 하기- Soft Delete와 Unique를 함께 활용하다.

MySQL에서 회원탈퇴시 탈퇴한 회원 정보를 DB에서 완전히 삭제하지 않고 softDelete 처리했을 때, 해당 이메일을 중복확인에서 통과시키고 재사용할 수 있게한 고민들
wono | discuss |
it ops db soft delete unique

[MySQL] Soft delete와 unique constraint

Soft delete인데 unique가 걸려있다... 제목을 어떻게 지어야할지 몰라서 저렇게 지었지만 회사 API 작성 중 회원가입 파트에서 막힌 부분이 있었다. 바로 탈퇴한 아이디인데 그 아이디로 다시 회원가입을 할 경우, 로직상 DB에서 레코드(row)를 삭제하는 것이 아닌, soft delete(논리 삭제)를 할 경우 unique해야 할 아이디가 이미 테이블에 존재한다며 에러를 내뿜었다. 이 부분에 대해 고민을 한 것이 2가지였다. unique constraint를 없애고 비지니스 로직으로 논리 삭제된 아이디를 제외하고 중복된 아이디인지 검사 nickname과 deleted_at 컬럼 두개를 다중 컬럼 unique를 건다. unique 삭제? unique 조건을 삭제한다면 문제가 분명히 생길 것이다..
wono | discuss |
it ops db common

요즘 트랜드는 공통코드를 사용하지 않는 건가요? | OKKY Q&A

안녕하세요.프로젝트를 수행중인 시니어 개발자로 요즘은 관리만 하고 있습니다. 주니어, 중니어 개발자들이 주도적으로 설계,구현을 하고 있습니다.  요즘 트랜드는 공통코드를 사용하지 않는 건가요?물론, 업무에 따라, 업무로직에 따라 공통코드를 사용하지 않을 수는 있습니다.근데, 라떼는 공통코드는 기본으로 무조건 만들고 시작했었는데... 개발자들이 구현해 놓은거
wono | discuss |
it ops db common

[DB 설계] 공통코드 테이블 설계

개요 하나의 서비스를 만들면 서비스 내에서 정의하여 사용하는 수많은 코드 데이터들이 있다. 이런 코드들을 한데 모아서 관리하기 위한 목적으로 설계하는 것이 공통코드 테이블이다. 관리자 페이지가 따로 존재하는 경우에는 필수적으로 "공통 코드 관리" 메뉴를 확인할 수 있게 된다. 이는 거의 프로젝트 초반에 가장 먼저 설계하는 테이블들 중 하나이다. 어쨋든 우리는 서비스를 만들때 내부에서 많은 코드들을 정의해서 사용하곤 한다. 어떤 경우에는 해당 코드들을 테이블에서 관리하지 않고 소스 코드에서 관리하는 경우도 있다. (일정 규모 이상의 서비스를 만들고 있다면, 소스 코드에서 관리하는 일은 없다고 본다.) 소스코드에서 관리하게 되면 데이터를 조회 할때 그 코드값이 무엇을 의미하는지 소스코드를 직접 확인해야 한다..
wono | discuss |
it ops db dbeaver

How to Install Git Extension in Dbeaver and Connect your Repository

In a recent consultation with an international client, I focused on improving their data quality process. One of the tools I utilised was DBeaver, a versatile platform for managing multiple databases…
wono | discuss |
it ops db mysql dump

mysql DUMP사용

dump 옵션 –single-transaction :  dump를 하나의 트랜잭션을 이용해서 실행함 (InnoDB 스토리지 엔진을 사용하는 테이블에 대해서는 Lock없이 일관된 덤프를 받을 수 있음). 자세한 내용은 아래 “일관된 데이터 덤프 받기” 참조 –flush-logs : dump를 시작하는 시점에 binary log를 rotation 시키도록 한다. Binary log를 증분 백업용으로 사용하는 경우, 풀백업과 증분 백업의 구분을 명확히 할 수 있다. –master-data :  이…
wono | discuss |
it ops db mysql dump

mysqldump 사용시 주의점

mysqldump는 mysql, mariadb 에서 데이터 백업시 주로 사용하는 백업방법 중 하나이다. 개발 DB에서 사용할 때는 문제가 없지만 서비스 DB에서 이걸 사용한다면 한가지 주의할 점이 있다. 모르고 그냥 사용하게 된다면 TABLE LOCK 때문에 서비스 장애를 일으킬 수 있다. mysqldump는 여러 옵션이 있는데 그것을 모르고 default 옵션만 놓고 사용한다면 문제가 발생한다. 1. default 옵션사용시 ex) mysqldump -uroot -p비번 xxxxDB TB_TEST_HIST > TB_TEST_HIST_20230110.sql MariaDB [(none)]> show processlist; +----------+-------------+---------------------..
wono | discuss |
it ops db mysql dump

[Mysql] mysql dump 사용법

데이터 백업 : mysqldump는 모든 데이터베이스 테이블의 내용을 SQL 명령으로 추출하여, 이를 통해 테이블 생성과 데이터 삽입을 할 수 있는 SQL 스크립트를 생성합니다.데이터 복원 : 생성된 덤프 파일은 mysql 명령어 라인 유틸리티를 사용하여 MySQL 데
wono | discuss |
it ops db postgresql varchar

Don't Do This - PostgreSQL wiki

wono | discuss |
it ops db postgresql

Should I add an arbitrary length limit to VARCHAR columns?

According to PostgreSQL's docs, there's no performance difference between VARCHAR, VARCHAR(n) and TEXT. Should I add an arbitrary length limit to a name or address column? Edit: Not a dupe of: W...
wono | discuss |
it ops db plpgsql

PL/pgSQL의 구조 - Amazon Redshift

Amazon Redshift에서 사용되는 PL/pgSQL 언어의 구조에 대해 알아봅니다.
wono | discuss |
it ops db uuid tsid

분산 환경에서 P.K는 어떤 전략으로 가져가면 좋을까?

보통 내가 진행하는 프로젝트에서는 단일 데이터베이스를 사용하거나, 단일 시스템에서 동작했기에, auto_increment P.K 전략을 가져가도 중복된 값이 존재하는 경우가 거의 없기 때문에 문제가 되지 않았다. 하지만 대규모 분산 처리 시스템일 때는 이 자동 증가 전
wono | discuss |
it ops db id pk

🔑 Awesome Identifiers

wono | discuss |
it ops db postgresql do

[PostgreSQL] Function3

이번 장은 for문과 loop를 이용하여 function을 사용하는 법을 익혀보려고 합니다. 우선은 천천히 감을 잡아가기 위해 나름대로의 난이도를 생각하여 쉬운 난이도부터 코드를 늘려가며 난이도를 높여보려고 합니다.for문과 loop 사용 연습 이에 대한 결과로 아래와
wono | discuss |
it ops db postgresql tsid

pg_random_id/lib/pg_random_id/sql/crockford-pure.sql at 0b4dc52c68b7b4aedca25e6a6cac848da7771d4a · arjunmenon/pg_random_id

Contribute to arjunmenon/pg_random_id development by creating an account on GitHub.
wono | discuss |
it ops db postgresql tsid

Build software better, together

GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
wono | discuss |
it ops db postgresql pk

PostgreSQL generate unique sorted IDs for timestamps

PostgreSQL generate unique sorted IDs for timestamps - snowflake.sql
wono | discuss |
it ops db postgresql base32

Base58 Encoder function in PostgreSQL

> https://www.postgresql.org/docs/9.6/functions-binarystring.html
wono | discuss |
it ops db postgresql tsid

How to encode a byte array to base32 in PostgreSQL

I have a Java application that generates ids for primary keys by encoding cryptographically random bytes to base32 (RFC4648). How do I do the same with PostgreSQL from an SQL script? The gen_random...
wono | discuss |
it ops db postgresql tsid

GitHub - sergeyprokhorenko/pg_ulid_comparison: Comparison of ULID generation functions for PostgreSQL

Comparison of ULID generation functions for PostgreSQL - sergeyprokhorenko/pg_ulid_comparison
wono | discuss |
Next
© 2025. LINKTAG.ORG. Help Feedback Privacy Terms