The project involves creating an indoor map of rooms at the Carnegie Library. It includes creating tables to store information about rooms, resources, users, and bookings. Relationships between tables are defined in an ER diagram. Sample data is inserted using SQL scripts. Forms and reports allow users and administrators to view and query data about rooms, bookings, and resources. A trigger is created to automatically update the capacity field in the rooms table when the number of chairs or tables changes. The app will help users like faculty and students locate rooms and resources within the library.
Assignment # 2PreliminariesImportant Points· Evidence of acad.docxjane3dyson92312
Assignment # 2Preliminaries
Important Points
· Evidence of academic misconduct (e.g., plagiarism, collaboration/collusion among students) will be taken seriously and University regulations strictly followed.
· You are expected to produce a word-processed answer to this assignment. Please use Arial font and a font size of 12. For SQL code and output, you can use courier new, which preserves SQL format and layout.
· You are required to use the Harvard Style of referencing and citation. The “Cite them right” guide is recommended for referencing and citation (Pears and Shields, 2008) which should be followed throughout your answer especially Part 3.
· Late submissions will be given zero marks unless prior permission is gained from the school office/programme leader.
Module Learning Outcomes (MLOs) assessed:
Knowledge & Understanding:
2. Key concepts of data warehousing.
Intellectual / Professional skills & abilities:
3. Conceptual data modelling, relational database design and implementation in SQL & PL/SQL, and object-based databases.
4. Design and Implementation of a data warehouse using Oracle database system.
Tasks of the Assignment
Part 1 (50 marks) Scenario: Mechanical Production Factories (MPF) Database System
MPF is a company that produces customised mechanical products within Europe. The company produces a rang of mechanical products at several factories. Information about which work force are assigned to which production orders and kept in the force usage register.
In order to access information quickly and to ensure that all past records are available for audit purposes, the company developed a database. Figure 1 shows a UML class diagram, which provides a conceptual model of the database. Relational Design for MPF Database System
A conceptual model of a database may be implemented using any database system (e.g. relational, object-relational, object-oriented). However, to start with, we have mapped the MPF’s conceptual model onto a relational logical model. Figure 2 details the relations for an implementation of the database using a relational database system. Note that Figure 2 uses shorthand / abbreviated notation for data types / domains for describing various attributes of the relations involved in the database.
Figure 1: UML Class Diagram for the MPF Database
Domains/Data Types: ID = Number(6) LTXT = Varchar(50)
STXT = Varchar(30) DEC = Number(8, 2) INT = Number(6)
Factory (FactoryId: ID, Location: LTXT, Country: LTXT)
Product (ProdId: ID, Description: LTXT, CostPerItem: DEC, LabCostPerItem: DEC)
FactoryProduct (FactoryId: ID *: ID, ProdId*: ID)
Workforce (wfId: ID, wfName: STXT, yearlyIncome: DEC, yearlyTax: DEC, taxCode: INT, factoryId*: ID)
Production (prodOrderId: ID, quantity: INT, itemPrice: DEC,orderDate: Date, promiseDate: Date, completionDate: Date, shipmentDate: Date, status: CHAR, prodID*: ID)
ForceUsage (wfId*:ID, prodOrderId*:I.
L1 Intro to Relational DBMS LP.pdfIntro to Relational .docxDIPESH30
L1 Intro to Relational DBMS LP.pdf
Intro to Relational
Databases
CS 2215 Introduction to Databases
1
2
What Is a DBMS?
Database: A collection of information.
Eg ?
Examples: Library, University
Database Management System (DBMS) :
software package designed to store
and manage databases.
Eg: Oracle, SQL server, MySQL, Access
Files vs DBMS : Why bother with
databases ?
Why not just store all the data in a big file
and write C or Java programs to manipulate
the data. 2
3
Why Use a DBMS?
Naïve users sheltered from messy
details
Data integrity:
Eg: if Bob works in Marketing, make
sure there is a dept. called Marketing.
Reduced application development
time: Avoid writing special programs
from scratch each time to access
data.
Standard Application Interface:
increased reliability
3
4
Why Use a DBMS?
Data independence: easier
to make changes
If how data is stored changes,
don’t have to change views.
Forms, etc.
Security: easier to control
how data is shared
Concurrent access: allow
multiple users to access
simultaneously
But in a controlled way !
4
5
Different people involved
DBMS implementers: who build the DBMS like
Oracle, MS SQL server
End users: Use forms & reports, might write SQL
queries
DB application programmers: write programs
to make life easier for end users.
Eg: person who creates forms for library.
Must know how databases work
DB administrator (DBA):
Handles security and authorization
Crash recovery
Database tuning as needs evolve
5
6
Overview of course: Relational Model:
Student Database, Fig 1.2
6
STUDENT
Name StudentNumber Class Major
Smith 17 1 CS
Brown 8 2 CS
7
Overview of course:
Data Models:
High level : Entity Relation (E.R.) model
Intermediate level : relational model
Student database
Low level: physical database -
Covered in CSCI 4524 Advanced
Databases
Relational databases:
Integrity constraints
Good design : normalization
Query languages: Relational
algebra, SQL
Views, Assertions, Triggers
7
8
Relational Data Model
Relation: 2-dimensional table
All info stored in tables
Eg: student, course
See Elmasri Fig 1.2
Rows (or tuples): student : 2 rows
Records: a row may correspond with a
record in a file
Commonly used if we are talking about the
physical storage of databases
Columns (or attributes): student : 4
columns
8
9
Relational Data Model
Relational model proposed by E. F.
Codd 1970
Dominant model in commercial DBMS
products.
Eg: Oracle, SQL server, MySQL, Access.
Compared to previous models
(network, hierarchical etc):
Easier to understand info in tables
Casual user can write simple SQL queries
Complex queries much easier to
understand compared to previous models.
9
10
Basic Terminology
Relational Schema (or head): set of all the
column names i.e. what info is bei ...
College management presentation using Oracle 10GAIUB
Its a presentation of a College management database system. All relationship diagram, Entity relationship diagram were described here. We used Oracle 10G database software to develop the database. We also described about how oracle works and some queries were described briefly.
From usability to performance, analytics to architecture; as report developers, the user experience design (UX) of your data model is quickly becoming more important than the pretty pictures that sit on top of it. This session will concentrate on the design decisions needed to increase the usage of your reports.
Streaming SQL to unify batch and stream processing: Theory and practice with ...Fabian Hueske
SQL is the lingua franca for querying and processing data. To this day, it provides non-programmers with a powerful tool for analyzing and manipulating data. But with the emergence of stream processing as a core technology for data infrastructures, can you still use SQL and bring real-time data analysis to a broader audience?
The answer is yes, you can. SQL fits into the streaming world very well and forms an intuitive and powerful abstraction for streaming analytics. More importantly, you can use SQL as an abstraction to unify batch and streaming data processing. Viewing streams as dynamic tables, you can obtain consistent results from SQL evaluated over static tables and streams alike and use SQL to build materialized views as a data integration tool.
Fabian Hueske and Shuyi Chen explore SQL’s role in the world of streaming data and its implementation in Apache Flink and cover fundamental concepts, such as streaming semantics, event time, and incremental results. They also share their experience using Flink SQL in production at Uber, explaining how Uber leverages Flink SQL to solve its unique business challenges and how the unified stream and batch processing platform enables both technical or nontechnical users to process real-time and batch data reliably using the same SQL at Uber scale.
Advanced tips for making Oracle databases fasterSolarWinds
If you struggle with performance issues in your Oracle database instance and can't easily pinpoint the cause, you may be missing crucial performance information.
Learn how to determine the best approach for tuning SQL statements and other issues by identifying the specific causes of slow performance.
Here is a mock assessment test for the 1Z0-146 certification exam which can be your final warm up game before you appear for the real exam. Questions follow similar pattern but also test your basic understanding on a concept. For answer key – comment on the post with your email id and I shall send across to you the same.
I hope the readers of my book will find the mock paper quite handy while the rest of you will discover the areas to dive in further.
StarCompliance is a leading firm specializing in the recovery of stolen cryptocurrency. Our comprehensive services are designed to assist individuals and organizations in navigating the complex process of fraud reporting, investigation, and fund recovery. We combine cutting-edge technology with expert legal support to provide a robust solution for victims of crypto theft.
Our Services Include:
Reporting to Tracking Authorities:
We immediately notify all relevant centralized exchanges (CEX), decentralized exchanges (DEX), and wallet providers about the stolen cryptocurrency. This ensures that the stolen assets are flagged as scam transactions, making it impossible for the thief to use them.
Assistance with Filing Police Reports:
We guide you through the process of filing a valid police report. Our support team provides detailed instructions on which police department to contact and helps you complete the necessary paperwork within the critical 72-hour window.
Launching the Refund Process:
Our team of experienced lawyers can initiate lawsuits on your behalf and represent you in various jurisdictions around the world. They work diligently to recover your stolen funds and ensure that justice is served.
At StarCompliance, we understand the urgency and stress involved in dealing with cryptocurrency theft. Our dedicated team works quickly and efficiently to provide you with the support and expertise needed to recover your assets. Trust us to be your partner in navigating the complexities of the crypto world and safeguarding your investments.
Adjusting primitives for graph : SHORT REPORT / NOTESSubhajit Sahu
Graph algorithms, like PageRank Compressed Sparse Row (CSR) is an adjacency-list based graph representation that is
Multiply with different modes (map)
1. Performance of sequential execution based vs OpenMP based vector multiply.
2. Comparing various launch configs for CUDA based vector multiply.
Sum with different storage types (reduce)
1. Performance of vector element sum using float vs bfloat16 as the storage type.
Sum with different modes (reduce)
1. Performance of sequential execution based vs OpenMP based vector element sum.
2. Performance of memcpy vs in-place based CUDA based vector element sum.
3. Comparing various launch configs for CUDA based vector element sum (memcpy).
4. Comparing various launch configs for CUDA based vector element sum (in-place).
Sum with in-place strategies of CUDA mode (reduce)
1. Comparing various launch configs for CUDA based vector element sum (in-place).
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...John Andrews
SlideShare Description for "Chatty Kathy - UNC Bootcamp Final Project Presentation"
Title: Chatty Kathy: Enhancing Physical Activity Among Older Adults
Description:
Discover how Chatty Kathy, an innovative project developed at the UNC Bootcamp, aims to tackle the challenge of low physical activity among older adults. Our AI-driven solution uses peer interaction to boost and sustain exercise levels, significantly improving health outcomes. This presentation covers our problem statement, the rationale behind Chatty Kathy, synthetic data and persona creation, model performance metrics, a visual demonstration of the project, and potential future developments. Join us for an insightful Q&A session to explore the potential of this groundbreaking project.
Project Team: Jay Requarth, Jana Avery, John Andrews, Dr. Dick Davis II, Nee Buntoum, Nam Yeongjin & Mat Nicholas
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,
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'));
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'