Data Dictionary

You might also like

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 17

TABLE

TABLE NAME DESCRIPTION

The main table which


consists of all details
User regarding every user of
the system with respect
to their roles

The table contains all


Event_Registration information about the
events posted by admin.

This Table contains the


Registered_Events details of users who
registered as per events
of choice

The table contains the


information of all
Bin_Locator
dustbins along with their
location and status of fill.
The table contains the
information of all
Bin_Locator
dustbins along with their
location and status of fill.

The table contains all the


details of truck drivers
Truck_Driver_Details
working for the
organisation
TABLE DESIGN
COLUMN NAME DATATYPE CONSTRAINT

Primary key which is


user_id varchar referenced by the tables
registered_events and roles in
the database, unique entry

name varchar Not Null


age int Not Null, check
email_id varchar Not Null
contact_number long int Not Null, check
roles varchar Not Null, check

Primary key for unique


event_id int identification and reference for
event ID

event_name varchar Not Null


venue varchar Not Null
date datetime Not Null, check
time datetime Not Null, check
description varchar Not Null
image longblob No Constraint
Foreign key refered to user_id
user_id varchar of User table

event_id int Foreign key refered to event_id


of Event_Registration table

name_of _event varchar Not Null

Primary key which is refrenced


bin_id int by truck_driver details to obtain
the retails regarding the bins
and their location

longitude float Not Null, check


latitude float Not Null, check
status int Not Null, check

primary key reference for all


truck_driver_id int
unique truck drivers

bin_id int Foreign key refered by bin_id


present in Bin_Locator table

truck_driver_number long int Not Null, check


truck_driver_name varchar Not Null
TABLE NAME COLUMN NAME

user_id

name

age

User

email_id

contact_no

roles

event_id

event_name

venue

Event_Registration
date
Event_Registration
time

description

image

user_id

Registered_Events
event_id

name_of_event

bin_id

longitude

Bin_Locator

latitude
status

truck_driver_id

bin_id
Truck_Driver_Details

truck_driver_name

truck_driver_number
DATA DICTIONARY

MAXIMUM
DATATYPE DESCRIPTION MINIMUM VALUE
VALUE

Primary key which stores the


varchar(15) unique user ID of every minimum length of maximum length of
varchar 5 varchar 15
registered user and admin

This stores the user name minimum length of maximum length of


varchar(30)
with respect to each user ID varchar 3 varchar 30

int This stores the age of the 5 100


registered user

varchar(30) This stores the email ID of the minimum length of maximum length of
registered users varchar 10 varchar 30

This stores the contact


long int number of all registered users 10 10

This stores the repsective minimum length of maximum length of


varchar(30) roles of all users of the system varchar 4 varchar 5

This stores the unique event ID


int for every posted event - Primary 1 10000
key

Contains the event or campaign minimum length of maximum length of


varchar(50)
name varchar 5 varchar 50

Stores the venue where the event minimum length of maximum length of
varchar(200)
is taking place varchar 10 varchar 200
Stores the date of participation of
DateTime 5 days from now() 20 days from now()
the posted event

Stores the time of participation of


DateTime 6:00 AM 8:00 PM
the posted event

Contains the description of the minimum length of maximum length of


varchar(200)
event or campaign posted varchar 15 varchar 200

Stores any related image of the minimum length of maximum length of


longblob
posted event varchar 30 varchar 100

Foreign key refered from user


varchar table to record the details of the minimum length of maximum length of
varchar 5 varchar 15
user registred for event

Foreign key refered from


int Event_Registration table to 1 10000
record the details of the events
registred

Stores the name of the event minimum length of maximum length of


varchar registered by the particular user varchar 5 varchar 50

Primary key which stores the


minimum length of maximum length of
varchar unique bin ID situated at every
location varchar 4 varchar 10

Stores the longitude value of the


decimal - 18000000000 (11,8) 8000000000 (10,8)
respective bin ID

Stores the latitude value of the


decimal respective bin ID - 9000000000 (10,8) 9000000000 (10,8)
Stores the status of garbage fill
int 0 - empty 3 - full
with respect to each bin

Primary key which uniquely


minimum length of maximum length of
varchar identifies the truck drivers
varchar 4 varchar 10
assigned for different bins

Foreign key refered from


varchar Bin_Locator table to record the minimum length of maximum length of
details of the bin in different varchar 4 varchar 10
locations

Stores the truck driver names minimum length of maximum length of


varchar
with respect to the ID varchar 3 varchar 30

Stores the truck driver phone


long int 10 10
numbers with respect to the ID
CHECK CONDITION DECIMAL DEFAULT

No check condition No decimal value No Default value

No numbers allowed No decimal value No Default value

age <=100 and age >=5 No decimal value No Default value

No check condition No decimal value No Default value

ph_no==10 No decimal value No Default value

admin or user No decimal value No Default value

No default value,
No check condition No decimal value auto_increment
applied

No check condition No decimal value No default value

No check condition No decimal value No default value


No check condition No decimal value No default value

No check condition No decimal value No default value

No check condition No decimal value No default value

No check condition No decimal value No default value

No check condition No decimal value No default value

No check condition No decimal value No default value

No check condition No decimal value No default value

No check condition No decimal value No default value

decimal (11,8) -
maximum of three
range from -180 to 80 digits before and eight No default value
digits after decimal
point

decimal (10,8) -
maximum of two digits
range from -90 to 90 before and eight digits No default value
after decimal point
range from 1 to 3 No decimal value 0 - empty bin

No check condition No decimal value No default value

No check condition No decimal value No default value

No check condition No decimal value No default value

ph_no==10 No decimal value No default value


DATA INTEGRITY

CONSTRAINTS OR
TABLE NAME ATTRIBUTE VALIDATIONS

Primary key
user_id

Name validation

name
Not Null

Number validation

Check constraint for age


age
Not Null
User
Number validation
Check constraint for phone
number
contact_number
Not Null

Not Null
email_id
Email validation
Not Null
roles
Check constraint
Primary key
event_id

event_name Not Null

venue Not Null


Check constraint

date
Event_Registration Not Null

Check constraint

time
Event_Registration

time
Not Null

Not Null
description

Foreign Key
user_id
Registered_Events
Foreign Key
event_id

Primary key
bin_id

Check constraint

longitude
Not Null

Check constraint

Bin_Locator latitude
Not Null

Check constraint

status

Not Null
Primary key
truck_driver_id

Foreign Key
bin_id

Name validation

truck_driver_name
Truck_Driver_Details Not Null
Number validation
Check constraint for phone
truck_driver_number

Not Null
GRITY

DESCRIPTION

user_id is unique for every user and also used


by other tables for reference

No numbers are allowed to be entered for this


attribute

Name cannot be Null

Only positive integers are accepted

check whether age is greater than 8 and less


than 100

Age cannot be Null

Only positive integers are accepted


Check whether the length of phone number is
equal to 10

Contact number cannot be Null

Email ID cannot be Null


Verify the correct format of email entry
Roles cannot be Null
Check only for admin and user profiles
event_id is unique for every event and also
used by other tables for reference

Event name cannot be Null


Venue cannot be Null
Date of event posting should atleast be 5 days
prior to the day of event participation
Date cannot be Null

Timing of event should range from 6am to 8pm


Time cannot be Null

Minimum description of the event shoud be


provided by the admin

Refered to User table to collect the details of


registered user

Refered to Event_Registration table to collect


the details of registered events

bin_id is unique for every dustbin and also


used by other tables for reference

The longitude value should be in decimal and


should always range from -180.0 to 80.0

longitude cannot be Null

The latitude value should be in decimal and


should always range from -90.0 to 90.0
latitude cannot be Null

Check whether the status ranges from 0 to 3. 0


indicates that the bin is empty. 1 indicates that
the bin is 40% full. 2 indicates that the bin is
70% full and 3 indicates that the bin is
completely full

status of the bin cannot be Null


truck_driver_id is unique for every driver and
also used by other tables for reference

Refered to Bin_Locator table to collect the


details of respective bins and their location

No numbers are allowed to be entered for this


attribute

Truck driver's name cannot be Null


Only positive integers are accepted
Check whether the length of phone number is
equal to 10

Contact number cannot be Null

You might also like