Online Shopping Store Website Project using C# and SQL

MY ONLINE SHOPPING STORE 

We have a physical shopping store, which is doing well in terms of revenue and margin. We want to increase the business by extending the availability of our products through online mechanisms. Quick time-to-market is the main criterion;

we are adding some features: 

  1. Home Page 
  2. Product Search facility 
  3. Product Detail Page 
  4. Add to Cart 
  5. Place Order

Use Case Diagram-Online Shopping Website:

The use case diagram is usually referred to as a behavior diagram used to describe the actions of all users in a system.

All users described in the use case are actors and the functionality is the action of the system.

The use case for an online  shopping website:

Specification of Use Cases:

Use Case                                      Home page

Home Page

Element

Details

Actor

User

Trigger

With or without authentication

Pre Conditions

Various Categories of the items are displayed

Post Conditions

On clicking each category, various sub-items are to be displayed

Normal course

1.      On hovering various categories are displayed

2.      On each Category, the subcategories are displayed

 

Use Case                      Search Product

Search Product

Element

Details

Actor

User

Trigger

On clicking the search bar for the item to be searched.

Pre Conditions

 Users can check the items they needed

Post Conditions

The various items of the searched product are displayed

Normal course

1.      User enters the Product name or product category

2.      The various items of the product are displayed

Use Case                                      GetAllProducts

GetAllProducts

Element

Details

Actor

User

Trigger

With or without authentication

Pre Conditions

The user needs to enter a product name

Post Conditions

The sub-list of all the items should be displayed.

Normal course

1.      The various products should be displayed varying in different perspectives

Use Case                                      GetProductDetails

Get Product Details

Element

Details

Actor

User

Trigger

On clicking a particular item the info about the product is to be displayed.

Pre Conditions

The user needs to enter the product name or category

Post Conditions

The total info regarding the product is to be displayed

Normal course

1.      User enters the Product name and then submits

2.      The fetching records will be displayed

Use Case                                      AddProduct

Add Product

Element

Details

Actor

Admin

Trigger

When the User Quantity is not available

Pre Conditions

 Checks whether the searched item is available in the inventory or not

Post Conditions

The user can search for the prescribed item

Normal course

1.      Admin checks in the inventory stock

2.      During the period of offers or when the inventory is not available to the users, he adds to the database.

Use Case                                      Delete Product

Delete Product

Element

Details

Actor

Admin

Trigger

When the offer period is completed

Pre Conditions

 Refactoring the product as per the daily market price

Post Conditions

The product is not available after the deletion.

Normal course

1.      Admin login using his credentials

2.      Search for the product to be deleted

3.      Deletes the particular products

Use Case                                      Edit Product

Edit Product

Element

Details

Actor

Admin

Trigger

When the product needs to be updated during the season sale

Pre Conditions

 The product may vary in its cost and delivery

Post Conditions

The product has been updated regarding the information

Normal course

1.      Admin logins using his credentials

2.      Updates the selected products in the inventory.

Use Case                                      Add To Cart

Add To Cart

Element

Details

Actor

User

Trigger

When a user needs to buy the item at a later point in time

Pre Conditions

 If the user likes a particular product he can choose to buy it by clicking the Add To Cart

   

Post Conditions

The selected items are available later until the selected product is available

Normal course

1.      User selects the particular product

2.      He then clicks on Add To Cart.

3.      The liked items are available for later usage

 Use Case                                     BuyNow

BuyNow

Element

Details

Actor

User

Trigger

With  authentication

Pre Conditions

The total amount should be displayed.

Post Conditions

On Clicking the order needs to be placed.

Normal course

1.      Click on Buy Now, select the items and then go to payment

2.      The order should be placed after payment.

Shopping cart System ER Diagram:

ER Diagram:

Flow Chart For Online Shopping system:

Database Table Design:

ProductCategory:

Field Name

Type

Remark

CategoryId

Int

PK

CategoryName

Nvarchar(50)

 

Products:

Field Name

Type

Remark

Id

int

PK

CategoryId

int

FK

Price

Float

 

Quantity

Int

 

Description

Nvarchar(Max)

 

Picture

Nchar(100)

 

CartItem: 

FieldName

Type

Remark

Id

Int

FK

Price

Float

 

Quantity

Int

 

 

DBMS Project on Student Management System

Student Management System is purely developed by using DBMS queries. The main functions involved to develop this project is developing ER diagram, DDL/DML, SQL constraints,  Retrieving data using the select function, Restrictions, and sorting functions,  Aggregate, and grouping, Single row function, Joins, and finally Subquery.

ER DIAGRAM OF STUDENT MANAGEMENT SYSTEM

DDL AND DML

1) Create a table name student and attribute of s_id, first last and middle name, address, email, city, and state.

2) Display the datatype of all attributes in the student table?

3) Insert values into the table student?

4) Change the datatype of s_id in the student table?

5) Update the city of s_id=001 to bby?

SQL CONSTRAINTS

1) Create a table name student with an attribute s_id that is not null?

2) Create a table name student with an attribute s_id that is unique?

3) Create a table name student with an attribute s_id which is a primary key?

4) Create a table name teacher with an attribute s_id which is a foreign key and team name?

5) Create a table name student and with an attributes city which a default constraints “KOLKATA”?

RETRIEVING DATA USING SELECT

1) Display all the columns of the table name course?

2) Display the columns c_name aliases course name of table name course?

3) Display the columns c_fee and c_name using concatenation and aliases course details of table name course?

4) Display the course fee and increase in course fee by 3000 where the course duration is 45_hr?

5) Remove the duplicate value from course duration with a student ID from the table name course?

RESTRICTIONS AND SORTING

1) Display the student ID and the first name from the table name student whose state is westbengal?

2) Display all the data of the table course whose course ID is ‘11’.

3) Display all the data of the table course whose course fee range is less than 100000?

4) Display the Lastname and city of the table student where the student’s first name starts with ‘a’ and consists of 4 characters?

5) Display the course fee of the table name course which is between 10000 to 50000?

AGGREGATE AND GROUPING

1) Display the average course fee for all the courses in the given table?

2) Display the minimum and maximum course fees in the given table?

3) Display the count number of course names from the table name course?

4) Display the total course fee in the table name course?

5) Display the student ID and minimum course fee from the course table and group by student ID having a course fee less than 102000 and sort the minimum course fee in descending order?

SINGLE ROW FUNCTION

1) Display the student ID and student first name and state from the student table where convert student first name and state into uppercase?

2) Display the student ID and student first name and state from the student table where convert student first name and state into lowercase?

3) Display the student ID and student state from table student and change the first character of all states to uppercase?

4) Display the student ID and student first name middle name last name together from the table student use the character-manipulation function?

5) Display the student ID and the length of the first name and the last name from the table student using the character-manipulation function.

JOINS

1) Display the registration number for the user’s table and the student’s first name on the table student use inner join?

2) Display the registration number for the user’s table and the student’s first name on the table student use left join and order by the first name.

3) Display the registration number for the user’s table and the student’s first name and last name from the table student use the right join and order by registration number.

4) Select all teachers and all courses in the given table using full join and order by teacher ID.

5) Select all students’ first names and last names and city in the given table using self-join and order by the city?

SUBQUERY

1) Display the first middle and last name of the student where the course fee is minimum?

2) Display the teacher ID and first middle and last name of the teacher where the course name is DBMS?

3) Display the phone number of the student of who’s registration number is 20?

4) Display the registration number who live in Jaipur?

5) Display teacher ID first name and phone number whose qualification is b.tech?

Online Learning Management System PHP Project

Objectives of the Project:-

The general objective of this Online Learning Management System project is to provide various courses to students as well as others who are interested in learning online. The use of the internet has increased and so the courses are available to be learned online. By providing this option, it would be easy for the users to learn by sitting in a comfortable place and learning based on the time they have.

The courses will be added, deleted, etc. by the admin. This project consists of the front end and back end sides. The front end side of the website is developed for the general public who are interested to know about us and to find out the courses provided by the management system. The back end is for the users who have created their accounts and admin utilities.

Scope of the Project:-

For this project, to store all the data various tables and attributes are required. As the main idea of this project is to provide courses for the students to enroll in and learn, it will also allow the instructors to teach courses. Thus the scope of this project is limited to the following tables: COURSES, USER DETAILS, STUDENTXREF, and INSTRUCTORXREF.

User requirements:-

Following would be the basic user requirements-

  1. Users should be able to view the Home page, About Us, and login/Register page of the website.
  2. Users should be able to search for the courses in which they are interested.
  3. Users will be asked to enter the user type as Student, or Instructor while creating the account.
  4. Users who have been marked as Students will be allowed to enroll in the available courses and will be displayed the courses in which they are already enrolled.
  5. Users marked as Instructors will be able to teach the course which is not taught by anyone else. They will be able to see the courses which are taught.
  6. Admin type of user will be able to add or delete courses as well as delete instructors from the courses.

*Note – User can be general public without creating an account, student, instructor, and admin.

Business Rules:-

Below are some basic business rules-

  1. One student can enroll in many courses.
  2. Every single course can be taken by many students.
  3. One instructor can teach many courses.
  4. One course will be taught by only one instructor.
  5. Users can be students or instructors based on the details entered while creating an account.

Entities and their attributes:

In this proposal, there are basically 4 entities. The description for each is given below-

USERDETAILS Entity –.When a student or instructor wants to enroll/teach for any course, first of all, they will have to create an account on the website by using the login page. All the details entered while creating an account will be stored in this table. This table will consist of the attributes as User id, user last name, user first name, user type (it can be student or instructor), and password. The primary key of this table will be the user id. Once the user has created an account, they will be able to know about the courses.

COURSE Entity – The course table will store all the details related to the courses which are offered. This table will have the following attributes Course id, Course name, course department, course description, course start date, and course end date. Course id will be the primary key for this table. Based on the above attributes, students can decide which course they are interested in. The instructors will also be able to know about the courses which are already taught by some other instructors and the courses available for them to teach.

STUDENTXREF Entity- This table will act as a reference table between the COURSE and USER DETAILS tables. The attributes of this table are student id, course id, and user id. The primary key of this table will be the student id.

INSTRUCTORXREF entity – This table is also a reference table between COURSE and USER DETAILS tables. If the user type is instructor then the details for that user id will be stored in this table. The attributes of this table are instructor id, user id, and course id. Instructor id will be the primary key for this table. Here the course id will be unique as 1 course cannot be taught by multiple instructors.

Entity-Relationship Diagram:-

Fig 1: Entity relationship diagram for Online Learning Management System.

Website Description:-

The online learning management system is a system that provides students to learn about various courses online. Various pages have been created for the users like Home Page, About Us page, Login/Register Page, and Search courses page.

The sitemap for the online Learning management system is as:

The project consists of the Front end and back end. The front-end pages are described below:

Home Page:

This page is the main page of the project. This page gives a brief description of the management system and also posts the latest courses which are going to be added in the future. This page will be linked to all other pages. Whenever the user is interested in learning any course, then they need to create an account by clicking on the Login/Register button provided on the navigation bar.

Login/Register Page:

The login page lets the user enter their username and password to login to their account. There are three different links for students, instructors and admin in the login/register page. Students can click on the enroll/register for courses link in order to login into the account. Students who are already registered can put in their username and password to login to the account. In the case of new users, they can register for a new account by clicking Join us button. In order to sign up for an account a user needs to enter an email address, preferred username and password, and date of birth. The user has to make a selection of the account type either teacher or student from a drop-down menu. Then they can simply login into their account. 

The login page lets the user enter their username and password to login to their account. There are three different links for students, instructors and admin in the login/register page. Students can click on enroll/register for courses link in order to login into the account.

Students who are already registered can put their username and password to login to the account. In case of new users, they can register for a new account by clicking Join us button. In order to sign up for an account a user needs to enter an email address, preferred username and password and date of birth. The user has to make a selection of the account type either teacher or student from a drop down menu. Then they can simply login into their account. 

About Us Page:

This page describes the goal of developing this project. This will make clear to the users what the purpose of developing this website is and how they can use it. Contact information is also provided for the users so that if they have any doubts, they can send an email with the query. 

1.6.4 Search course Page:

When a user is interested in learning any course, before creating an account he can check whether the course in which he is interested is provided by the management system or not. This search option will help them to know about the courses and then they can decide whether to enroll in those courses or not. While using the search option, users are not required to create an account.

The back end part will come into the picture when the user has created an account. Users can be students or instructors. While creating an account, the user will be asked to select the User type from the drop-down option. The pages at the backend side are described below:

Student Page:

This page (student.php) will be displayed to the user whose user type is Student. It will display the courses which are available for a particular student to enroll. He can select multiple courses for enrolling. Checkboxes are provided in front of all courses and then finally enroll button is provided.

Once the student selects any course and clicks on Enroll button, he will be shown a thank you message for enrolling in those courses. Student.php will call enroll.php when an enroll button is clicked by the student. The back button is provided on enroll.php which will re-direct the student to student.php. The student will also be displayed the courses in which he has already enrolled on student.php. 

Instructor Page:

When a user selects the user type as an instructor, he will be directed to instructor.php page. On this page, he will be displayed with the courses which he is already teaching. The instructor will be able to teach courses that are not being taught by any other instructor. A checkbox option will be provided to the instructor to select courses and then he can click on each button. This button will direct the instructor to teach.php page where he will be displayed a thank you message.

Admin Page:

Admin page is designed for the administrator to add and delete courses in the system. In order to login as an admin the user needs to select the admin-Add/Delete courses link from the Login/Register page. Two options appears in the admin page 1.Add a course and 2.Remove a course. Add a course lets the admin add new courses in the system.

The details the admin needs to provide in order to add a course are course name, course department, course description, course start date, and course end date. The admin can simply press the Add Class button. A success message appears on the page after the submission of the details. In order to remove a class the admin can make a selection from the drop-down menu and press the Delete Class button. The success message appears afterward.

Functions provided by the website are:

  1. The following are the functions provided by the online learning management system:
  2. Browse the homepage, and about us page.
  3. Search courses without creating an account.
  4. Interested users can create an account.
  5. Students can enroll in courses.
  6. The instructor can teach courses that are not being taught by any other instructor.
  7. Admin can add/delete courses.

Usability considerations:

The online management learning system website has logical navigation. Users can easily navigate around the webpage. The home page gives the users information about the whole system. All the contents are written in simple language. It has a user-friendly interface and functions well with no broken links. All the links and sub-links are clearly represented. The procedures to log in to the account, register for courses, and add or remove the courses from the system are very clear.

The system lets the users know if their attempts of adding courses or removing courses were successful. When the users put wrong credentials while logging in, it lets users know their attempt has failed because of the wrong username or password. So, that user can put the correct information and log in to the account. The website has all the required functions based on user types. That makes the website informative and user-centered. 

FUTURE ENHANCEMENTS:

  1. Based on the entries in the database, graphs can be created to provide information about the number of students in each course.
  2. A class entity can be added to provide more information about courses like classrooms, class timings, etc.
  3. Change the template to make it more attractive and user-friendly.
  4. Passwords can be stored in an encrypted way to avoid giving away personal information.