Project on Oracle MySqL

Embed Size (px)

Citation preview

  • 7/29/2019 Project on Oracle MySqL

    1/15

    -Group project-

    Webpage design and implementation

    Catchup - Social network

    Group members: Professor:

    Bekta Dino Vedad Hulusi

    Hadi Dina

    Hajdarevi Amela

    Sarajevo, January 2013.

  • 7/29/2019 Project on Oracle MySqL

    2/15

    2

    Contents

    1. Abstract .................................................................................................................................. 32.Introduction ............................................................................................................................. 43. Project Implementation .......................................................................................................... 5

    3.1. Data Collection and The Database .............................................................................. 53.2. Layout .......................................................................................................................... 93.3. Design ........................................................................................................................ 103.4. Functionalities ........................................................................................................... 10

    4. Lessons Learned and Conclusions ....................................................................................... 144.1. Lessons Learned ........................................................................................................ 144.2. Conclusion ................................................................................................................. 14

    5. References ............................................................................................................................ 15

  • 7/29/2019 Project on Oracle MySqL

    3/15

    3

    1. Abstract

    The aim of our project was to develop an application that will contain locations in Sarajevo

    and contain registered users, which will have the ability to check in those location, add

    friends, and see where are users friends. Also the aim of our project is to connect people and

    help them to see what are the popular locations at the moment online, without going out and

    actually going at that location.

    We have implemented a database with 4 entities and 4 relationships using phpMyadmin and

    MySQL. We have created several procedures in purpose for the application to allow check-ins

    to be stored inside the database in correct manner. Also, we have created many queries in

    MySQL that list, group and manage required data.

    Concerning PHP language, we have also used several queries that are the main part when

    concerning functionalities of our website. With creating PHP files and connecting them with

    MySQL database we made the website that is fully functional and has abilities:

    - Registering new users

    - Login and log out of registered users

    - Viewing locations

    - Checking in

    - Seeing who is at the location of users certain interests

    -Viewing all registered users

    -Adding friends

    -Viewing friends lists

    -Changing password

  • 7/29/2019 Project on Oracle MySqL

    4/15

    4

    2.Introduction

    This application is based on the idea for users to check-in into certain places within Sarajevo.

    Other features are: registration for the users in order to use the application, sign in and sign

    out functionalities, list and check in into certain location, list of users friends that are

    currently at that location, list of users friends in general, add or delete friend functionalities

    and list of people in general that are also registered to our website.

    Basically, our idea has arisen in our investigation phase when we discovered that it would be

    fun to mix several functionalities of popular social networks currently operating on World

    Wide Web. We decided to use the idea of Foursquare (foursquare.com) and Facebook

    (facebook.com) and mix up their functionalities to come up with our own original ideas.

    Our application has 2 main functionalities. First is to check in at certain location and second is

    to see who is currently at that location out of your friends list. We have also been

    implementing the idea for suggested friends based on their go out habits and this idea is still

    in the implementation phase. Nevertheless, main parts of our application are fully functional

    and we aim only to improve our application through adding of these additional features.

    With Catchup (www.bid.ba/catchup) users are forced to use out application in least short

    amount of time required. It is not addictive in a way of facebook, it gives no gossip features

    except for the idea to see where your friends go out at the moment and to meet new ones. The

    whole process except for the registration part which takes 10 to 20 seconds to finish is very

    short. It consists of clicking on your location, clicking the check in button and that is it. Your

    friends will also go through several locations and when they click on some, they will be

    showed who of their friends is at that location at the moment. In the future, our progress will

    be based on the idea for suggested friends and the idea for making an Android and IOS

    application for the smartphones.

  • 7/29/2019 Project on Oracle MySqL

    5/15

    5

    3. Project Implementation

    3.1. Data Collection and The Database

    Our database is consisted out of four tables: LOCATION,USERS,FRIENDS andCHECKINS.

    Below is a description of all tables and their attributes.

    The table LOCATION has ten attributes:

    The attribute L_NUM is the primary key and uniquely identifies each row.

    L_NUM int(5)

    L_NAME varchar(20)

    L_TYPE varchar(20)

    L_OPEN varchar(5)

    L_CLOSE varchar(5)

    L_ADDRESS varchar(30)

    L_PHONE varchar(16)

    L_EMAIL varchar(30)

    L_SITE varchar(30)

    L_CAPACITY int(4)

  • 7/29/2019 Project on Oracle MySqL

    6/15

    6

    The table CHECKINS has 5 attributes:

    CIN_NUM int(6)

    CIN_IN datetime

    CIN_OUT datetime

    LOCATION int(5)

    USERS int(5)

    The attribute CIN_NUM is the primary key and uniquely identifies each row.

    The attribute LOCATION is the foreign key1 and refers to the LOCATION table.

    The attribute USER is the foreign key2 and refers to the USER table.

    The table USERS has ten attributes:

    U_NUM int(5)

    U_LNAME varchar(20)

    U_FNAME varchar(20)

    U_NAME varchar(20)

    U_EMAIL varchar(30)

    U_PHONE varchar(16)

    U_DOB date

    U_SIGNIN datetime

    U_GENDER varchar(6)

    U_PASSWORD varchar(40)

    The attribute U_NUM is the primary key and uniquely identifies each row.

  • 7/29/2019 Project on Oracle MySqL

    7/15

    7

    The table FRIENDS has 3 attributes:

    USER1 int(5)

    USER2 int(5)

    FIENDS_SINCE date

    The attributes USER1 and USER2 are the primary key (two headed) and uniquely identifies

    each row.

    The attributes USER1 and USER2 are also the foreign key1 and foreign key2 and refer to the

    table USER.

    Entity Relationship Diagram:

    LOCATION

    PK L_NUM

    L_NAME

    L_TYPE

    L_OPEN

    L_CLOSE

    L_ADDRESS

    L_PHONE

    L_EMAIL

    L_SITE

    L_CAPACITY

    CHECKINS

    PK CIN_NUM

    CIN_OUT

    CIN_IN

    FK1 LOCATION

    FK2 USER

    USERS

    PK U_NUM

    U_LNAME

    U_FNAMEU_NAME

    U_EMAIL

    U_PHONE

    U_DOB

    U_SIGNIN

    U_GENDER

    U_PASSWORD

    FRIENDS

    PK,FK1 USER1

    PK,FK2 USER2

    FRIENDS_SINCE

  • 7/29/2019 Project on Oracle MySqL

    8/15

    8

    Business Rules:

    A location may have zero or more check-ins, and a check in may be made on zero or one

    location.

    A user may check in, a check in may be made by zero or one user.

    A user can have zero or more friends.

    And each friend is also a user, that can have zero or more friends.

  • 7/29/2019 Project on Oracle MySqL

    9/15

    9

    3.2. Layout

    Our Website consists of two main layouts.

    The first is the login page. When the user goes to our site he first have to login or register.

    The second main layout is the logged in page. When user is logged in he can visit variouslinks and other parts of our website.

  • 7/29/2019 Project on Oracle MySqL

    10/15

    10

    3.3. Design

    In the design stage we tried to make the site as simple as possible for the users. We used the

    minimalist design for our site because it has many benefits. Our site loads faster, takes fewer

    server resources, and was faster to develop than more graphically complicated designs. Plus,

    it gives a professional, clean impression to visitors. The dominating colors at our page are redand black with white backgrounds. Additionally we have used different color shades the links

    and special functions at our website.

    Usage of a small amount of text and pictures allows our users to easily brows through the site

    and focus on the main points.

    3.4. Functionalities

    Our website has many functionalities.

    First of all is the actual registration for new users and login for registered users.

    *NOTE: The HTML and PHP code can be found in the application in the attachment files:

    - index.php

    - registration.php

    When the user is registered and logged in he can access all the other functionalities of our site.

    Also, when the user access the main page has the opportunity to log out immediately.

    The next opportunity is to view all locations that are listed at our site and to see the details of

    the location as well as to see which of users and users friends are at that certain location.

  • 7/29/2019 Project on Oracle MySqL

    11/15

    11

    Also, when clicked on certain location the user can check in at that location. In this way he

    will automatically saved in our database and his friends will be able to check where he is.

    Also when clicked on a certain location, that user is allowed to see who of the registered users

    is present at this location.

  • 7/29/2019 Project on Oracle MySqL

    12/15

    12

    The next functionality is that the logged in user can see his friends and to delete friends from

    his friend list at the will.

    The next functionality is that the logged in user can see all people that are registered at oursite and to add them as friends.

  • 7/29/2019 Project on Oracle MySqL

    13/15

    13

    The last funcionality is that the logged in user can change his password and in this way

    protect his data.

  • 7/29/2019 Project on Oracle MySqL

    14/15

    14

    4. Lessons Learned and Conclusions

    4.1. Lessons Learned

    First of all, we are very satisfied about the work we have done in this project. Initially, we setour main objectives and have fully fullfilled them. The next thing is concerning the

    functionalities our application aimed to support. We have several functionalities which are

    very important to the overall project objectives and thus, we decided to use minimalist design

    so our users can easily manage when browsing through the web-page.

    Secondly, since this is our first project of this nature, we have been aware that the time

    scheduling is the most important part. Thus, we have managed our time of writing the code,

    and implementing it in PHP, HTML and MySQL. In lessons we have learned how to use

    properly CSS, how to operate with MySQL database and how to connect PHP and MySQL.

    The issues we had problem with, are solved through the usage of our book and through the

    help of our course assistant. Concerning the design, we knew that the webpage should be

    user-friendly and approachable to everyone. Throughout our lectures we have learned that the

    design is the most important side of the webpage development itself. We improved our skills

    in CSS, PHP and HTML, using block elements. We learned also that clearly written code,

    allows in the future to locate the potentional errors and add additional features.

    4.2. Conclusion

    In conclusion, the most important thing to each one of us as the members of our group is that

    we initially planned our time properly. This allowed us to finish everything planned in time

    and to work on details in order to improve our project. Additionally, we still have in plan

    some improvements concerning the idea of suggesting friends based on their go out

    preferences, creating search bar for locations and features such as comments on locations,

    rating of them and eventually, expansion of our database within Sarajevo.

  • 7/29/2019 Project on Oracle MySqL

    15/15

    15

    5. References

    [1] PHP and MySQL dor Dynamic Web Sites, fourth edition, Larry Ullman, Peachpit

    Press, 2012

    [2] 12.7. Dateand Time Functions, Internet:

    http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_datediff,

    [2012 Dec 13]

    [3] "w3school the worlds largest web developmentsite, Internet:

    http://www.w3schools.com/, [2012 Dec 1]

    http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_datediffhttp://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_datediffhttp://www.w3schools.com/http://www.w3schools.com/http://www.w3schools.com/http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_datediff