URL S S: Hortening Ystem
URL S S: Hortening Ystem
CASE STUDY
URL SHORTENING
SYSTEM
Submitted By:-
Prince Bhanwra
ME – SE (1st Year)
Thapar University, Patiala
801031024
URL Shortening System
Process Description
Description: It validates the user input & makes it database safe &
database format or displays the appropriate error message. Also after
validation, it calls the appropriate function according to the type of
input.
Logical Flow:
1. If valid real escape strings, then
a. if valid regular expression, then
i. if ValidlongURL OR ValidAlias, then
Send data to create a shorten URL to process 1.2 (Generate
URL)
ii. else
Send as ValidShortURL data to 1.3 (Redirect) for redirection
b. else
display appropriate error message
2. else
display appropriate error message
URL Shortening System
Logical Flow:
1. It check the Valid URL/Alias provided by process 1.1 (Validate) for the
duplicate entry in Database
2. If duplicate URL found, then
a. If Alias is NOT provided, then
return the corresponding short URL
b. else
i. If duplicate Alias found, then
Display error message
ii. else
Generate the new short URL with Alias, update to the
database and return
3. else
a. If Alias is provided
Generate new Short URL with Alias, update to the database and
return
b. else
Generate new Short URL, update to the database and return
URL Shortening System
Logical Flow:
UpdatedTotalURLs, ErrorMsg
Logical Flow:
1. If duplicate URL found, then
Send the corresponding short URL data to process 1.2.3 (Generate
URLAlias)
2. else
Generate the new short URL, update to the database and send new Short
URL data to process 1.2.3 (Generate URLAlias)
URL Shortening System
Logical Summary:
Return ShortURL
.
URL Shortening System
Logical Flow:
.
URL Shortening System
Logical Summary:
screen
b. Else
Logical Summary:
.
URL Shortening System
Logical Summary:
Process Description
.
URL Shortening System
From: StatsDB
From: URLSettingsDB
To: URLSettingsDB
From: URLDB
From: URLDB
.
URL Shortening System
From: Admin
To: Admin
From: Admin
To: Admin
.
URL Shortening System
Database Description
URLDB
ID (integer)(Auto-increment)
AllShortURLs (string)
AllAlias (String)
AllURLs (String)
URLSettingsDB
TotalURLs (Integer)
StatsDB
ID (Integer)
URL (String)
URLStats (Integer)
URL Shortening System
Decision Table
1. LongURL is provided? Y Y N Y Y N N N N
2. Alias is provided? N Y N N Y N N N N
3. ShortURL is provided? N N Y N N N N N N
5. Is Premium User? - - - - - N N N Y
7. Is Administrator? N N N N N Y Y Y N
3. Share URL X X