Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
TAPAN DESAI
IST 659: PROJECT IMPLEMENTATION REPORT
GROCERY STOP
DATABASE MANAGEMENT TOOL
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 1
SECTION II: PROJECT SUMMARY
Background:
There are more than 20,0...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 2
Currently there is no platform where people can view information...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 3
SECTION III: ENTITY, ATTRIBUTE TABLES AND RELATIONAL DATA
MODEL
...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 4
information relating to
the store. But any
grocery information
r...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 5
StartPoint Starting point of the trip
EndPoint Ending point of t...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 6
BUSINESS RULES:
 Administrator can add or delete data entries i...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 7
CONSTRAINT userName_PK PRIMARY KEY (userName)
);
USERLOGIN TABLE...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 8
ADMIN TABLE (IF THE USER IS ‘A’ TYPE):
-- Separate table to stor...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 9
STORE TABLE:
--create table for store.
create table GSstore(
sto...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 10
CONSTRAINT userName_FK4 FOREIGN KEY (userName) REFERENCES GSuse...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 11
INSERT INTO GSuser VALUES ( 'brian', '3156789032', 'brian@gmail...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 12
INSERT INTO GSuserLogin VALUES ('joey', 'spock');
INSERT INTO G...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 13
INSERT INTO GSstore VALUES('India Bazaar', 'General', '9 AM - 8...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 14
INSERT DATA IN TRAVEL INFORMATION TABLE:
--insert into travel i...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 15
INSERT DATA IN GROCERY INFORMATION TABLE:
--insert into Grocery...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 16
FROM dbo_TravelInfo INNER JOIN (dbo_GSstore INNER JOIN dbo_GSIn...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 17
2. SEARCH FOR A PARTICULAR USER:
The users can search for a par...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 18
This is a paramterized query where user can enter the name of t...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 19
A parameterized query which shows the users residing in a parti...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 20
4. QUERY BASED ON DATE FOR ADMINS TO GROUP GROCERY INFORMATION:...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 21
This query is used by the administrator to search dates and gro...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 22
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 23
Non-Registered User Main Page:
This is the main page for non0re...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 24
Non-Registered User Grocery Information:
This form shows the gr...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 25
Registration Form:
The non-registered user can login using this...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 26
Add Store Form:
Only the administrator can add a new store usin...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 27
Delete By Dates:
The admin can query the database by entering t...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 28
Delete Users:
The administrator can easily delete users using t...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 29
Customer Successful Login:
When any user enters the right crede...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 30
Grocery Information Form for Customers:
This is the main page f...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 31
Travel Information Page for Customers:
The customers can add ne...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 32
Customer Store Search Query Form:
Customers can query the datab...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 33
Customer User Search Query Form:
The customers can query userna...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 34
Customer Area of Residence Query Form:
Customers can query the ...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 35
Store Timings Report:
Using this report the customers can view ...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 36
Users by Area Query Report:
This report is generated based on a...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 37
Report Based on User Name Query:
This report is generated based...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 38
The three users have constraints which are described below:
Non...
Grocery Stop: Database Management Tool
Tapan Desai
PAGE 39
SECTION VIII: FUTURE SCOPE
The project has a great future if ca...
Upcoming SlideShare
Loading in …5
×

Grocery Station- Database Management System Project

9,111 views

Published on

Database Management System Project

Published in: Data & Analytics
  • Be the first to comment

Grocery Station- Database Management System Project

  1. 1. TAPAN DESAI IST 659: PROJECT IMPLEMENTATION REPORT GROCERY STOP DATABASE MANAGEMENT TOOL
  2. 2. Grocery Stop: Database Management Tool Tapan Desai PAGE 1 SECTION II: PROJECT SUMMARY Background: There are more than 20,000 students in Syracuse University. Each student have their individual food requirements. Every student has to go to a nearby grocery store and buy the products they desire. Usually grocery shopping is done house wise where the students travel to nearby supermarkets like Walmart, India Bazaar or Price Rite by ordering a cab and purchase groceries every week. The process is cumbersome and not everyone has the time to go to these marts every week. While all the houses go for grocery shopping there is no method to coordinate or know who all are going to a supermarket and on which day. If this information is available on some platform, students can better coordinate and save their travelling expense or share a ride to the same place.
  3. 3. Grocery Stop: Database Management Tool Tapan Desai PAGE 2 Currently there is no platform where people can view information regarding grocery shopping, share a cab to nearest supermarket or coordinate their time of visiting these markets. So there is a need for an efficient solution to solve this issue and better organize the entire process. The developed solution is GROCERY STOP. A database management tool which provides the following functionalities:  Students can register and add their shopping trips in Grocery Stop. Only the registered users can add and view grocery information while the non-registered users can only view information.  The grocery information includes user name, name of store, date and time of visit along with the mode of travel, available space, fare and start and end point for travelers.  Students can easily collaborate with other users by viewing Grocery Stop. Students can share cabs to the same store or can ask their friends to purchase products for them.  The administrator is allowed to delete grocery entries along with users. Only the administrator can add a new store.  Grocery Stop will have three separate views for registered users, non-registered users and administrator.
  4. 4. Grocery Stop: Database Management Tool Tapan Desai PAGE 3 SECTION III: ENTITY, ATTRIBUTE TABLES AND RELATIONAL DATA MODEL ENTITY AND ATTRIBUTE TABLE: Below are the entity and their attribute table along with explanation. Table Name Attributes Explanation/ Glossary User Stores the information of the user. Also stores the type of the user. A user can either be customer or administrator. A user can have only one user login entry PK: UserName Stores the unique user name ContactNumber Stores the user contact number Email Stores the user email ID. Type Stores the type of user. C for Customer, A for Administrator Customer Stores the information if the user is a customer. A customer can have many grocery entries. PK and FK: UserName FK from user table AreaOfResidence Stores the address of the user. So when other users are checking Grocery Information Table they can check this Area of residence as well. Administrator Stores information of the administrator. Administrator can update many grocery entries. PK and FK: UserName It’s a FK from the user table Store Store is the information of the store. Can be updated only by the administrator. A store can have many grocery
  5. 5. Grocery Stop: Database Management Tool Tapan Desai PAGE 4 information relating to the store. But any grocery information relates to only one particular store PK: StoreID It’s a primary key for this table. Stores the ID (unique) StoreName Name of the store TypeOfGrocery Stores the type of grocery that is available eg. Indian, General etc. Timings Opening and Closing timing of store. Grocery Information Stores information of shopping details added by the user. Any grocery information can relate to only one user. Any grocery information can relate only to one travel and store information PK: InformationId PK. Auto Number FK: UserName FK from the User Table FK: StoreID FK from Store Table FK: TravelInfoId FK from Travel Information DateOfVisit Stores the date of visit of that user to the store TimeOfVisit Stores time when the user is planning to visit Comments Not required. Users can add additional comments like ready to bring stuff for others etc. Travel Information Stores information relating to travel method of the user. A travel information will be relating to only one grocery information PK: TravelInfoId Primary Key TravelMethod Which mode of transport is planned by the user eg. Cab, ZipCar, Bus UserName FK from User Table
  6. 6. Grocery Stop: Database Management Tool Tapan Desai PAGE 5 StartPoint Starting point of the trip EndPoint Ending point of the trip Fare Fare of the cab, bus or car. Available Space Available space in the mode selected. Not required. StoreNameTravel Name of the store user is traveling UserLogin Stores and accesses login information of the user. User login information relates to only user. PK: UserName FK from user Password User Password RELATIONAL DATA MODEL: Below is the data model for Grocery Stop:
  7. 7. Grocery Stop: Database Management Tool Tapan Desai PAGE 6 BUSINESS RULES:  Administrator can add or delete data entries in grocery information.  Administrator can add and update stores. Only admin can add a new store  Non Registered users can also view grocery and travel information. Their entity is not added since the database management tool doesn’t store any related information.  Data Entries will be deleted once the DateOfVisit in Grocery Information table is passed by the administrator  Non registered can register to gain access database  Customer can add and view travel information. Travel fare needs to be included.  User can add any number of grocery and travel entries.  All the travel entries must relate to one grocery entry. It’s not mandatory to mention travel information in every grocery information for the customers SECTION IV: DATABASE INFRASTUCTURE The database system infrastructure used is based on a client-server model. SQL Server is used as the database engine and Access is used as the interface design tool. Data is inserted, deleted, updated, and queried from the SQL Server database with the help of forms on Access. Useful data stored on the SQL Server database can also be viewed with the help of reports generated through Access. Based on a login checked on Access users are allowed to access the database in SQL. SECTION V: SQL SCRIPTS FOR CREATING TABLES AND INSERTING SAMPLE DATAS: 1. CREATE TABLES: USER TABLE: -- Creating table USER. Checking if user type is Customer or Administrator. UserName is the PK as seen in the script. create table GSuser ( userName VARCHAR(10) NOT NULL, userContactNumber VARCHAR(30) NOT NULL, userEmail VARCHAR(30) NOT NULL, userType VARCHAR (1) NOT NULL check (userType IN ('C' , 'A'))
  8. 8. Grocery Stop: Database Management Tool Tapan Desai PAGE 7 CONSTRAINT userName_PK PRIMARY KEY (userName) ); USERLOGIN TABLE: --Create User Login table to store password. create table GSuserLogin ( userName VARCHAR(10) NOT NULL, userPassword VARCHAR(12) NOT NULL, CONSTRAINT userName_PK1 PRIMARY KEY (userName), CONSTRAINT userName_FK FOREIGN KEY (userName) REFERENCES GSuser (userName) ); CUSTOMER TABLE(IF THE USER IS ‘C’ TYPE): --If the user is customer, area of residence is required. There is display of the user separate screen if a customer create table GSCustomer ( userName VARCHAR(10) NOT NULL, areaOfResidence VARCHAR(30)NOT NULL, CONSTRAINT userName_PK2 PRIMARY KEY (userName), CONSTRAINT userName_FK1 FOREIGN KEY (userName) REFERENCES GSuser (userName) );
  9. 9. Grocery Stop: Database Management Tool Tapan Desai PAGE 8 ADMIN TABLE (IF THE USER IS ‘A’ TYPE): -- Separate table to store admin information if the user is an administrator create table GSAdmin ( userName VARCHAR(10) NOT NULL, CONSTRAINT userName_PK3 PRIMARY KEY (userName), CONSTRAINT userName_FK2 FOREIGN KEY (userName) REFERENCES GSuser (userName) ); TRAVEL INFORMATION TABLE: -- Table for travel information create table TravelInfo ( travelInfoID INT IDENTITY(1,1) NOT NULL, userName varchar(10) NOT NULL, travelMode varchar(30) NOT NULL, travelStartPoint varchar(100) NOT NULL, travelEndPoint varchar(100) NOT NULL, travelFare VARCHAR(10) NOT NULL, availableSpace VARCHAR(10), CONSTRAINT travelInfoID_PK PRIMARY KEY (travelInfoID), CONSTRAINT userName_FK3 FOREIGN KEY (userName) REFERENCES GSuser (userName) );
  10. 10. Grocery Stop: Database Management Tool Tapan Desai PAGE 9 STORE TABLE: --create table for store. create table GSstore( storeID INT IDENTITY(1,1) NOT NULL, storeName VARCHAR(30) NOT NULL, typeOfGrocery VARCHAR(20) NOT NULL, storeTimings VARCHAR(30) NOT NULL, CONSTRAINT storeID_PK PRIMARY KEY(storeID), ); GROCERY INFORMATION TABLE: --create table for grocery information. --It has travel info as FK and user name, store id and GSInformationID as PK create table GSInformation ( GSInformationID INT IDENTITY(1,1) NOT NULL, storeID INT NOT NULL, travelInfoID INT, userName varchar (10) NOT NULL, dateOfVisit DATE NOT NULL, timeOfVisit TIME NOT NULL, GSUserComments VARCHAR(30), CONSTRAINT GSInformationID_PK PRIMARY KEY (GSInformationID), CONSTRAINT storeID_FK FOREIGN KEY (storeID) REFERENCES GSStore (storeID),
  11. 11. Grocery Stop: Database Management Tool Tapan Desai PAGE 10 CONSTRAINT userName_FK4 FOREIGN KEY (userName) REFERENCES GSuser (userName), CONSTRAINT travelInfoID_FK FOREIGN KEY (travelInfoID) REFERENCES TravelInfo(travelInfoID) ); 2. INSERTING DATA: INSERT DATA IN USER TABLE: --insert data in users INSERT INTO GSuser VALUES ( 'tapand', '3153807131', 'tdesai@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'desai', '3153807132', 'tapandesai@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'alex', '3153808000', 'alex@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'matthew', '3154506007', 'matthew@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'raj', '3153006078', 'raj@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'chandler', '3153803212', 'chandler@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'joey', '3153823456', 'joey@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'racheal', '3153803212', 'rachel@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'tyrion', '3153804005', 'tyrion@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'aditya', '3156789090', 'ad@gmail.com', 'C'); INSERT INTO GSuser VALUES ( 'ali', '3156780909', 'ali@gmail.com', 'C'); INSERT INTO GSuser VALUES ( 'anurina', '315789012', 'anu@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'Bhanu', '3156789090', 'bhanu@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'brenda', '3156789090', 'bre@syr.edu', 'C');
  12. 12. Grocery Stop: Database Management Tool Tapan Desai PAGE 11 INSERT INTO GSuser VALUES ( 'brian', '3156789032', 'brian@gmail.com', 'C'); INSERT INTO GSuser VALUES ( 'Huang', '3156789090', 'huang@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'joann', '3156789009', 'joann@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'moh', '3158900909', 'moh@syr.edu', 'C'); INSERT INTO GSuser VALUES ( 'petyr', '3150093131', 'tdesai@syr.edu', 'A'); INSERT DATA IN USER LOGIN TABLE: --insert data in user login table INSERT INTO GSuserLogin VALUES ('tapand', 'Hello'); INSERT INTO GSuserLogin VALUES ('desai', 'qwerty'); INSERT INTO GSuserLogin VALUES ('alex', 'rock'); INSERT INTO GSuserLogin VALUES ('matthew', 'paper'); INSERT INTO GSuserLogin VALUES ('raj', 'scissor'); INSERT INTO GSuserLogin VALUES ('chandler', 'lizard');
  13. 13. Grocery Stop: Database Management Tool Tapan Desai PAGE 12 INSERT INTO GSuserLogin VALUES ('joey', 'spock'); INSERT INTO GSuserLogin VALUES ('racheal', 'winter'); INSERT INTO GSuserLogin VALUES ('tyrion', 'is'); INSERT INTO GSuserLogin VALUES ('aditya', 'aditya'); INSERT INTO GSuserLogin VALUES ('ali', 'ali'); INSERT INTO GSuserLogin VALUES ('bhanu', 'bhanu'); INSERT INTO GSuserLogin VALUES ('brenda', 'brenda'); INSERT INTO GSuserLogin VALUES ('brian', 'brian'); INSERT INTO GSuserLogin VALUES ('Huang', 'huang'); INSERT INTO GSuserLogin VALUES ('Moh', '123'); INSERT INTO GSuserLogin VALUES ('viral', '12345'); INSERT INTO GSuserLogin VALUES ('zac', 'zac'); INSERT INTO GSuserLogin VALUES ('petyr', 'coming'); INSERT DATA IN STORE TABLE: --Inserting information in the store table INSERT INTO GSstore VALUES('walmart', 'General', '8 AM- 9 PM'); INSERT INTO GSstore VALUES('GRABYs', 'GENERAL', '9 AM-12 AM');
  14. 14. Grocery Stop: Database Management Tool Tapan Desai PAGE 13 INSERT INTO GSstore VALUES('India Bazaar', 'General', '9 AM - 8 PM'); INSERT INTO GSstore VALUES('Walmart', 'General', '12 AM - 12 AM'); INSERT INTO GSstore VALUES('BJs', 'General', '10 AM - 10 PM'); INSERT INTO GSstore VALUES('Price Rite', 'General', '10 AM-12 AM'); INSERT INTO GSstore VALUES('Lancaster Market', 'General', '10 AM-12AM'); INSERT DATA IN CUSTOMER TABLE: --insert into Customer table for users INSERT INTO GSCustomer VALUES ('aditya', 'Lancaster'); INSERT INTO GSCustomer VALUES ('ali', 'Westcott Street'); INSERT INTO GSCustomer VALUES ('anurina', 'Lancaster'); INSERT INTO GSCustomer VALUES ('Bhanu', 'Lancaster'); INSERT INTO GSCustomer VALUES ('brenda', 'Maryland'); INSERT INTO GSCustomer VALUES ('brian', 'Lancaster'); INSERT INTO GSCustomer VALUES ('Huang', 'Lancaster'); INSERT INTO GSCustomer VALUES ('chandler', 'Marshall Street'); INSERT INTO GSCustomer VALUES ('desai', 'Lancaster Road'); INSERT INTO GSCustomer VALUES ('joann', 'Lancaster'); INSERT INTO GSCustomer VALUES ('joey', 'Ackerman Street'); INSERT INTO GSCustomer VALUES ('Matthew', 'Maryland Avenue'); INSERT INTO GSCustomer VALUES ('racheal', 'Sumner Avenue');
  15. 15. Grocery Stop: Database Management Tool Tapan Desai PAGE 14 INSERT DATA IN TRAVEL INFORMATION TABLE: --insert into travel information table INSERT INTO TravelInfo VALUES ('joey','Car', 'Sumner Avenue', 'Sumner Avenue', '3$', '1', 'Walmart'); INSERT INTO TravelInfo VALUES ('desai','CAR', 'Westcott', 'Westcott', '3$', '2', 'BJs'); INSERT INTO TravelInfo VALUES ('raj','Car', 'Lancaster', 'Westcott', 'Free', '4', 'BJ`s'); INSERT INTO TravelInfo VALUES ('tyrion','Car', 'College Place', 'Lancaster', 'Free', '2', 'Walmart'); INSERT INTO TravelInfo VALUES ('tyrion','Taxi', 'College Place', 'College Place', '5$', '4', 'India Bazaar'); INSERT INTO TravelInfo VALUES ('bhanu','car', 'Lancaster', 'Lancaster', '3$', '4', 'Walmart');
  16. 16. Grocery Stop: Database Management Tool Tapan Desai PAGE 15 INSERT DATA IN GROCERY INFORMATION TABLE: --insert into Grocery Information table INSERT INTO GSInformation VALUES ('5','1','tyrion','2014-11-17','13:00'); INSERT INTO GSInformation VALUES ('1','1','moh','2014-11-24','15:00', 'Going Alone'); INSERT INTO GSInformation VALUES ('3','moh','2014-11-25','14:00'); INSERT INTO GSInformation VALUES ('4','6','tyrion','2014-11-25','13:00'); INSERT INTO GSInformation VALUES ('4','bhanu','2014-11-22','14:00', 'need company'); INSERT INTO GSInformation VALUES ('2','rahul','2014-11-22','14:00'); INSERT INTO GSInformation VALUES ('3','6','ali','2014-11-17','17:00'); INSERT INTO GSInformation VALUES ('1','8','huang','2014-11-24','13:00'); SECTION VI: SQL STATEMENTS FOR ANSWERING MAJOR DATA QUESTIONS 1. SEARCH FOR TRAVEL OPTIONS TO A PARTICULAR STORE: The user can search for particular stores and retrieve all the users going to the same store. The query joins Travel Information table with Store and Grocery Information SELECT dbo_GSstore.storeName, dbo_TravelInfo.userName, dbo_GSInformation.dateOfVisit, dbo_GSInformation.timeOfVisit, dbo_GSInformation.userName, dbo_TravelInfo.travelMode, dbo_TravelInfo.travelStartPoint, dbo_TravelInfo.travelEndPoint, dbo_TravelInfo.travelFare, dbo_TravelInfo.availableSpace
  17. 17. Grocery Stop: Database Management Tool Tapan Desai PAGE 16 FROM dbo_TravelInfo INNER JOIN (dbo_GSstore INNER JOIN dbo_GSInformation ON dbo_GSstore.[storeID] = dbo_GSInformation.[storeID]) ON dbo_TravelInfo.[travelInfoID] = dbo_GSInformation.[travelInfoID] WHERE (((dbo_GSstore.storeName)=[Store name?])); This form displays the grocery information page for the user. The search stores for available travel button triggers this query This is a parameterized query. It takes in value from this parameter and enter it in the database to generate reports Based on the parameter entered, the query displays report which is grouped by the store name entered. This report displays the available travel option to Walmart store.
  18. 18. Grocery Stop: Database Management Tool Tapan Desai PAGE 17 2. SEARCH FOR A PARTICULAR USER: The users can search for a particular user to retrieve their contact information. Using this query the user can query the database for information. The query joins user table to customer table SELECT dbo_GSuser.userName, dbo_GSuser.userContactNumber, dbo_GSuser.userEmail, dbo_GSCustomer.areaOfResidence FROM dbo_GSuser INNER JOIN dbo_GSCustomer ON dbo_GSuser.[userName] = dbo_GSCustomer.[userName] WHERE (((dbo_GSuser.userName)=[Name of the user?]));
  19. 19. Grocery Stop: Database Management Tool Tapan Desai PAGE 18 This is a paramterized query where user can enter the name of the user to gain customer information. Based on the query a report is generated joining two tables GSUser and GSCustomer. 3. SEARCH USERS BASED ON THEIR AREA OF RESIDENCE: The users can search for other users based on their area of residence. The query joins customer table with travel information, grocery information. SELECT dbo_GSCustomer.userName AS dbo_GSCustomer_userName, dbo_GSCustomer.areaOfResidence, dbo_GSInformation.userName AS dbo_GSInformation_userName, dbo_GSInformation.dateOfVisit, dbo_GSInformation.timeOfVisit, dbo_GSInformation.GSUserComments, dbo_TravelInfo.travelMode, dbo_TravelInfo.travelStartPoint, dbo_TravelInfo.travelEndPoint, dbo_TravelInfo.travelFare, dbo_TravelInfo.availableSpace, dbo_TravelInfo.storeNameTravel FROM dbo_GSCustomer INNER JOIN (dbo_TravelInfo INNER JOIN dbo_GSInformation ON dbo_TravelInfo.[travelInfoID] = dbo_GSInformation.[travelInfoID]) ON dbo_GSCustomer.[userName] = dbo_GSInformation.[userName] WHERE (((dbo_GSCustomer.areaOfResidence)=[Area of Residence?]));
  20. 20. Grocery Stop: Database Management Tool Tapan Desai PAGE 19 A parameterized query which shows the users residing in a particular area. Based on the entered query, information regarding the store name and travel method is displayed in this report.
  21. 21. Grocery Stop: Database Management Tool Tapan Desai PAGE 20 4. QUERY BASED ON DATE FOR ADMINS TO GROUP GROCERY INFORMATION: The admin can query using this query to retrieve information of all the users visiting a particular store on a particular date. The admin can easily search the date and delete the information based on this query SELECT dbo_GSInformation.[GSInformationID], dbo_GSInformation.[storeID], dbo_GSInformation.[travelInfoID], dbo_GSInformation.[userName], dbo_GSInformation.[dateOfVisit], dbo_GSInformation.[timeOfVisit], dbo_GSInformation.[GSUserComments] FROM dbo_GSInformation WHERE (((dbo_GSInformation.[dateOfVisit])=[Date of Visit?]));
  22. 22. Grocery Stop: Database Management Tool Tapan Desai PAGE 21 This query is used by the administrator to search dates and grocery information based on those dates. This query assists the administrator to easily delete information which has passed a particular date. The form generated based on that query has a delete button to ease the delete procedure. SECTION VII: INTERFACES 1. FORMS: LOGIN FORM: This is the login form for all the users. This is the main page. It checks the user login table for correct credentials.
  23. 23. Grocery Stop: Database Management Tool Tapan Desai PAGE 22
  24. 24. Grocery Stop: Database Management Tool Tapan Desai PAGE 23 Non-Registered User Main Page: This is the main page for non0registered users. They can only view the data and hence the data is in only read only mode. They can view grocery information and travel information.
  25. 25. Grocery Stop: Database Management Tool Tapan Desai PAGE 24 Non-Registered User Grocery Information: This form shows the grocery information for non-registered user. The data is limited and in read only format. Non-Registered User Travel Information: This form displays the travel information for non-registered user. The data is in read only mode.
  26. 26. Grocery Stop: Database Management Tool Tapan Desai PAGE 25 Registration Form: The non-registered user can login using this form. The form using access fills in data in three tables: GSUser, UserLogin and GSCustomer. Admin Main Page: This is the main page for the administrator. Includes add store, delete users and grocery records button.
  27. 27. Grocery Stop: Database Management Tool Tapan Desai PAGE 26 Add Store Form: Only the administrator can add a new store using this form. These stores and their information are then visible to customers. Delete Grocery Information: The admin can delete grocery information using this form.
  28. 28. Grocery Stop: Database Management Tool Tapan Desai PAGE 27 Delete By Dates: The admin can query the database by entering the date parameters. This query form easily helps admins to delete entries if the date has passed. The form is generated based on major database query.
  29. 29. Grocery Stop: Database Management Tool Tapan Desai PAGE 28 Delete Users: The administrator can easily delete users using this form. This form merges three tables and on the click of a button deletes entries from all three tables
  30. 30. Grocery Stop: Database Management Tool Tapan Desai PAGE 29 Customer Successful Login: When any user enters the right credentials, user is logged in Grocery Stop successfully.
  31. 31. Grocery Stop: Database Management Tool Tapan Desai PAGE 30 Grocery Information Form for Customers: This is the main page for the customers. The customers can add and view grocery information using this form. The information from other users is protected, so it’s not editable.
  32. 32. Grocery Stop: Database Management Tool Tapan Desai PAGE 31 Travel Information Page for Customers: The customers can add new travel information using this form. The travel information once added can be the updated in Grocery Information page.
  33. 33. Grocery Stop: Database Management Tool Tapan Desai PAGE 32 Customer Store Search Query Form: Customers can query the database for a particular store to check if any travel is available. The query form takes in parameterized entries.
  34. 34. Grocery Stop: Database Management Tool Tapan Desai PAGE 33 Customer User Search Query Form: The customers can query username to gain their contact information.
  35. 35. Grocery Stop: Database Management Tool Tapan Desai PAGE 34 Customer Area of Residence Query Form: Customers can query the database using this parameterized form for particular area of residence and the users living in that area. 2. REPORTS ANSWERING MAJOR DATA QUESTIONS: Travel Information of All Users: This report generates the travel information report of all the users. The information is grouped by the username and store the user is travelling for easy analysis. Using this report the other customers can analyse the users traveling to a particular store and the fare charged. Thus, they can opt for the cheapest option by analysing this report.
  36. 36. Grocery Stop: Database Management Tool Tapan Desai PAGE 35 Store Timings Report: Using this report the customers can view the stores added by the administrator. They can see information like timings and type of grocery provided to help them decide the store they will be traveling to that week or month.
  37. 37. Grocery Stop: Database Management Tool Tapan Desai PAGE 36 Users by Area Query Report: This report is generated based on area of residence search query. The users staying in a particular area can be viewed. This report groups the users by the store they are traveling and further eases out analysis. This report joins GSCustomer, GSStore and TravelInfo table together to provide easy analysis option. Report for Travel Information Based on Store Name Query: This report is generated from the store name query. As soon as the user enters the name of the store, travel information relating to that store is available for analysis.
  38. 38. Grocery Stop: Database Management Tool Tapan Desai PAGE 37 Report Based on User Name Query: This report is generated based on user name query. Contact information is available using this report for the entered users. SECTION VII: USER CONSTRAINTS Grocery Stop has three types of users which is depicted in a graphical format
  39. 39. Grocery Stop: Database Management Tool Tapan Desai PAGE 38 The three users have constraints which are described below: Non-Registered Users: 1. Not stored in the system, unless they register. 2. They can ONLY VIEW grocery information from users having travel information mentioned. They cannot view other users who haven’t mentioned their mode of travel. This exception helps to provide only a limited set of data for non-registered users urging them to register. 3. They can ONLY VIEW travel information of other users. This included mode of travel, fare and store name. 4. The non-registered users cannot view contact information for any users. 5. The non-registered users do not access any queries. Registered Users: 1. The registered users are a part of the system. Their information is entered while they register in three tables, namely GSUser, UserLogin, GSCustomer. 2. The registered users can enter new grocery information using the grocery information form. However, entries from other users is read only. 3. The registered user can add travel information and view reports showing all travel information from other customers. 4. The registered user can query the database based on username, area of residence and store name to analyze reports. 5. The registered users cannot delete any data from the database. Administrator: 1. The administrator has complete access to the database. 2. The administrator can edit all the forms and data include by the customers. 3. The administrator can delete data based on user name, the grocery information and travel information. 4. The administrator can query the database based on dates and delete grocery information. Thus, non-registered users can only view certain data. Registered users can add and view all data and also query the Database Tool to generate reports based on their queries. The administrator can view and delete all the data and maintain the database.
  40. 40. Grocery Stop: Database Management Tool Tapan Desai PAGE 39 SECTION VIII: FUTURE SCOPE The project has a great future if can be made available to masses. Major future scope is making the tool available over the internet. PHP can be used to provide the interface while connecting the back end to SQL database. Other scopes include allowing users to delete their own data, encrypting the passwords to provide further security, checking the authenticity of travel information and fares.

×