-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/#118 DB 쿼리 작성 #121
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Walkthrough이 변경 사항은 데이터베이스의 여러 테이블을 정의하고 데이터를 삽입하기 위한 SQL 스크립트를 포함합니다. Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🧹 Outside diff range and nitpick comments (3)
aics-api/src/main/resources/db/data.sql (1)
1-4
: 더미 데이터의 내용이 너무 간단합니다.현재 데이터가 실제 운영 환경과 비슷한 형태를 갖추도록 더 자세한 내용으로 보완하면 좋겠습니다.
예시:
-VALUES ('학과 소개 내용입니다.', NULL, 'DEPT_INTRO', 'DEPT_INTRO'), +VALUES ('경기대학교 인공지능컴퓨터공학부는 4차 산업혁명 시대를 선도할 AI 전문가를 양성하고 있습니다...', NULL, 'DEPT_INTRO', 'DEPT_INTRO'),aics-api/src/main/resources/db/schema.sql (2)
118-136
: 인덱스 전략 최적화 필요현재 인덱스 구성에 대한 다음 개선사항을 제안드립니다:
- 외래 키에 대한 인덱스는 자동으로 생성되므로 일부 중복될 수 있습니다:
idx_carousel_file_id
idx_comment_post_id
idx_comment_author_id
idx_post_author_id
- 복합 인덱스 고려가 필요합니다:
-- 게시글 검색 최적화를 위한 복합 인덱스 CREATE INDEX idx_post_category_created_at ON post(category, created_at DESC); -- 제목 검색과 함께 카테고리 필터링을 위한 복합 인덱스 CREATE INDEX idx_post_category_title ON post(category, title);
- 각 인덱스의 사용 패턴을 모니터링하고, 사용되지 않는 인덱스는 제거하는 것을 권장드립니다.
1-114
: 아키텍처 관련 제안사항데이터베이스 스키마의 확장성과 운영 효율성을 위한 제안사항입니다:
- 대용량 테이블 파티셔닝 전략:
post
테이블: 카테고리별 또는 생성일자별 파티셔닝comment
테이블: post_id 기준 파티셔닝
- 감사 로깅 전략:
CREATE TABLE audit_log ( id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, table_name VARCHAR(50) NOT NULL, record_id VARCHAR(50) NOT NULL, action VARCHAR(10) NOT NULL, old_data JSONB, new_data JSONB, changed_by VARCHAR(10) NOT NULL, changed_at TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP );
- 테이블 및 컬럼에 대한 COMMENT 추가를 권장드립니다:
COMMENT ON TABLE post IS '게시글 정보'; COMMENT ON COLUMN post.title IS '게시글 제목';
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
aics-api/src/main/resources/db/data.sql
(1 hunks)aics-api/src/main/resources/db/schema.sql
(1 hunks)
🔇 Additional comments (3)
aics-api/src/main/resources/db/data.sql (3)
25-33
: 파일 구조가 잘 정리되어 있습니다.
파일 경로가 논리적으로 잘 구성되어 있으며, 파일명도 명확합니다.
35-39
: 데이터 구조와 참조가 올바르게 구성되어 있습니다.
파일 참조와 URL 구조가 일관성 있게 잘 작성되어 있습니다.
42-57
: 게시글 내용은 잘 작성되었으나, 작성자 ID 참조에 문제가 있습니다.
게시글의 내용과 구조는 실제 운영 환경과 유사하게 잘 작성되었습니다. 하지만 앞서 언급된 것처럼 존재하지 않는 작성자 ID(202412345)를 참조하고 있습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인이 늦었습니다! 코멘트 하나만 검토 부탁드립니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM👍
Summary
Tasks