SlideShare a Scribd company logo
1
INDOOR MAP PROJECT (ROOMS): CARNEGIE LIBRARY
JASH MEHTA
IST 659 FINAL PROJECT REPORT
2
Table of Contents
Project Summary ……………………………………………………..3
Tables and Attributes ……………………………………………………..5
Entity Relationship Diagram ……………………………………………………..7
Business Rules …………………………………………………….10
Database Infrastructure …………………………………………………….10
SQL Scripts for Creating
and Inserting Sample Data
…………………………………………………….10
Major Data Questions …………………………………………………….16
Forms and
Reports(Interfaces)
…………………………………………………….18
Triggers …………………………………………………….22
3
Summary:
The resources of the Carnegie include rooms that a SU user could use at the library.
For instance, there are rooms like Offices, Stack Area, Classrooms, Computer Lab,
Computer Cluster.
All rooms have resources such as chairs & table and technology. Classrooms can be
booked by faculty.
Therefore if faculty wants to know which rooms has sufficient capacity then the
faculty can log into the app to find out about the room he/she wants to book.
The resources can be located in a room or outside a room. These resources are
classified based on resource types and also based on the different levels they are
located on.
Supposedly, other resources include dust bins, elevators, exits and entrances in the
Carnegie Library. User (student or faculty) can log into the SU Indoor Map to find out
these other resources.
The scope of my project is limited to identify the rooms and other resources and
their locations at Carnegie so that these details can be fetched by the SU Indoor
Outdoor app.
Major Data Question
The App will be used by two kind of users
 SU students and faculty
 Database administrator
Why would SU students and faculty query the database?
Faculty has the privilege to book rooms in Carnegie Library therefore if any professor
would like to know information regarding the rooms then the database would be
queried
4
Students would like to locate the rooms and respective events in the room. Also,
students & faculty would like to locate the other resources such as drinking fountain,
washrooms, entrance, exits and elevators.
Why would database administrator query the database?
The database administrator would query the database in the event of finding out the
current status of any room or event. Administrator would like to query in order to
update the database. For example, if the semester changes and the events in the
room needs to be changed then it responsibility of the administrator to change it.
Also, if there is any reconstruction or reordering of any of the rooms then the
administrator must make changes in the database.
5
Tables & Attributes
Database object & Attributes Description
User User of the SU indoor Map
PK SUID
UserFirstName
UserLastName
Age
Email
Gender
UserType
Primary Key: Identifies the user uniquely
User’s First Name
User’s Last Name
Age of the user
SuEmail of the user
Gender of the user
Faculty or Student
Rooms Stores Information about all the rooms
PK RoomNumber
Department
Floor
RoomType
Timings
No_Of_Projectors
No_Of_Screens
NoOfChairs
NoOfTables
RoomAccess
Room Type
PK: Identifies the room uniquely
Under which department does the room
come
On which floor is the room located
Office, Classroom, Computer Lab etc
Opening and Closing Hours
Number of resources in the rooms:
Number of projectors, screens, chairs
and tables
Private or Public
Discriminator: Classroom(CR),
ComputerLab(CL), Office (O)
Other Resources Stores other resources such as
washrooms, bins, drinking fountain,
elevators, entrance and exits
PK ResourceID
FK SUID
ResourceName
Floor
Unique ID for resources to identify
resources
SUID taken as foreign key from the User
Table
Vending Machine, Washroom, Dustbin
Floor on which the resource is located
UserRoom Bridge table between user and Rooms
as it is many to many relationship
between user and rooms
6
PK URid
FK SUID
FK RoomNumber
Start Time
End Time
Date
Uniquely identifies the booking for the
user and room
Foreign key from user table
Foreign key from Rooms table
Start time the room booked
End time of the room booked
The date for which room is booked
Computer Lab Stores Information about all the
computers in the room
PK,FK RoomNumber
NoOfComputers
NameOfPrinter
TypeOfPrinter
NameOfScanner
TypeOfScanner
Primary key as well as foreign key to
implement disjoint logic
Number of Computers
Name of the printer
Brand/Company of the printer
Name of the Scanner
Brand/Company of the scanner
Classroom Stores information regarding the
classrooms
PK, FK RoomNumber
FK ClassID
Primary key as well as foreign key to
implement disjoint logic
Class Stores information regarding the event
occurring in the classroom
PK ClassID
URid
School Year
Semester
Uniquely identifies the class which is
being conducted in the classroom
URid as foreign key from UserRoom
bridge table
The school year: For example 2016,
2017
Fall, Spring, Summer
Office Stores information regarding the
person and the contact in the office
PK, FK RoomNumber
PersonIncharge_FirstName
PersonIncharge_LastName
ContactNumber
Primary key as well as foreign key to
implement disjoint logic
First Name of the person
Last Name of the person
Phone number of the office
7
Entity Relationship Diagram
Visio
8
SQL
9
Access
10
Business Rules
 Many users can use/search for many rooms
 A user of the App may search for one or many other resources
 The rooms are complete disjoint entities. A room can be a computer lab, computer cluster,
classroom, office or a stack area
 One classroom can have one class at a given time
Database Infrastructure:
The database infrastructure is based on 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 SQL database can also be
viewed with the help of reports generated through access.
SQL Scripts for Creating and Inserting Sample Data:
NOTE: I am giving only one insert script for each table rest of the data was inserted by access forms
CREATE TABLE CUSer
(
SUID CHAR(10)NOT NULL,
UserFirstName Varchar(30),
UserLastName Varchar(30),
UserAge INTEGER ,
UserEmail varchar(20),
UserGender Varchar(2),
User_Type Varchar(30),
CONSTRAINT SUID_PK PRIMARY KEY (SUID)
);
INSERT INTO CUSer Values
('12345678','Sachin','Tendulkar','44','saten@syr.edu','M','Faculty')
11
CREATE TABLE CROOMS
(
RoomNumber Char(5) NOT NULL,
Department varchar(30),
CFLoor char(2) ,
Timings varchar(20) ,
No_Of_Projectors INTEGER,
No_Of_Screens INTEGER,
No_Of_Chairs INTEGER,
No_Of_Tables INTEGER,
Capacity INTEGER,
RoomAccess Varchar(30),
RoomType Varchar(30) NOT NULL CHECK (RoomType In ('CL','CR','O')),
CONSTRAINT RoomNumber_PK PRIMARY KEY (RoomNumber)
);
INSERT INTO CROOMS Values ('C108','ABC','2','8 am - 5pm',1,1,20,3,23,'public','CR')
CREATE TABLE Resources
(
ResourceID Varchar(30) NOT NULL,
12
SUID CHAR(10) NOT NULL,
ResourceName Varchar(30),
CFLoor char(2),
CONSTRAINT ResourceID_PK PRIMARY KEY (ResourceID),
CONSTRAINT Resources_FK_SUID FOREIGN KEY (SUID) References CUSer(SUID)
);
INSERT INTO Resources Values ('VM103','12345678','Vending Machine','1')
CREATE TABLE UserRoom
(
URid Varchar(15) NOT NULL,
SUID CHAR(10) NOT NULL,
RoomNumber Char(5) NOT NULL,
URSTime Varchar(30),
URETime Varchar (30),
URDATE Varchar (30),
CONSTRAINT URid_PK PRIMARY KEY (URid),
CONSTRAINT UserRoom_FK_SUID FOREIGN KEY (SUID) References CUser(SUID),
CONSTRAINT UserRoom_FK_RoomNumber FOREIGN KEY (RoomNumber) References CROOMS(RoomNumber)
);
INSERT INTO UserRoom Values ('15','10001','c201','8 am', '9 am', 'May')
13
Create table Class
(
classID Varchar(30) NOT NULL,
URid Varchar(15) NOT NULL,
SchoolYear Varchar(30),
Semester Varchar(30),
CONSTRAINT Class_PK PRIMARY KEY (classID),
CONSTRAINT Class_FK_URid FOREIGN KEY (URid) References UserRoom(URid)
);
INSERT INTO Class Values ('c15','15','2016','Spring')
CREATE TABLE ClassRoom
(
RoomNumber Char(5)NOT NULL,
classID Varchar(30) NOT NULL,
14
CONSTRAINT RoomNumber_PK2 PRIMARY KEY (RoomNumber),
CONSTRAINT ClassRoom_FK_RoomNumber FOREIGN KEY (RoomNumber) References
CROOMS(RoomNumber),
CONSTRAINT ClassRoom_FK_classID FOREIGN KEY (classID) References Class(classID),
);
INSERT INTO ClassRoom Values ('c201','c15')
CREATE TABLE Office
(
RoomNumber Char(5)NOT NULL,
PersonInCharge_FNAME Varchar(30) ,
PersonInCharge_LNAME Varchar(30) ,
PhoneNumber Varchar(30),
CONSTRAINT RoomNumber_PK3 PRIMARY KEY (RoomNumber),
CONSTRAINT Office_FK_RoomNumber FOREIGN KEY (RoomNumber) References CROOMS(RoomNumber),
);
15
CREATE TABLE ComputerLab
(
RoomNumber Char(5) NOT NULL,
No_Of_Computer INTEGER,
No_Of_Printer INTEGER,
Name_Of_Printer varchar(30),
No_Of_scanner INTEGER,
Name_of_scanner varchar(30),
CONSTRAINT RoomNumber_PK1 PRIMARY KEY (RoomNumber),
CONSTRAINT ComputerLab_FK_RoomNumber FOREIGN KEY (RoomNumber) References
CROOMS(RoomNumber)
);
INSERT INTO ComputerLab Values ('Cl102',45,2,'HP Laser Jet', 45, 'Hp')
16
Major Data Questions
-User can know how many classrooms, offices, computer lab are on each floor
SELECT Count(CROOMS.RoomNumber) AS CountOfRoomNumber, CROOMS.RoomType, CROOMS.RoomAccess,
CROOMS.CFLoor
FROM CROOMS
GROUP BY CROOMS.RoomType, CROOMS.RoomAccess, CROOMS.CFLoor;
17
- Admin can create report to generate semesterwise classes in Carnegie
Library
SELECT CUSer.UserFirstName, CUSer.UserLastName, ClassRoom.RoomNumber, Class.Semester,
Count(Class.classID) AS CountOfclassID
FROM CUSer INNER JOIN (UserRoom INNER JOIN (Class INNER JOIN ClassRoom ON Class.classID =
ClassRoom.classID) ON UserRoom.URid = Class.URid) ON CUSer.SUID = UserRoom.SUID
GROUP BY CUSer.UserFirstName, CUSer.UserLastName, ClassRoom.RoomNumber, Class.Semester
HAVING (((Class.Semester)='Fall'));
SELECT CUSer.UserFirstName, CUSer.UserLastName, ClassRoom.RoomNumber, Class.Semester,
Count(Class.classID) AS CountOfclassID
FROM CUSer INNER JOIN (UserRoom INNER JOIN (Class INNER JOIN ClassRoom ON Class.classID =
ClassRoom.classID) ON UserRoom.URid = Class.URid) ON CUSer.SUID = UserRoom.SUID
GROUP BY CUSer.UserFirstName, CUSer.UserLastName, ClassRoom.RoomNumber, Class.Semester
HAVING (((Class.Semester)='Spring'));
18
Interfaces
Sub form with combo box
Form to fill data into Class, ClassRoom, UserRoom tables
19
Form to fill data into Crooms and Computer Lab tables
Form to fill data into User Table
20
Reports for major data questions:
- Admin can create report to generate semester wise classes in Carnegie
Library
21
-User can know how many classrooms, offices, computer lab are on each floor
22
Trigger
Before Trigger
As you can see C203 has 20 chairs and 20 tables and capacity is 20.
What my trigger does is it updates capacity = chairs + tables
create trigger updateCRooms
ON CROOMS
FOR UPDATE
AS
BEGIN
UPDATE CROOMS
SET Capacity = a.Capacity
FROM (select c.RoomNumber AS rnum,(c.no_of_tables +i.No_Of_Chairs) As 'Capacity'
FROM CROOMS c Inner join inserted i
on i.RoomNumber = c.RoomNumber
)a
where Crooms.RoomNumber = a.rnum
End;
update CROOMS
set No_Of_Chairs= 20
where RoomNumber='C203'
23
After Trigger:
You can see the capacity column of C203 has been updated

More Related Content

Viewers also liked

OConnorMini-ResearchPaper
OConnorMini-ResearchPaperOConnorMini-ResearchPaper
OConnorMini-ResearchPaperMatt Thura
 
Jash mehta assignment 1Business Model
Jash mehta assignment 1Business ModelJash mehta assignment 1Business Model
Jash mehta assignment 1Business Model
Jash Mehta
 
Business Data Mapping assignment 9
Business Data Mapping assignment 9Business Data Mapping assignment 9
Business Data Mapping assignment 9
Jash Mehta
 
áLbum de-fotografías-audio-y-video - copia
áLbum de-fotografías-audio-y-video - copiaáLbum de-fotografías-audio-y-video - copia
áLbum de-fotografías-audio-y-video - copia
Lizbeth Aleidy Zonrixss
 
บทที่ 1 เทคโนโลยีสารสนเทศและการสื่อสาร
บทที่ 1 เทคโนโลยีสารสนเทศและการสื่อสารบทที่ 1 เทคโนโลยีสารสนเทศและการสื่อสาร
บทที่ 1 เทคโนโลยีสารสนเทศและการสื่อสาร
Kewalin Prasertdecho
 
Pawer Point de Teología " El Hijo de Dios se hace Hombre"
Pawer Point de Teología " El Hijo de Dios se hace Hombre"Pawer Point de Teología " El Hijo de Dios se hace Hombre"
Pawer Point de Teología " El Hijo de Dios se hace Hombre"
Hugo Schmidt
 
Ejerciciogoogledocumentovanessacastillo
EjerciciogoogledocumentovanessacastilloEjerciciogoogledocumentovanessacastillo
Ejerciciogoogledocumentovanessacastillo
vanessa anai castillo olaya
 
Pawer de didactica
Pawer de didacticaPawer de didactica
Pawer de didactica
Hugo Schmidt
 
Autoestima y rendimiento escolar.
Autoestima y rendimiento escolar.Autoestima y rendimiento escolar.
Autoestima y rendimiento escolar.
Hugo Schmidt
 
Eitc team 2 tech talk-final
Eitc team 2  tech talk-finalEitc team 2  tech talk-final
Eitc team 2 tech talk-final
Jash Mehta
 
Eitc team 1 of v3 annotated bibliography
Eitc team 1 of v3  annotated bibliographyEitc team 1 of v3  annotated bibliography
Eitc team 1 of v3 annotated bibliography
Jash Mehta
 
EL UNIVERSO
EL UNIVERSOEL UNIVERSO
EL UNIVERSO
jasmine marin
 
Influencia de la luminosidad lunar
Influencia de la luminosidad lunarInfluencia de la luminosidad lunar
Influencia de la luminosidad lunar
Hugo Schmidt
 
UC and Prototyping
UC and PrototypingUC and Prototyping
UC and Prototyping
Jash Mehta
 
Jash mehta erd assignment
Jash mehta erd assignmentJash mehta erd assignment
Jash mehta erd assignment
Jash Mehta
 

Viewers also liked (18)

OConnorMini-ResearchPaper
OConnorMini-ResearchPaperOConnorMini-ResearchPaper
OConnorMini-ResearchPaper
 
Jash mehta assignment 1Business Model
Jash mehta assignment 1Business ModelJash mehta assignment 1Business Model
Jash mehta assignment 1Business Model
 
Business Data Mapping assignment 9
Business Data Mapping assignment 9Business Data Mapping assignment 9
Business Data Mapping assignment 9
 
áLbum de-fotografías-audio-y-video - copia
áLbum de-fotografías-audio-y-video - copiaáLbum de-fotografías-audio-y-video - copia
áLbum de-fotografías-audio-y-video - copia
 
บทที่ 1 เทคโนโลยีสารสนเทศและการสื่อสาร
บทที่ 1 เทคโนโลยีสารสนเทศและการสื่อสารบทที่ 1 เทคโนโลยีสารสนเทศและการสื่อสาร
บทที่ 1 เทคโนโลยีสารสนเทศและการสื่อสาร
 
Pawer Point de Teología " El Hijo de Dios se hace Hombre"
Pawer Point de Teología " El Hijo de Dios se hace Hombre"Pawer Point de Teología " El Hijo de Dios se hace Hombre"
Pawer Point de Teología " El Hijo de Dios se hace Hombre"
 
Ejerciciogoogledocumentovanessacastillo
EjerciciogoogledocumentovanessacastilloEjerciciogoogledocumentovanessacastillo
Ejerciciogoogledocumentovanessacastillo
 
Pawer de didactica
Pawer de didacticaPawer de didactica
Pawer de didactica
 
Autoestima y rendimiento escolar.
Autoestima y rendimiento escolar.Autoestima y rendimiento escolar.
Autoestima y rendimiento escolar.
 
Eitc team 2 tech talk-final
Eitc team 2  tech talk-finalEitc team 2  tech talk-final
Eitc team 2 tech talk-final
 
FIM_AB Burn 2015
FIM_AB Burn 2015FIM_AB Burn 2015
FIM_AB Burn 2015
 
Jof V 2016
Jof V 2016Jof V 2016
Jof V 2016
 
Eitc team 1 of v3 annotated bibliography
Eitc team 1 of v3  annotated bibliographyEitc team 1 of v3  annotated bibliography
Eitc team 1 of v3 annotated bibliography
 
MDR 2014 final
MDR 2014 finalMDR 2014 final
MDR 2014 final
 
EL UNIVERSO
EL UNIVERSOEL UNIVERSO
EL UNIVERSO
 
Influencia de la luminosidad lunar
Influencia de la luminosidad lunarInfluencia de la luminosidad lunar
Influencia de la luminosidad lunar
 
UC and Prototyping
UC and PrototypingUC and Prototyping
UC and Prototyping
 
Jash mehta erd assignment
Jash mehta erd assignmentJash mehta erd assignment
Jash mehta erd assignment
 

Similar to Jash mehta ist 659 final project report

Sq lite module6
Sq lite module6Sq lite module6
Sq lite module6
Highervista
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENT
Lori Moore
 
2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation
Biju Thomas
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome Measures
Steven Johnson
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
jane3dyson92312
 
DB 3 Sybase ASE 15 & MS SQL Server
DB 3 Sybase ASE 15 & MS SQL Server DB 3 Sybase ASE 15 & MS SQL Server
DB 3 Sybase ASE 15 & MS SQL Server Sunny U Okoro
 
L1 Intro to Relational DBMS LP.pdfIntro to Relational .docx
L1 Intro to Relational DBMS LP.pdfIntro to Relational .docxL1 Intro to Relational DBMS LP.pdfIntro to Relational .docx
L1 Intro to Relational DBMS LP.pdfIntro to Relational .docx
DIPESH30
 
Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)
Achmad Solichin
 
College management presentation using Oracle 10G
College management presentation using Oracle 10GCollege management presentation using Oracle 10G
College management presentation using Oracle 10G
AIUB
 
It's Not You. It's Your Data Model.
It's Not You. It's Your Data Model.It's Not You. It's Your Data Model.
It's Not You. It's Your Data Model.
Alex Powers
 
Les09
Les09Les09
Dbms oracle
Dbms oracle Dbms oracle
Dbms oracle
Abrar ali
 
Streaming SQL to unify batch and stream processing: Theory and practice with ...
Streaming SQL to unify batch and stream processing: Theory and practice with ...Streaming SQL to unify batch and stream processing: Theory and practice with ...
Streaming SQL to unify batch and stream processing: Theory and practice with ...
Fabian Hueske
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And Whatudaymoogala
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sql
McNamaraChiwaye
 
Advanced tips for making Oracle databases faster
Advanced tips for making Oracle databases fasterAdvanced tips for making Oracle databases faster
Advanced tips for making Oracle databases faster
SolarWinds
 
Advanced plsql mock_assessment
Advanced plsql mock_assessmentAdvanced plsql mock_assessment
Advanced plsql mock_assessment
Saurabh K. Gupta
 
SQL Reports in Koha
SQL Reports in KohaSQL Reports in Koha
SQL Reports in Koha
Nicole C. Engard
 

Similar to Jash mehta ist 659 final project report (20)

Sq lite module6
Sq lite module6Sq lite module6
Sq lite module6
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENT
 
2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation
 
Less08 Schema
Less08 SchemaLess08 Schema
Less08 Schema
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome Measures
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
 
DB 3 Sybase ASE 15 & MS SQL Server
DB 3 Sybase ASE 15 & MS SQL Server DB 3 Sybase ASE 15 & MS SQL Server
DB 3 Sybase ASE 15 & MS SQL Server
 
L1 Intro to Relational DBMS LP.pdfIntro to Relational .docx
L1 Intro to Relational DBMS LP.pdfIntro to Relational .docxL1 Intro to Relational DBMS LP.pdfIntro to Relational .docx
L1 Intro to Relational DBMS LP.pdfIntro to Relational .docx
 
Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)
 
College management presentation using Oracle 10G
College management presentation using Oracle 10GCollege management presentation using Oracle 10G
College management presentation using Oracle 10G
 
It's Not You. It's Your Data Model.
It's Not You. It's Your Data Model.It's Not You. It's Your Data Model.
It's Not You. It's Your Data Model.
 
Les09
Les09Les09
Les09
 
Dbms oracle
Dbms oracle Dbms oracle
Dbms oracle
 
plsql Les09
 plsql Les09 plsql Les09
plsql Les09
 
Streaming SQL to unify batch and stream processing: Theory and practice with ...
Streaming SQL to unify batch and stream processing: Theory and practice with ...Streaming SQL to unify batch and stream processing: Theory and practice with ...
Streaming SQL to unify batch and stream processing: Theory and practice with ...
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sql
 
Advanced tips for making Oracle databases faster
Advanced tips for making Oracle databases fasterAdvanced tips for making Oracle databases faster
Advanced tips for making Oracle databases faster
 
Advanced plsql mock_assessment
Advanced plsql mock_assessmentAdvanced plsql mock_assessment
Advanced plsql mock_assessment
 
SQL Reports in Koha
SQL Reports in KohaSQL Reports in Koha
SQL Reports in Koha
 

Recently uploaded

standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
StarCompliance.io
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
James Polillo
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 

Recently uploaded (20)

standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 

Jash mehta ist 659 final project report

  • 1. 1 INDOOR MAP PROJECT (ROOMS): CARNEGIE LIBRARY JASH MEHTA IST 659 FINAL PROJECT REPORT
  • 2. 2 Table of Contents Project Summary ……………………………………………………..3 Tables and Attributes ……………………………………………………..5 Entity Relationship Diagram ……………………………………………………..7 Business Rules …………………………………………………….10 Database Infrastructure …………………………………………………….10 SQL Scripts for Creating and Inserting Sample Data …………………………………………………….10 Major Data Questions …………………………………………………….16 Forms and Reports(Interfaces) …………………………………………………….18 Triggers …………………………………………………….22
  • 3. 3 Summary: The resources of the Carnegie include rooms that a SU user could use at the library. For instance, there are rooms like Offices, Stack Area, Classrooms, Computer Lab, Computer Cluster. All rooms have resources such as chairs & table and technology. Classrooms can be booked by faculty. Therefore if faculty wants to know which rooms has sufficient capacity then the faculty can log into the app to find out about the room he/she wants to book. The resources can be located in a room or outside a room. These resources are classified based on resource types and also based on the different levels they are located on. Supposedly, other resources include dust bins, elevators, exits and entrances in the Carnegie Library. User (student or faculty) can log into the SU Indoor Map to find out these other resources. The scope of my project is limited to identify the rooms and other resources and their locations at Carnegie so that these details can be fetched by the SU Indoor Outdoor app. Major Data Question The App will be used by two kind of users  SU students and faculty  Database administrator Why would SU students and faculty query the database? Faculty has the privilege to book rooms in Carnegie Library therefore if any professor would like to know information regarding the rooms then the database would be queried
  • 4. 4 Students would like to locate the rooms and respective events in the room. Also, students & faculty would like to locate the other resources such as drinking fountain, washrooms, entrance, exits and elevators. Why would database administrator query the database? The database administrator would query the database in the event of finding out the current status of any room or event. Administrator would like to query in order to update the database. For example, if the semester changes and the events in the room needs to be changed then it responsibility of the administrator to change it. Also, if there is any reconstruction or reordering of any of the rooms then the administrator must make changes in the database.
  • 5. 5 Tables & Attributes Database object & Attributes Description User User of the SU indoor Map PK SUID UserFirstName UserLastName Age Email Gender UserType Primary Key: Identifies the user uniquely User’s First Name User’s Last Name Age of the user SuEmail of the user Gender of the user Faculty or Student Rooms Stores Information about all the rooms PK RoomNumber Department Floor RoomType Timings No_Of_Projectors No_Of_Screens NoOfChairs NoOfTables RoomAccess Room Type PK: Identifies the room uniquely Under which department does the room come On which floor is the room located Office, Classroom, Computer Lab etc Opening and Closing Hours Number of resources in the rooms: Number of projectors, screens, chairs and tables Private or Public Discriminator: Classroom(CR), ComputerLab(CL), Office (O) Other Resources Stores other resources such as washrooms, bins, drinking fountain, elevators, entrance and exits PK ResourceID FK SUID ResourceName Floor Unique ID for resources to identify resources SUID taken as foreign key from the User Table Vending Machine, Washroom, Dustbin Floor on which the resource is located UserRoom Bridge table between user and Rooms as it is many to many relationship between user and rooms
  • 6. 6 PK URid FK SUID FK RoomNumber Start Time End Time Date Uniquely identifies the booking for the user and room Foreign key from user table Foreign key from Rooms table Start time the room booked End time of the room booked The date for which room is booked Computer Lab Stores Information about all the computers in the room PK,FK RoomNumber NoOfComputers NameOfPrinter TypeOfPrinter NameOfScanner TypeOfScanner Primary key as well as foreign key to implement disjoint logic Number of Computers Name of the printer Brand/Company of the printer Name of the Scanner Brand/Company of the scanner Classroom Stores information regarding the classrooms PK, FK RoomNumber FK ClassID Primary key as well as foreign key to implement disjoint logic Class Stores information regarding the event occurring in the classroom PK ClassID URid School Year Semester Uniquely identifies the class which is being conducted in the classroom URid as foreign key from UserRoom bridge table The school year: For example 2016, 2017 Fall, Spring, Summer Office Stores information regarding the person and the contact in the office PK, FK RoomNumber PersonIncharge_FirstName PersonIncharge_LastName ContactNumber Primary key as well as foreign key to implement disjoint logic First Name of the person Last Name of the person Phone number of the office
  • 10. 10 Business Rules  Many users can use/search for many rooms  A user of the App may search for one or many other resources  The rooms are complete disjoint entities. A room can be a computer lab, computer cluster, classroom, office or a stack area  One classroom can have one class at a given time Database Infrastructure: The database infrastructure is based on 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 SQL database can also be viewed with the help of reports generated through access. SQL Scripts for Creating and Inserting Sample Data: NOTE: I am giving only one insert script for each table rest of the data was inserted by access forms CREATE TABLE CUSer ( SUID CHAR(10)NOT NULL, UserFirstName Varchar(30), UserLastName Varchar(30), UserAge INTEGER , UserEmail varchar(20), UserGender Varchar(2), User_Type Varchar(30), CONSTRAINT SUID_PK PRIMARY KEY (SUID) ); INSERT INTO CUSer Values ('12345678','Sachin','Tendulkar','44','saten@syr.edu','M','Faculty')
  • 11. 11 CREATE TABLE CROOMS ( RoomNumber Char(5) NOT NULL, Department varchar(30), CFLoor char(2) , Timings varchar(20) , No_Of_Projectors INTEGER, No_Of_Screens INTEGER, No_Of_Chairs INTEGER, No_Of_Tables INTEGER, Capacity INTEGER, RoomAccess Varchar(30), RoomType Varchar(30) NOT NULL CHECK (RoomType In ('CL','CR','O')), CONSTRAINT RoomNumber_PK PRIMARY KEY (RoomNumber) ); INSERT INTO CROOMS Values ('C108','ABC','2','8 am - 5pm',1,1,20,3,23,'public','CR') CREATE TABLE Resources ( ResourceID Varchar(30) NOT NULL,
  • 12. 12 SUID CHAR(10) NOT NULL, ResourceName Varchar(30), CFLoor char(2), CONSTRAINT ResourceID_PK PRIMARY KEY (ResourceID), CONSTRAINT Resources_FK_SUID FOREIGN KEY (SUID) References CUSer(SUID) ); INSERT INTO Resources Values ('VM103','12345678','Vending Machine','1') CREATE TABLE UserRoom ( URid Varchar(15) NOT NULL, SUID CHAR(10) NOT NULL, RoomNumber Char(5) NOT NULL, URSTime Varchar(30), URETime Varchar (30), URDATE Varchar (30), CONSTRAINT URid_PK PRIMARY KEY (URid), CONSTRAINT UserRoom_FK_SUID FOREIGN KEY (SUID) References CUser(SUID), CONSTRAINT UserRoom_FK_RoomNumber FOREIGN KEY (RoomNumber) References CROOMS(RoomNumber) ); INSERT INTO UserRoom Values ('15','10001','c201','8 am', '9 am', 'May')
  • 13. 13 Create table Class ( classID Varchar(30) NOT NULL, URid Varchar(15) NOT NULL, SchoolYear Varchar(30), Semester Varchar(30), CONSTRAINT Class_PK PRIMARY KEY (classID), CONSTRAINT Class_FK_URid FOREIGN KEY (URid) References UserRoom(URid) ); INSERT INTO Class Values ('c15','15','2016','Spring') CREATE TABLE ClassRoom ( RoomNumber Char(5)NOT NULL, classID Varchar(30) NOT NULL,
  • 14. 14 CONSTRAINT RoomNumber_PK2 PRIMARY KEY (RoomNumber), CONSTRAINT ClassRoom_FK_RoomNumber FOREIGN KEY (RoomNumber) References CROOMS(RoomNumber), CONSTRAINT ClassRoom_FK_classID FOREIGN KEY (classID) References Class(classID), ); INSERT INTO ClassRoom Values ('c201','c15') CREATE TABLE Office ( RoomNumber Char(5)NOT NULL, PersonInCharge_FNAME Varchar(30) , PersonInCharge_LNAME Varchar(30) , PhoneNumber Varchar(30), CONSTRAINT RoomNumber_PK3 PRIMARY KEY (RoomNumber), CONSTRAINT Office_FK_RoomNumber FOREIGN KEY (RoomNumber) References CROOMS(RoomNumber), );
  • 15. 15 CREATE TABLE ComputerLab ( RoomNumber Char(5) NOT NULL, No_Of_Computer INTEGER, No_Of_Printer INTEGER, Name_Of_Printer varchar(30), No_Of_scanner INTEGER, Name_of_scanner varchar(30), CONSTRAINT RoomNumber_PK1 PRIMARY KEY (RoomNumber), CONSTRAINT ComputerLab_FK_RoomNumber FOREIGN KEY (RoomNumber) References CROOMS(RoomNumber) ); INSERT INTO ComputerLab Values ('Cl102',45,2,'HP Laser Jet', 45, 'Hp')
  • 16. 16 Major Data Questions -User can know how many classrooms, offices, computer lab are on each floor SELECT Count(CROOMS.RoomNumber) AS CountOfRoomNumber, CROOMS.RoomType, CROOMS.RoomAccess, CROOMS.CFLoor FROM CROOMS GROUP BY CROOMS.RoomType, CROOMS.RoomAccess, CROOMS.CFLoor;
  • 17. 17 - Admin can create report to generate semesterwise classes in Carnegie Library SELECT CUSer.UserFirstName, CUSer.UserLastName, ClassRoom.RoomNumber, Class.Semester, Count(Class.classID) AS CountOfclassID FROM CUSer INNER JOIN (UserRoom INNER JOIN (Class INNER JOIN ClassRoom ON Class.classID = ClassRoom.classID) ON UserRoom.URid = Class.URid) ON CUSer.SUID = UserRoom.SUID GROUP BY CUSer.UserFirstName, CUSer.UserLastName, ClassRoom.RoomNumber, Class.Semester HAVING (((Class.Semester)='Fall')); SELECT CUSer.UserFirstName, CUSer.UserLastName, ClassRoom.RoomNumber, Class.Semester, Count(Class.classID) AS CountOfclassID FROM CUSer INNER JOIN (UserRoom INNER JOIN (Class INNER JOIN ClassRoom ON Class.classID = ClassRoom.classID) ON UserRoom.URid = Class.URid) ON CUSer.SUID = UserRoom.SUID GROUP BY CUSer.UserFirstName, CUSer.UserLastName, ClassRoom.RoomNumber, Class.Semester HAVING (((Class.Semester)='Spring'));
  • 18. 18 Interfaces Sub form with combo box Form to fill data into Class, ClassRoom, UserRoom tables
  • 19. 19 Form to fill data into Crooms and Computer Lab tables Form to fill data into User Table
  • 20. 20 Reports for major data questions: - Admin can create report to generate semester wise classes in Carnegie Library
  • 21. 21 -User can know how many classrooms, offices, computer lab are on each floor
  • 22. 22 Trigger Before Trigger As you can see C203 has 20 chairs and 20 tables and capacity is 20. What my trigger does is it updates capacity = chairs + tables create trigger updateCRooms ON CROOMS FOR UPDATE AS BEGIN UPDATE CROOMS SET Capacity = a.Capacity FROM (select c.RoomNumber AS rnum,(c.no_of_tables +i.No_Of_Chairs) As 'Capacity' FROM CROOMS c Inner join inserted i on i.RoomNumber = c.RoomNumber )a where Crooms.RoomNumber = a.rnum End; update CROOMS set No_Of_Chairs= 20 where RoomNumber='C203'
  • 23. 23 After Trigger: You can see the capacity column of C203 has been updated