Git Product home page Git Product logo

social-media-backend's Introduction

Social Media Backend

Social Media Backend built using Spring Boot with MySQL database.

Table of Content

Set-up

CREATE TABLE users ( 
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(40),
email varchar(400),
username varchar(40),
password varchar(4000),
role varchar(40),
PRIMARY KEY (id)
);

CREATE TABLE posts ( 
id int(11) NOT NULL AUTO_INCREMENT,
type varchar(20),
caption varchar(4000),
media_src varchar(4000),
user_id int(11),
created_by varchar(40),
created_dt DATETIME,
modified_by varchar(40),
modified_dt DATETIME,
PRIMARY KEY (id),

KEY `FK_USER_ID_idx` (`user_id`),

CONSTRAINT `FK_USER`
FOREIGN KEY (`user_id`)
REFERENCES `users` (`id`)

ON DELETE NO ACTION ON UPDATE NO ACTION
);
  

CREATE TABLE posts_metrics( 
id int(11) NOT NULL AUTO_INCREMENT,
views int(11),
post_id int(11),
created_by varchar(40),
created_dt DATETIME,
modified_by varchar(40),
modified_dt DATETIME,
PRIMARY KEY (id),

KEY `FK_POST_ID_idx` (`post_id`),

CONSTRAINT `FK_POST`
FOREIGN KEY (`post_id`)
REFERENCES `posts` (`id`)

ON DELETE NO ACTION ON UPDATE NO ACTION
);

social-media-backend's People

Contributors

s-yux avatar

Watchers

Yu Xiang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.