Skip to content

This is a Java-based console application that manages visitor records using a MySQL database. It allows users to add, view, update, and mark exit times for visitors. It is intended for use in organizations, offices, or institutes where visitor tracking is required.

Notifications You must be signed in to change notification settings

shivasayz/VisitTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

VisitTrack (Java + MySQL)

VisitorLog is a Java-based console application that helps track and manage visitor entries using a MySQL database. Designed for use in offices, institutions, or any space with regular foot traffic, VisitTrack provides a simple way to record guest details, update visitor info, and mark exit times โ€” all from a terminal interface. It ensures visitor data is organized, timestamped, and accessible for future reference.

๐Ÿ“‹ Features

  • View all current and past visitors
  • Add new visitor details
  • Update existing visitor information
  • Mark visitor exit time
  • Exit the system safely

๐Ÿ› ๏ธ Prerequisites

  • Java JDK 8 or higher
  • MySQL Server
  • MySQL JDBC Driver (mysql-connector-java)
  • An IDE or terminal to compile and run Java programs

๐Ÿ“‚ Database Setup

  1. Create a database:
CREATE DATABASE students;
  1. Use the database:
USE students;
  1. Create the visitors table:
CREATE TABLE visitors (
    Sno INT AUTO_INCREMENT PRIMARY KEY,
    Name VARCHAR(100) NOT NULL,
    visited_from VARCHAR(100),
    Gender VARCHAR(10),
    Date_of_visit DATE,
    Time_of_visit TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    Time_of_Exit TIMESTAMP NULL
);

๐Ÿ”ง Configuration

Update the following database credentials in your Java code

String url = "jdbc:mysql://localhost:3306/students";
String username = "root";
String password = "your_mysql_password_here";

โ–ถ๏ธ How to Run

  1. Compile the Java Program:
   javac visitors_db.java
  1. Run the Program:
   java visitors_db
  1. Follw the on-screen menu to perform actions:
1. Display Visitors
2. Add New Visitor
3. Update Visitor Details
4. Mark Exit Time
5. Exit

๐Ÿ–ผ๏ธ Screenshots

Main Page

Main Menu

Displaying Visitors from log

Visitors

Adding New Visitor

Adding new visitor

Displaying Visitors after new Record

Adding new visitor

Updating Existing Records

Adding new visitor

Marking Exit Time (Visitor "Ram" Maked as Exit)

Adding new visitor

About

This is a Java-based console application that manages visitor records using a MySQL database. It allows users to add, view, update, and mark exit times for visitors. It is intended for use in organizations, offices, or institutes where visitor tracking is required.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages