일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- npm 글로벌 설치 삭제 했는데 실행됨
- node.js ec2
- COALESCE함수
- aws sdk v3
- EC2
- SMS sandbox
- npm 전역 설치 삭제
- filezilla
- sms 휴대폰 인증
- Java
- node.js ec2 배포
- 스트레스툴
- Apache Benchmark
- sql 데이터 추가
- sms 샌드박스
- 자바
- sql 데이터 삽입
- node.js ec2 ip접속
- HTML
- sns 샌드박스 종료
- html tag
- node.js
- PostgreSQL CAST
- AWS SDK for JavaScript v3
- Foreign Key (외래 키)
- Apache ab
- 이것이 자바다
- HTML 태그
- ab 벤치마크
- Primary key(기본 키)
- Today
- Total
망각에 재주 있는 나를 위해 기록하는 곳.
DBeaver에 PostgresSQL 샘플 데이터 넣기 본문
SQL 마다 제공하는 샘플 데이터로 SQL연습을 할려고 한다.
PostgresSQL을 DB관리툴인 DBeaver에서 사용할 것이다.
먼저 DBeaver와 Postgres 그리고 샘플 데이터를 다운받는다.
DBeaver 다운로드
Download | DBeaver Community
Download Tested and verified for MS Windows, Linux and Mac OS X. Install: Windows installer – run installer executable. It will automatically upgrade version (if needed). MacOS DMG – just run it and drag-n-drop DBeaver into Applications. Debian package
dbeaver.io
Postgres 다운로드
https://www.postgresql.org/download/
PostgreSQL: Downloads
Downloads PostgreSQL Downloads PostgreSQL is available for download as ready-to-use packages or installers for various platforms, as well as a source code archive if you want to build it yourself. Packages and Installers Select your operating system family
www.postgresql.org
Postgres 샘플 데이터
https://www.postgresqltutorial.com/postgresql-sample-database/
PostgreSQL Sample Database
Summary: in this tutorial, we will introduce you to a PostgreSQL sample database that you can use for learning and practicing PostgreSQL. We will use the DVD rental database to demonstrate the features of PostgreSQL. The DVD rental database represents the
www.postgresqltutorial.com
PostgresSQL 설치시 Stack Builder는 설치하지 않았다.
DBeaver에 PostgresSQL을 연결하고 샘플 데이터를 넣어야하는데
PostgresSQL는 설치시 Client Tool인 pgAdmin이 같이 설치된다.
pgAdmin은 GUI환경에서 DB를 관리할 수 있는 툴이다. (이 과정에서 psql을 처음 알게되었다.)
샘플 데이터는 pgAdmin에서 넣어줘야 DBeaver에서 사용할 수 있다.
그리고 샘플 데이터를 넣기위해 pgAdmin에서 Restore시 Utility not found라는 오류가 발생하기도 한다.
이와 관련된 해결법은 다른분의 블로그를 참고하여 해결했다.
관련링크:
[PostgreSQL] file not found 오류 해결하기
📌문제점 DB에서 Restore를 시도하자 아래와 같은 에러가 발생하며 더이상 진행되지 않았다. 당연하겠지만 OK를 눌러도 아무 반응이 없음. 무슨 일인가 싶어 PostgreSQL파일에 들어가봤더니 pdAdmin4 파
while1.tistory.com
결과적으로 DBeaver에 샘플데이터가 잘 나와 기부니가 좋아졌다.
참고로 PostgresSQL 샘플데이터의 ER다이어그램은 이러하다.
이제 필요하면 이걸 가지고 마음대로 연습하면 되겠다.
ps1. 하다보니 여기서 PSQL이라는 존재도 알게 되었는데 나중에 필요하면 공부해야겠다.
PSQL관련링크:
https://browndwarf.tistory.com/51
알아두면 유용한 psql 명령어 정리
PSQL 보통 PostgreSQL을 설치할 때 Client Tool인 pgAdmin이 같이 설치되고, 대부분 GUI 환경에서 pgAdmin을 사용하기 때문에 PSQL의 존재조차 모를 때가 있다. (필자는 PostgreSQL 처음 사용했을 때 psql의 존재..
browndwarf.tistory.com
ps2. 다른 종류의 SQL 샘플 데이터
MySQL
https://www.mysqltutorial.org/mysql-sample-database.aspx/
MySQL Sample Database
This page provides you with a MySQL sample database that helps you to practice with MySQL effectively and quickly. You can download the sample database and load it into your MySQL Server.
www.mysqltutorial.org
Oracle
https://www.oracletutorial.com/getting-started/oracle-sample-database/
Oracle Sample Database
This tutorial introduces you an Oracle sample database and shows you how to load it into an Oracle database for practicing
www.oracletutorial.com
'DB' 카테고리의 다른 글
[DB] Primary key(기본 키), Foreign key(외래 키) (1) | 2024.03.27 |
---|---|
그룹 함수(Group Function) (0) | 2022.03.20 |
서브쿼리 (Sub-Query), 집합 연산자(Set Operator) (0) | 2022.03.20 |
DDL, DML, DCL, TCL (0) | 2022.03.20 |
윈도우 함수(WINDOW FUNCTION) | over() (0) | 2022.03.19 |