(CS2102) Group 4 Project Report
(CS2102) Group 4 Project Report
(CS2102) Group 4 Project Report
Report
Social Network - yourspace
yourspace is a social networking site that enables users to create, find and join
groups of their own interest.
Contents
1. Introduction ..........................................................................................................................................................2
1.1 Design..............................................................................................................................................................2
1.1.1 Design Specifications .............................................................................................................................2
2. Database Design ..................................................................................................................................................3
2.1 Entity-Relationship Diagram .......................................................................................................................3
2.2 Entities .............................................................................................................................................................4
2.3 Relationships ..................................................................................................................................................4
2.4 Database Schema (DDL code) ......................................................................................................................5
2.5 Schema Functions ..........................................................................................................................................6
3. Web page design ..................................................................................................................................................7
3.1 Main page .......................................................................................................................................................7
3.1.1 Login .........................................................................................................................................................7
3.1.2 Side bar (Interest group category index) .............................................................................................8
3.2 Sign-up page...................................................................................................................................................8
3.3 Profile page .....................................................................................................................................................8
3.3.1 Editing personal Profile .......................................................................................................................10
3.3.2 Joining an Interest Group ....................................................................................................................10
3.3.3 Leaving an Interest Group ..................................................................................................................12
3.3.5 Deleting an Interest Group(We nvr implement this part) ............ Error! Bookmark not defined.
3.4 Interest Group page.....................................................................................................................................13
3.4.1 Posting on the interest group wall .....................................................................................................13
3.4.2 Deleting posts ........................................................................................................................................16
3.4.3 Search posts ...........................................................................................................................................16
3.5 Page pagination for yourspace ..................................................................................................................17
1. Introduction
yourspace is a social networking site that enables users
to create, find and join groups of their own interest.
Within the interest groups, members can discuss and
network with one another through posts. The built-in
catalogue enables searching of groups and users.
1.1.1 Design
Specifications
Database Server:
MySQL 5.5.16 (RDBMS)
1.1 Design
Web Server:
Apache 2.2.21
2. Database Design
2.1 Entity-Relationship Diagram
2.2 Entities
users
Attribute
name
email (Primary Key)
password
Domain
Varchar(128)
Varchar(128)
Varchar(64)
interest_group
Attribute
groupname
description
groupID (Primary Key)
category
Domain
varchar(128)
varchar(255)
Int(5)
varchar(10)
post
Attribute
member_email_address (Primary Key)
post_content
groupID (Primary Key)
postDateTime
postdate
postID(Primary Key)
Domain
varchar(128)
varchar(255)
Int(5)
timestamp
time
Int(6)
2.3 Relationships
manages
Attribute
managerID
groupID
Domain
varchar(128)
Int(5)
members_list
Attribute
Member_email_address
groupID
Domain
varchar(128)
Int(5)
Note: As post is a weak entity, the one-to-one relation it has with wall is represented by the
post schema.
The main page of the website is also the login page which is shown in the screenshot below. Users who
have not signed up for an account can click on the sign up button at the left column which will direct
him to the sign up page.
The SQL query below is to retrieve all the users particulars so as to check if the password he has
entered for login is similar to the one he has registered with.
If the Email is not a registered one or the password has been entered incorrectly, the user will be
directed back to the login page.
This is the side panel that our members can use to navigate around the site.
We require that all the text fields are being filled and also, the password and retype password are being
checked if they are equal.
The SQL query below inserts the newly registered user into the database. Since the email address is the
primary key of the users table, we ensured that 2 of the same email address cannot be registered.
Members can update name and password of the account they registered in the signup page.
10
We used JavaScript as a means to ensure that they have entered the same password twice correctly.
Members can start joining groups. They select the groups available to them, submit the group id and
click on Join. Members cannot rejoin groups that they are already in. The listings of groups available
are done using Nested Query.
11
This is the SQL code for retrieving the groups that the members have joined.
12
This is the SQL code for deleting members who have joined.
Members can able to participate in the groups they have joined. They can key in their opinions in the
text box and click on the Add button to submit their post.
13
This is the SQL code for adding posts into the discussion forum.
14
15
Upon clicking on the Search link from the Group Discussion Posts page, the member enter the
search conditions they want and click the submit button. Any posts resembling their search terms will
be displayed.
16
The Search Results page will display posts similar to what they have searched for.
17
18
19
What it looks like for the users who are navigating pages.
20
21