0% found this document useful (0 votes)
7 views5 pages

Visitor Database Design

The document outlines the structure of four database tables: User, Visitor, Company, and Department, detailing their respective fields and data types. Each table includes primary keys, foreign keys, and various attributes relevant to users, visitors, companies, and departments. The Employee table is also described, highlighting the relationship between employees, their companies, and departments.

Uploaded by

bhushanp1078
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

Visitor Database Design

The document outlines the structure of four database tables: User, Visitor, Company, and Department, detailing their respective fields and data types. Each table includes primary keys, foreign keys, and various attributes relevant to users, visitors, companies, and departments. The Employee table is also described, highlighting the relationship between employees, their companies, and departments.

Uploaded by

bhushanp1078
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 5

User Table

Field Name Data Type

id INT (Primary Key)

username VARCHAR(255)

password VARCHAR(255)

email VARCHAR(255)

ENUM('SuperAdmin', 'Admin',
role
'Employee')

company_id INT

profile_picture VARCHAR(255)

created_at TIMESTAMP

updated_at TIMESTAMP

Visitor Table

Field Name Data Type

id INT (Primary Key)

full_name VARCHAR(255)

email VARCHAR(255)

phone_number VARCHAR(15)

visit_date DATETIME

approval_status ENUM('Approved', 'Rejected', NULL)

entry_status ENUM('Pending', 'In', 'Out')


host_name VARCHAR(255)

purpose_of_visit TEXT
qr_code_scanned BOOLEAN

admin_id INT (Foreign Key)

approval_date TIMESTAMP

created_at TIMESTAMP
updated_at TIMESTAMP

Company Table

Field Name Data Type


id INT (Primary Key)
name VARCHAR(255)
address TEXT
created_at TIMESTAMP
updated_at TIMESTAMP
Department Table

Description Field Name

Unique user ID id

Unique username Department name

Encrypted password company_id

User's email address created_at

User role updated_at

Reference to the company (for


Admin/Employee roles)

URL/path to profile picture (optional) Employee Table

Date and time of creation Field Name

Date and time of last update id

full_name

email

phone_number

Description company_id

Unique visitor ID department_id

Full name of the visitor password

Visitor's email address created_at

Visitor's phone number updated_at

Scheduled or actual date and time of the visit

Visitor's approval status after Admin review

Current status of the visitor


Name of the host employee the visitor is
meeting
Purpose of the visit
Indicates if the QR code was scanned
Reference to the Admin who reviewed the
visitor's record (if applicable)

Date and time of approval/rejection by Admin

Date and time of record creation


Date and time of last update

Description
Unique company ID
Company name
Company address
Date and time of creation
Date and time of last update
Department Table

Data Type Description

INT (Primary Key) Unique department ID

VARCHAR(255) Department name

INT Company associated with the department

TIMESTAMP Date and time of creation

TIMESTAMP Date and time of last update

Employee Table

Data Type Description

INT (Primary Key) Unique employee ID

VARCHAR(255) Full name of the employee

VARCHAR(255) Employee's official email address

VARCHAR(15) Contact phone number of the employee


Reference to the company the employee belongs
INT (Foreign Key)
to
Reference to the department the employee
INT (Foreign Key)
belongs to
VARCHAR(255) Encrypted password for authentication

TIMESTAMP Date and time the employee record was created

Date and time the employee record was last


TIMESTAMP
updated

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy