Skip to content
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

DB 설계 #5

Open
sallyjellyy opened this issue May 5, 2021 · 1 comment
Open

DB 설계 #5

sallyjellyy opened this issue May 5, 2021 · 1 comment
Assignees
Labels
BE Backend Develop

Comments

@sallyjellyy
Copy link
Owner

요구사항 분석을 토대로 한 ERD 과정

관계 설정은 아직..

Screen Shot 2021-05-05 at 2 28 22 PM

Originally posted by @min27604 in #3 (comment)

@sallyjellyy
Copy link
Owner Author

sallyjellyy commented May 5, 2021

여기까지 나온 스키마

CREATE TABLE IF NOT EXISTS `baseball`.`game` (
    `id` BIGINT PRIMARY KEY AUTO_INCREMENT,
    `home_team` VARCHAR(45) NOT NULL,
    `away_team` VARCHAR(45) NOT NULL
);

CREATE TABLE IF NOT EXISTS `baseball`.`team` (
    `id` BIGINT PRIMARY KEY AUTO_INCREMENT,
    `name` VARCHAR(45) NOT NULL,
    `is_home` TINYINT(1) NOT NULL,
    `is_playable` TINYINT(1) NOT NULL,
    `pitcher_id` BIGINT 
);

CREATE TABLE IF NOT EXISTS `baseball`.`player` (
    `id` BIGINT PRIMARY KEY AUTO_INCREMENT,
    `name` VARCHAR(45) NOT NULL,
    `at_bat` INT DEFAULT 0,
    `hit` INT DEFAULT 0,
    `out` INT DEFAULT 0,
    `batting_order` INT,
    `back_number` INT,
    `is_pitcher` TINYINT(1)
);

@sallyjellyy sallyjellyy self-assigned this May 5, 2021
@sallyjellyy sallyjellyy added the BE Backend Develop label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Backend Develop
Projects
None yet
Development

No branches or pull requests

1 participant