Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Objective The aim of this project is to design a database for a simple blogging

ID: 3714333 • Letter: O

Question

Objective The aim of this project is to design a database for a simple blogging platform using MySQL, Neo4j and MongoDB databases. Students are expected to gain an understanding of all the steps involved in using/designing relational, graph and document-based databases. Due Date Final report is due on April 19th, 2018 through elearn (11:59 p.m). Description • Each user can sign up with their name, lastname, and email. • A user may choose to “follow'' other users. • A user may post a blog which consists of a title and a feed. • Each post (blog) might have zero or more comments. • A blog may be liked by a user. • A blog may have multiple tags (zero or more). • A tag may be attached to multiple blogs (zero or more). • A comment or a blog should be able to deleted by the owner when needed. • There is no restriction of the number of characters for a feed or comment. • Login page – a person should be able to sign up. • Main page – displays blogs list according to the network of a user (his/her blogs and people he/she follows). • Profile page – list user’s profile information, the people he/she follows and feeds of that user. How to proceed? 1. [5 pts] Draw the ER diagram for RDBMS. Include this diagram in your report. 2. [5 pts] Draw the graph diagram (direct graph) for Neo4j. Include this diagram in your report. 3. [5 pts] Draw the UML class diagram for MongoDB. Include this diagram in your report. 4. [5 pts] Write SQL queries to implement your blogging database in MySQL. Include these queries in your report. 5. [5 pts] Write Cypher queries to implement your blogging database in Neo4j. Include these queries in your report. 6. [5 pts] Write queries to implement your blogging database in MongoDB. Include these queries in your report. 7. [5 pts] Implement (generate) your blogging database in MySQL. Include the screenshot of your database generated. 8. [5 pts] Implement (generate) your blogging database in Neo4j. Include the screenshot of your database generated. 9. [5 pts] Implement (generate) your blogging database in MongoDB. Include the screenshot of your database generated. 10. [5 pts] Using MySQL queries (SQL) o add at least 50 blog records with five different users to the MySQL database. o add at least five different users to the MySQL database. o include these queries in your report. 11. [5 pts] Using Neo4j queries (Cypher) o add at least 50 blog records to the Neo4j database. o add at least five different users to the Neo4j database. o these records should be same with the ones in 10. o include these queries in your report. 12. [5 pts] Using MongoDB queries o add at least 50 blogs records to the MongoDB database. o add at least five different users to the MongoDB database. o these records should be same with the

i just the need the SQL part

SEA CommENT text tng firshae at strig Objeetn Bla.blog a:created.on TAG tas CLoC stig. title Strina: Pec Date : created en

Explanation / Answer

As per your request, I send SQL queries to create table with primary and foreign keys and insert some sample values.

// create table user and email_id is primary key which contains user information( change size accordinly)

create table user (email_id varchar(20) Primary key, first_name varchar(20), last_name varchar(20),last_login date,creeated_on date, password varchar(10));

// create table blog, blog_id is primary key and email_id is foreign key which shows information related to blog

create table blog(blog_id int primary key,title varchar(20),blog_text varchar(255),blog_created date, blog_last_modified date,no_of_likes int(3),blog_created_by varchar(20) references user(email_id));

// create table comment, comment_id is primary key, email_id and blog_id are foreign keys which shows details related to a particular comment

create table comment(comment_id int primary key, text varchar(255), email_id varchar(20) references user, comment_created date, last_modified_comment date,blog_id int references blog);

// create table tag, tag_id is primary key, email_id and blog_id are foreign keys which store information related to tagged person

create table tag(tag_id int primary key,email_id varchar(20) references user,tag_created_on date,tag_on_blog blog_id int references blog);

// create table follows and email_id is foreign key which shows who follows who.

create table follows(email_id_follow_to varchar(20) references user(email_id),email_id_follow_by varchar(20) references user(email_id));

//insert some sample values

insert into user values ('abc@xyz.com','sam','tom','2017-06-15','2017-06-15','qwerty');

insert into user values('pqr@xyz.com','harry','potter','2018-02-15','2018-06-5','mnbvcvx');

insert into blog values (1,'sample','this is a sample blog','2017-03-1',2017-03-1',5,'pqr@xyz.com');

insert into comment values (1,'comment to test','abc@xyz.com','2017-03-01','2017-03-01',1);

insert into tag values(1,'pqr@xyz.com','2017-03-01',1);

insert into follows values ('abc@xyz.com','pqr@xyz.com');