Escolar Documentos
Profissional Documentos
Cultura Documentos
Contents
Python object relational mapping software (ORM)..........................................................2
NoSQL Analysis........................................................................................................ 3
CSI (Continual Service Improvement)..........................................................................5
Database Design...................................................................................................... 8
Data Normalisation................................................................................................ 9
Table Design and Relationships............................................................................. 10
Class Diagram..................................................................................................... 11
SQL +................................................................................................................ 11
With regards to web utilising an ORM in web programming entire framework stacks
are available such as the following:
As the data model is in one place, the code is easily maintainable, reusable
and updatable (Stackoverflow 2010)
Allows a level of flexibility as you are utilising a programming language of your
own choice and hence by default your natural way of coding (Stackoverflow
2010)
The database system is abstracted hence enabling you to make changes
when required (Stackoverflow 2010)
Utilising this system enables you to use advantageous features of OOP such
as: data inheritance without errors (Stackoverflow 2010)
In order to effectively utilise it you have to learn how to use it and these
specific tools are not lightweight (Stackoverflow 2010)
Similarly with learning how to use it, the same issue arises when setting the
mapper up (Stackoverflow 2010)
Whilst abstraction of the database can be beneficial it necessitates you to
know what is occurring behind the scenes or else you become trapped
(Stackoverflow 2010)
With regards to normal queries performance will be reasonable but will always
perform better with substantial work implemented (Stackoverflow 2010)
References:
Oracle Docs (2015) Chapter 7. Object- Relational Mapping [online] available from <
http://docs.oracle.com/cd/E13189_01/kodo/docs316/ref_guide_mapping.html#
ref_guide_mapping_mappingtool > [09 Februrary 2015]
Python Central (2013) Introductory Tutorial of Pythons SQLAlchemy [online]
available from <
http://www.pythoncentral.io/introductory-tutorial-python-sqlalchemy/ > [09
February 2015]
Stackoverflow (2010) What is an ORM and where can I learn more about it? [online]
available from <
http://stackoverflow.com/questions/1279613/what-is-an-orm-and-where-can-ilearn-more-about-it > [16 February 2015]
NoSQL Analysis
NoSQL interpreted as Not Only SQL, (Structured Query Language).
NoSQL is a database that provides a mechanism for storage and recovery of data
that is modelled in other means than the tabular relations used in relational
databases.
The aim for this approach was to make a simple design, horizontal scaling and to
create finer control over availability. NoSQL databases are increasingly used in big
data and real-time web applications, it is also emphasized that they support SQL-like
query languages.
NoSQL makes use of various database technologies that were developed in
response to increasingly large volumes of data being stored, the frequency in which
it was being accessed and the processing needs of the data, in contrast to relational
databases which were not designed to cope with the scale and agility that modern
applications challenge databases with.
In contrast to relational databases, NoSQL databases are farther scalable and
provide greater performance, their data model addresses several issues that the
relational model was not designed to meet:
Large volumes of structures, semi-structured and unstructured data.
Agile sprints, quick iteration and frequent code pushes
Object-orientated programming that is easy to use and flexible.
Efficient scale-out architecture instead of expensive, monolithic architecture.
SQL databases requires to know what is being stored in advance, unlike relational
databases which require that schemas be defined before you can add data. Fitting
poorly with agile development approaches, each time a new feature is completed the
schema of the database also needs to be changes.
Differences between SQL and NoSQL databases:
SQL databases have only one type with minor variations, whereas NoSQL have
many different types including key-value stores, document databases, wide-column
stores and graph databases.
NoSQL was developed in the 2000s after the 1970s version of SQL was limited,
particularly the concerning scale, replication and unstructured data storage.
The data storage model for NoSQL varies based on the database type. E.G. keyvalue stores functions similarly to SQL databases however, they only have two
columns (key and value) with more complex information. SQL databases store
individual records as rows in tables with each column storing specific data, similar to
spread sheets.
Document databases on the other hand rid of the table-and-row model and store all
relevant data together in a single document in formats that are able to nest values
hierarchically, such as JSON or XML.
There are many types of NoSQL databases, including key-value stores, document
databases, wide column stores and graph databases. Developed in the 2000s in aid
to deal with the limitations of the SQL databases, particularly concerned with the
scale, replication and unstructured data storage. The data storage model varies
based on the database type, E.G. key-value stores function similarly to SQL
databases, but have two columns- key and value
NoSQL, unlike SQL is horizontally scaled, meaning that to add capacity, a database
administrator simply has to add more commodity servers or cloud instances. The
database spreads data across the necessary servers automatically.
NoSQL Database Types:
Document Database:
That pairs each key with a complex data structure known as a document/ documents
can contain several different key value pairs, key-array pairs or nested documents.
Graph Stores
Used to store information about networks, e.g. social connections. Including Neo4j
and Hypergraph DB.
Key-Value Stores
The simplest of NoSQL databases. Each item is stored as an attribute name or key,
with its value.
Wide Column Stores
E.G. Cassandra and HBase are enhanced for queries over large datasets, and store
columns of data together- instead of rows.
Examples of SQL databases/
MySQL, Postgres, Oracle Database
Examples of NoSQL databases/
Mongo dB, Cassandra, H Base, Neo4j
References:
Mongo DB inc. (2015). NoSQL Databases Explained. Available:
http://www.mongodb.com/nosql-explained. Last accessed 04th March 2015.
Unknown. (2014). Practical Examples of Databases. Available:
http://stackoverflow.com/questions/18198960/practical-example-for-eachtype-of-database-real-cases. Last accessed 04th March 2015.
In terms of service targets and goals we as a business feel that this implementation
process would not take a considerable amount of time as it is not a complicated task.
We would set ourselves targets to achieve and complete each stage of the ITIL cycle
within a designated time, we feel that each lifecycle stage would take roughly the
same amount of time to complete. We would complete one stage after the other as
was designed although we would be doing to continual process improvement
throughout.
Implementing
We as a business must monitor this change as part of our overall plan, this is known
as the Service Transition stage of the ITIL package. This process links in mainly with
the design and operation processes. Its function continues throughout the process
and is to give the client additional data in the form of graphs and charts. This would
help the client depict their financial data more quickly and easily thus making the
data processing tool a beneficial tool to our business. This would be carried out
through the various aspects of service transition, one of the main process would be
the validation and testing process as this ensures that the changes meet the needs
of the business. Another would be the transition planning and support as this
lifecycle is where we as a business build and test the service/product. This is also
important as this particular stage handles the day to day aspects of the transition
stage.
Measuring/Monitoring the solution
In order to measure our data processing tool we have to go through the service
operation processes and functions within the ITIL lifecycle. In order for us to measure
this process we would need to ensure the quality and efficiency of the
service/product which is being monitored within this lifecycle stage. This would be
done through various stages within the function and processes stage within the
operational stage of ITIL. Within the function stage of operations we would need to
assess the service desk, technical management, application management and IT
operations management. These functions would bring a team of workers together in
order to create the data processing tool. The processes of operations then comes
into play which consists of event management, incident management, request
management, problem management, and access management. Within the
processes function, objectives of testing the quality and efficiency of the data
processing tool would be established and these inputs would then be turned into
defined outputs with the results that our business needs.
We also go through implementing and monitoring the new feature. This aids in the
planning of the new feature as it highlights the main areas which the business needs
to configure if the change is to be made. Additionally the report highlights how and
why monitoring the feature is important thus the business can benefit from this when
it comes to that stage in the lifecycle of the product or service.
Database Design
From the project brief:
Each project is for a specific client and has a nominated project manager.
The project is divided into a number of work packages and employees bill
their time and expenses against a work package.
Each employee has a specific role, which defines the charging rate for the
client.
Over time, an employee can work on several work package associated with
the same project.
In addition, most, but not all work package have a number of associated
documents as deliverables, each of which may be written by more than one
employee.
Here is the ERD (Entity Relationship Diagram) based on the above points from the
brief:
Data Normalisation
0NF
clientID
firstName
lastName
address
dob
contactNumber
1NF
tblClient
clientID
firstName
lastName
address
dob
2NF
tblClient
clientID
firstName
lastName
address
dob
projectID
projectName
startDate
endDate
projectCost
contactNumber
projectID
projectName
startDate
endDate
contactNumber
projectID
projectName
startDate
endDate
actualCost
workPackageID
title
time
actualExpenses
estimatedExpenses
projectCost
actualCost
projectCost
actualCost
tblEmployee
employeeID
empl_firstName
tblEmployee
employeeID
empl_firstName
documentID
empl_lastName
empl_lastName
name
type
empl_address
empl_dob
status
employeeID
empl_firstName
empl_lastName
empl_address
empl_dob
empl_contactNumb
er
roleID
empl_contactNumber
roleID
roleName
chargingRate
empl_address
empl_dob
empl_contactNu
mber
roleID
roleName
chargingRate
tblWorkpackage
tblDocument
workPackageID
projectID*
documentID
name
roleName
documentID*
type
chargingRate
employeeID*
title
time
status
actualExpenses
workPackageID
estimatedExpenses
name
projectID*
documentID*
tblWorkpackage
3NF
tblClient
clientID
firstName
lastName
address
dob
contactNum
ber
tblProject
projectID
clientID*
projectNam
e
startDate
endDate
projectCost
actualCost
tblDocumen
t
documentI
D
name
type
status
tblRole
roleID
roleName
chargingRat
e
tblEmploye
e
employeeI
D
roleID*
empl_firstName
empl_lastNa
me
empl_addre
ss
empl_dob
type
status
employeeID*
title
time
actualExpenses
estimatedExpens
es
Design explained:
empl_contactNumbe
r
tblWorkpackage
workPacka
geID
projectID*
documentID
*
employeeID
*
title
time
actualExpen
ses
estimatedExpenses
Class Diagram
A class diagram is a visual structure representing a system structure by outlining its
classes, attributes, operations and the relations between each object.
The diagram above conveys the classes in our system, their respective their
attributes and how they are retrieved using python, which is outlined by the
operations.
Each member of our group will implement at least one of these classes into Python.
We will be using the ORM SqlAlchemy to connect our database to python.
SQL +
This process was repeated for all other tables with appropriate data types and
constraints as shown previously in the first screenshots showing the tables.
SQL Queries