A Free Database Designer for Developers and Analysts

Table users {
id INT [primary key]
kakaoId BIGINT [not null]
name VARCHAR(255) [not null]
email VARCHAR(255) [not null, unique]
profileImage VARCHAR(255)
roadAddress VARCHAR(255)
detailAddress VARCHAR(255)
birthYear VARCHAR(4)
birthDate VARCHAR(8)
gender ENUM('MALE', 'FEMALE', 'NONE')
phoneNumber VARCHAR(20)
clothingSize VARCHAR(10)
totalDistance INT
fcmToken VARCHAR(255)
createdAt DATETIME [not null]
}
Table marathons {
id INT [primary key]
title VARCHAR(255)
registrationStartDateTime DATETIME
registrationEndDateTime DATETIME
raceStartTime DATETIME
accountBank VARCHAR(50)
accountNumber VARCHAR(50)
accountName VARCHAR(100)
location VARCHAR(255)
city VARCHAR(50)
year VARCHAR(4)
month VARCHAR(2)
region VARCHAR(50)
district VARCHAR(50)
qualifications TEXT
marathonStatus ENUM('OPEN', 'CLOSED', 'FINISHED')
viewCount INT
thumbnailImage VARCHAR(255)
infoImage VARCHAR(255)
courseImage VARCHAR(255)
formType INT
formUrl VARCHAR(255)
homeUrl VARCHAR(255)
}
Table marathon_types {
id INT [primary key]
marathonId INT [not null, ref: > marathons.id]
courseType INT
price VARCHAR(50)
etc TEXT
}
Table friends {
id INT [primary key]
userId INT [not null, ref: > users.id]
friendId INT [not null, ref: > users.id]
friendName VARCHAR(255)
}
Table user_marathons {
id INT [primary key]
userId INT [not null, ref: > users.id]
marathonId INT [not null, ref: > marathons.id]
address VARCHAR(255)
paymentType ENUM('KAKAO', 'BANK_DEPOSIT')
paymentAmount VARCHAR(50)
raceTime TIME
paymentDateTime DATETIME
marathonTypeId INT [ref: > marathon_types.id]
targetPace INT
endPace INT
runningTime INT
totalMemberCount INT
myRank INT
isEnd BOOLEAN
}