Final Report: Godaddy Site
Final Report: Godaddy Site
Final Report: Godaddy Site
DBMS - CS351
GODADDY SITE
FINAL REPORT
Group no 8
14114068 Tarun Kumar
14114069 Tejal Singh
14114071 Vaibhav Gosain
Introduction
A domain name registrar is an organization or commercial entity that manages the reservation
of Internet domain names. The management is done in accordance with the guidelines of the
designated domain name registries.
Of the registrars who initially entered the market, many have continued to grow and outpace
rivals. Go Daddy is the largest registrar.
2
ER DIAGRAM
Assumption:
1. Users have already registered on godaddy and filled payment method details.
2. Godaddy’s system daily checks if there that day is due date of any user, notifies
him accordingly.
3. If user opts for site hosting fixed storage space is offered.
4. A registered user on goDaddySite can buy 0 or more domain names and a
particular site can be owned by at most one registered user.
5. A registered user can host zero or more site on goDaddySite.
6. A particular record can have one and only one corresponding site whereas a
particular site can have zero or more records associated with it.
3
Features
1. ‘sites’ Table enlists all the existing domain names registered with any domain
registrar. Thus it will help goDaddy system to check which domain names are
still available.
2. ‘users’ table has the names and contact details of all the registered users on
goDaddy.
3. user_goDaddySite contains information regarding any domain name registration
done via goDaddy.
a. dueDate: date when the next payment installment is due
b. paymentPeriod: period of installment , -1 if it is a one-time payment
c. paymentAmount: amount of installment
d. expiryDate: the date until which this domain name registration is valid
4. goDaddySite record contains all DNS records of domian names registered via
goDaddy.
a. recordType can be one of DNS record types like: A, CNAME, MX etc.
b. TTL: Time To Live for the particular record
5. Record_value : Value of each DNS record can be multivalued , hence these have
been stored in another table, to reduce redundancy.
6. goDaddy also provides the hosting server space if one opts for it.
user_hostedSite contains all records of sites hosted by goDaddy.
7. Expiry date tells date till when domain name will be flushed if not renewed.
However the due date is date till which if user dont pays then all records of
domain name are seized though domain name is not flushed.
4
SCHEMA
Tables Information:
CK = Candidate Key
PK = Primary Key
FD = Functional Dependency
site:
CK = siteId, domainName
PK = siteId
FD:
siteId -> domainName
domainName -> siteId
user:
CK = userId,email,contactNo.
PK = userId
FD:
userId -> email,name
email -> contactNo.
5
contactNo. -> userId
user_goDaddySite
PK = CK = goDaddySideId
FD:
goDaddySiteId -> userId,dueDate, p
aymentPeriod,
paymentAmount, expiryDate
user_hostedSite
PK = CK = (userId,hostServerIPAddress)
FD:
(userID,hostServerIdAddress)-> storageSpace, dueDate,
paymentPeriod, paymentAmount, expiryDate.
record_value
PK = CK = (recordId,recordValue)
recordType_info
CK = recordTypeId, recordType
PK = recordTypeId
FD:
recordTypeId-> recordType
recordType-> recordTypeId
Highest Normal Forms:
All the tables are in BCNF.
Table Creation Code:
CREATE TABLE `user_goDaddySite` (
`userId` int,
`goDaddySiteId` int,
`dueDate` DATE,
`paymentPeriod` int,
`paymentAmount` double,
`expiryDate` DATE,
PRIMARY KEY (`goDaddySiteId`)
);
6
`siteId` int,
`domainName` varchar(20),
PRIMARY KEY (`siteId`)
);
7
2. Display all subdomain names for a given domain name:
select domainName from site
where domainName like '%amanto.be';
3. For a given domain-name, display its expiry date if it is registered under goDaddy ( this
query will be useful if another user wants to know expiry date of a domain name he is
interested in ):
select expiryDate from user_goDaddySite as A, site as B
where A.goDaddySiteId = B.siteId and B.domainName = 'amanto.be';
8
4. All websites whose dueDate is within next 30 days (to notify user), print email-id for
corresponding users (useful to notify the concerned user):
select email, domainName, dueDate
from user as A, user_goDaddySite as B, site as C
where A.userId = B.userId and B.goDaddySiteId = C.siteId and DATE_ADD(CURDATE(),INTERVAL 30
DAY) > dueDate and CURDATE() <= dueDate;
-- NOTE: above query will check with respect to current date, using the CURDATE() function. To
compare with respect to someother date, replace CURDATE() everywhere with date , like
'2017-03-02'
5. All websites whose dueDate was yesterday ( we use this query to discontinue services
for those websites ):
select domainName
from user_goDaddySite a s A, site a s B
where A.goDaddySiteId = B.siteId a nd dueDate = DATE_SUB(CURDATE(),INTERVAL 1 DAY);
-- NOTE: above query will check with respect to current date, using the CURDATE() function. To
compare with respect to someother date, replace CURDATE() everywhere with date , like
'2017-05-03'
9
6. Update expiryDate for a website, when user renews his registration for a domain name
(standard Expiry duration is 365 days):
update user_goDaddySite as A, site as B
set expiryDate = DATE_ADD(expiryDate,INTERVAL 365 DAY)
where A.goDaddySiteId = B.siteId and B.domainName = 'amanto.be';
-- NOTE: input user name parameter for above query is: ‘Vaibhav Gosain’
10
8. Given a domain name, check if it is an alias of another website, and display that
website’s ip-address:
select B.recordValue
from goDaddySite_record as A, record_value as B
where A.recordId = B.recordId and A.recordTypeId =
(
select C.recordTypeId from recordType_info as C
where C.recordType = 'A'
)
and A.goDaddySiteId =
(
select D.siteId from site as D
where D.domainName in
(
select G.recordValue
from site as E, goDaddySite_record as F, record_value as G
where E.siteId = F.goDaddySiteId and F.recordId = G.recordId and F.recordTypeId =
(
select H.recordTypeId from recordType_info as H
where H.recordType = 'CNAME'
)
and E.domainName = 'morban.co.uk'
)
);
11
-- NOTE: input domain name parameter for above query is: ‘morban.co.uk’
10. Display userinfo for a user
select * from user where name = "Tarun Kumar";
12