# PRJ_3. 커뮤니티 게시판 앱_(10) 서버 준비와 DB 생성

728x90

🟦 43강. 서버 프로그래밍 준비

▶️ 서버 프로그래밍 개요

  • 안드로이드 애플리케이션과 통신할 서버 프로그램 구현 위한 준비 작업 수행
  • 서버는 jsp, spring, nodejs, python 등 웹 서비스를 위해 백 엔드 개발을 할 수 있는 것 중 편한 것 사용
  • 여기서는 jsp를 활용한다.

🟧 설치 소프트웨어

  • Java Development Kit : 8버전
  • Eclipse
  • Apache-Tomcat : 9버전
  • MySQL : 데이터베이스

🟦 44강. 데이터베이스 생성

▶️ 데이터베이스 테이블 구조

1) user_table : 사용자 회원 정보 테이블

2) board_table : 게시판 정보

3) content_table : 게시글 내용 정보

🟧 전체 테이블 구조 관계도

🟧 MySQL 에 Sql 쿼리문 작성

create database app3_community_db;

use app3_community_db;

create table user_table(
user_idx int not null primary key auto_increment,
user_id varchar(100) not null unique,
user_pw varchar(100) not null,
user_autologin int not null check(user_autologin in(0, 1)),
user_nick_name varchar(100) not null unique
);

create table board_table(
board_idx int not null primary key auto_increment,
board_name varchar(100) not null unique
);

insert into board_table (board_name) values ("게시판1");
insert into board_table (board_name) values ("게시판2");
insert into board_table (board_name) values ("게시판3");
insert into board_table (board_name) values ("게시판4");

create table content_table(
content_idx int not null primary key auto_increment,
content_board_idx int not null references board_table(board_idx),
content_writer_idx int not null references user_table(user_idx),
content_subject varchar(500) not null,
content_write_date datetime not null,
content_text longtext not null,
content_image varchar(500)
);

commit;
728x90