Professional Documents
Culture Documents
Assignment (S1800051)
Assignment (S1800051)
Assignment Scenario
ER-Modeling _________________________________________________ 2
An example SQL statement of populating a database table with values is below. One row with
the values below is inserted.
An SQL query to retrieve the exhibition details such as theme, start and end date for a specific
exhibition is below. The particular exhibition, “Grand Opening” is searched and found.
An SQL query to retrieve the range of available exhibitions for a particular date. Start date and
time range is given and searched only one was there for the particular search.
An SQL query to retrieve the average price of all tickets sold. The average of the tickets sold
here is 17.4286.
An SQL query to retrieve the number of tickets bought by a particular visitor. There are three
tickets bought by the person whose v_no is 2.
An SQL query to retrieve the email account of every visitor that visited any of exhibitions. Using
the particular query the email of the visitors are displayed.
Recreate Model in MongoDB
The database is created and the sample information for each collection is created. To create the
booking, we have to use the UI of the application. First the visitor will be created and then a
ticket will be created then payment should be done. After the payment is done the booking will
be confirmed. To retrieve a booking, type the pay_no to get the booking. In this case if the
booking is confirmed then it doesn’t need the ticket_no and increases the speed of the system.
Compare and Contrast Report
Introduction
In this report, I will be comparing between the two types of solutions of databases, relational
and non-relational. There will be contrast between the advantages and the disadvantages of
both the solutions. It will go into detail about the features in each of the solutions and will
examples of the databases using the particular solution.
The SQL data model which is the relational solution was designed to avoid redundancy and use
relations between data. Therefore in queries there are many joins which can be very inefficient
for large data sets. The data model for MongoDB, which refers to the non-relational solution, is
the simplest one. By using features like nested documents and arrays, it consists of three
collections of documents. (Konrad Fraczek, 2017).
Some of the disadvantages of relational database designs are as follows. Relational databases
do not support high scalability, until a certain point better hardware can be employed but
beyond that point the database must be distributed. One of the major disadvantage is data is
stored in relational database in form of tables; this structure can give rise to high complexity in
case data cannot be easily encapsulated in a table. Much of the features provided by relational
databases are not used hence simply add to the cost as well as the complexity of the database.
Relational Databases make use of SQL, which is featured to work on structured data, but SQL
can be highly complex when working with unstructured data making it hard to track down data.
When the amount of data turns huge the database has to be partitioned across multiple
servers, this partitioning poses several problems because joining tables in distributed servers is
not an easy task. So overall we need a system which could store large information in a better
way.
The benefits of using non-relational database are as follows. It loosens the requirement of
formatted data for storage, eliminating the need for fixed data model. Fast retrieval of
documents on the basis of its contents as the document store is used. Patterns of the data
could be found as there are nodes as the database uses graph data structure. Column-oriented
databases are comparatively efficient than row oriented one’s when new values for a column
are entered for all rows at once as column data can be written efficiently and replace old data
without altering any other columns for the rows. Object Oriented Databases also commonly
known as OODBMS), is a database system. It stores its data in the form of objects. This feature
supports inheritance and hence reusability similar as in object oriented programming. Grid
computing is exploited to manage heterogeneous and geographically distributed databases
while Cloud Computing provides easy access to remote hardware and storage resources thus
managing the unstructured data. XML database is a database management system that is used
to store XML data. XML mapping makes it easier to map the data.
References
Cornelia Győrödi, R. G. (2015). A Comparative Study of Relational and Non-Relational Database Models
in a Web- Based Application. (IJACSA) International Journal of Advanced Computer Science and
Applications, 78-83.
Konrad Fraczek, M. P.-W. (2017). Comparative analysis of relational andnon-relational databases in the
context ofperformance in web applications. In D. M.-M. Stanislaw Kozielski, Beyond Databases,
Architectures and Structures. Towards Efficient Solutions for Data Analysis and Knowledge
Representation (pp. 153-164). ustron.
Nishtha Jatana, S. P. (2012). A Survey and Comparison of Relational and Non-Relational Database.
International Journal of Engineering Research & Technology (IJERT), 1-5.