... | ... | @@ -20,34 +20,32 @@ In this task, you are being given some fake answers to a real past exam question |
|
|
|
|
|
> The software startup company you work for has recently been commissioned to develop a web application for a tattoo parlour. The app is intended to allow clients to view examples of artists' work, and book appointments with their chosen artist.
|
|
|
|
|
|
i. Your line manager has advised you to use the MySQL DBMS for this application. Design a simple relational schema for the application. Use an appropriate form of notation, such as an ER diagram.
|
|
|
1. Your line manager has advised you to use the MySQL DBMS for this application. Design a simple relational schema for the application. Use an appropriate form of notation, such as an ER diagram.
|
|
|
Indicate which MySQL datatypes each field in the schema will use, and, where applicable, indicate where any integrity constraints will be applied. [10]
|
|
|
ii. Another developer in your team suggests that MongoDB would offer a more `scalable' back-end solution than MySQL. What type of database is MongoDB, and why do you think they consider it a more `scalable’ solution than MySQL? [4]
|
|
|
iii. The application middleware will be written in Python. You suggest that, with careful design, it would be possible to port between MySQL and MongoDB at a later date.
|
|
|
|
|
|
Suggest ways this could be accomplished which would minimise the need for rewriting code.
|
|
|
|
|
|
2. Another developer in your team suggests that MongoDB would offer a more 'scalable' back-end solution than MySQL. What type of database is MongoDB, and why do you think they consider it a more 'scalable' solution than MySQL? [4]
|
|
|
3. The application middleware will be written in Python. You suggest that, with careful design, it would be possible to port between MySQL and MongoDB at a later date.
|
|
|
*Suggest ways in which this could be accomplished and with minimal need for rewriting code.*
|
|
|
For full marks you should explain how and why any techniques or principles you've identified are beneficial.You will be writing the middleware of the application in PHP. What techniques could you implement in your server-side scripts to help maintain the integrity of data in the database? In your answer, show you have considered where in the app the greatest security vulnerabilities will lie. [6]
|
|
|
|
|
|
### The mark scheme
|
|
|
|
|
|
i. Marks to be awarded for:
|
|
|
1. Marks to be awarded for:
|
|
|
- Appropriate tables, consistently named (1-2)
|
|
|
- Appropriate fields, consistently named (1-2)
|
|
|
- Appropriate notation (and legibibility) (1)
|
|
|
- Appropriate notation (and legibility) (1)
|
|
|
- Indication of appropriate integrity constraints, including at least 2 foreign key constraints, and primary keys in all tables (1-3)
|
|
|
- Appropriate data types indicated (1-2)
|
|
|
ii. Marks for any of the following or similar salient point, to a maximum of 4 marks:
|
|
|
2. Marks for any of the following or similar salient point, to a maximum of 4 marks:
|
|
|
- MongoDB is a document-based data store OR
|
|
|
- MongoDB is a ``Not Only SQL''/non-relational solution (1)
|
|
|
- MongoDB is a 'Not Only SQL'/non-relational solution (1)
|
|
|
- Document-based data stores lend themselve better to horizontal scaling as discrete documents are easily distributed across multiple servers. MySQL does not scale well without sharding logic being built into the application (2)
|
|
|
- MongoDB supports data replication, which can help the system maintain efficiency as the userbase grows and there are more simultaneous connections to the database (2)
|
|
|
- MongoDB is better adapted for dealing with big data and analytical types of database queries, which would be required when analysing large sets of learner data (2)
|
|
|
- NOSQL data tends to be serialized by column, which may make query performance increase if the data set is large. (2)
|
|
|
iii. Marks may be awarded for any of the following or other salient point, to a maximum of 6:
|
|
|
3. Marks may be awarded for any of the following or other salient point, to a maximum of 6:
|
|
|
- The app should be written with portability in mind (1)
|
|
|
- Logic should be separate from presentation (1)
|
|
|
- There would be ``separation of concerns'', meaning parts of the app that serve a related purpose are developed and maintained separately. This makes it possible to change/upgrade part of an app without the need to rewrite all other parts. (1-3)
|
|
|
- There would be 'separation of concerns', meaning parts of the app that serve a related purpose are developed and maintained separately. This makes it possible to change/upgrade part of an app without the need to rewrite all other parts. (1-3)
|
|
|
- Adopting OOP paradigm and creating classes to encapsulate data and behaviour associated with objects of a given type would improve portability. (1-3)
|
|
|
- Python provides different APIs for interfacing with each type of database (Pymongo, MySQL Connector). (1)
|
|
|
- Adopting MVC architecture (Model-View-Controller) means objects in the application are categorised as model (meaning they process data), view (meaning objects a user interacts with), or controller (meaning objects which communicate new or changed data to model objects). If implemented correctly, theoretically, only the controller objects would need rewriting, assuming the data stayed the same. (1-4)
|
... | ... | @@ -56,7 +54,7 @@ iii. Marks may be awarded for any of the following or other salient point, to a |
|
|
|
|
|
## Task 2: Devise a mark scheme
|
|
|
|
|
|
+ Still in your group of 4, pick one of the questions from Tuesday's ``Question Carousel'', or another from a Past Paper
|
|
|
+ Still in your group of 4, pick one of the questions from Tuesday's 'Question Carousel', or another from a Past Paper
|
|
|
+ Split into 2 groups of 2
|
|
|
+ Working in your pair, study the following question and prepare a mark scheme for it. Your mark scheme will take into account the marks available for each part of the question. It should consider a range of likely acceptable answers, providing a model answer where appropriate.
|
|
|
|
... | ... | @@ -83,4 +81,6 @@ Still in your pair, have a go at writing what you think ought to be a model answ |
|
|
|
|
|
---
|
|
|
|
|
|
Repeat the process for another question. Your group could even make up its own question! If you do that, why not share it on the Practice Questions forum? |
|
|
## Bonus round
|
|
|
|
|
|
Repeat the process for another question. Your group could even make up its own question! If you do that, *why not share it on the Practice Questions forum?* |