3. NoSQL databases, Normalisation, and Triggers [5 marks] (b) Explain a scenario
ID: 3875663 • Letter: 3
Question
3. NoSQL databases, Normalisation, and Triggers [5 marks] (b) Explain a scenario where a graph database is more appropriate to use [5 marks] (c) Relational databases are often normalised. Explain what it means for a [5 marks] (d) Let the relation schema R(a, b, c, d, e, f,g) have the set of full functional (a) What is a NoSQL database? than a relational database schema to be in 3rd Normal Form dependencies listed below (a,b) e (a,b) g {a,b,c) f i. Explain why fa, b) is not a key for this schema R. [4 marks] ii. Bring relational schema R into Third Normal Form. Explain all steps and make sure you declare primary and foreign keys for each [13 marks] (e) When converting a one-to-many relationship of an Entity-Relationship model into a logical (relational) model, only one of its participation constraints can be naturally translated. Which one is that and how will this constraint be represented in the relational schema?[5 marks (f) Assume a MySQL database has been implemented according to the schema that you introduce during normalisation following relational database schema Staff (staffNo,fname, lname, branchNo) primary key stafINo foreign key branchNo references Branch(branchNo) Branch(branchNo, name, address,number0fStaff) primary key branchNo Write one or several triggers (as appropriate) that automatically update and maintain numberOfStaff in Branch as a derived attribute of type INT. This means the value of numberOfStaff in a branch record must always be the number of staff currently assigned to this branch according to the Staff table Make sure your code is MySQL 5 compliant. [13 marks]Explanation / Answer
a) NO-SQL are non-relational databases that have variety of data models, including document, graph, key-value, and columnar.NoSQL databases are increasingly used in big data and real-time web applications for better processing. NoSQL databases are known in applications that require ease of development, scalable performance, high availability, and resilience.
b) Graph databases are in some form an evolution from RDBMS that is optimized for connected data. Graph databases are compelling because they enable companies to make sense of the masses of connected data that exist today. Fraud Detection and Knowledge Graph are two applications where graph databases would be more useful than Relational databases because of the huge and a lot of tables that need to be joined.
c) The third normal form (3NF) is a normal form used in database normalization. Once a table is in second normal form, it means that every column is dependent on the primary key. So the aim of 3rd normal form is a database design used to reduce the duplication of data and ensure referential integrity by ensuring 2 things:
1. It is in 2nd Normal form
2. It contains only columns that are non-transitively dependent on the primary key
which means all the attributes in a table are determined only by the candidate keys of that relation and not by any non-prime attributes.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.