SlideShare a Scribd company logo
1 of 11
Part 1: SQL/Database work
Scenario
Development of a relational database system for a food
producing company
FoodRU is a Leicester-based food producing company. The
company wants to keep details regarding both past and present
employees and their assignment to shifts over time. At present,
there are three defined shift patterns; the morning shift starts at
6am and finishes at 2pm, the day shift starts at 9am and finishes
at 5pm, and the evening shift starts at 4pm and finishes at 12am
(midnight). However, management have already indicated that
they may need to add further shift patterns in the future (e.g.,
by adding a night shift to the existing ones so that the company
can meet a high user demand for their foods). They therefore
require shift details to be stored within a separate Shift table,
with attributes that allow the storage of a shift name with its
associated start and finish times (use the 24 hour clock for these
times).
Past and present employee details are to be kept in the same
Employee table, and the details to be kept are the employee’s
unique 6 digit reference number, the first name, surname and
any other names (if there are any) of the employee, the
employee’s gender, contact address and contact telephone, the
date on which the employee started his/her employment at the
company and the date on which the employee finished his/her
employment at the company (should s/he be a past employee).
Details regarding staff assignments to shifts include the date
that an employee was allocated to work a particular shift, and
the date that s/he was taken off the shift (if not still assigned to
it). Employees can be assigned to different shifts over time and
even to the same shift over different time periods, although they
cannot be assigned to more than one shift at any one time. A
new employee may not yet be assigned to a shift.
Tasks:
1. Provide the table specifications for the THREE tables that
are required by FoodRU to store employee, shift and assignment
details. That is, for each of the three tables, you should provide,
in a suitable presentation format, the name of the table and a
specification of each its attributes to include:
• Attribute name
• Attribute brief description as to its meaning
• a description of the attribute’s data type/integrity (e.g.,
date field, character field of length 20, number field <= 10, etc.
– you can use the Oracle data types within these descriptions if
you want to)
• An indication as to whether the attribute is a primary key
attribute and/or foreign key attribute
• An indication as to whether the attribute can or cannot take
null values
Make sure your design specifies the appropriate links between
the three tables. Remember to write down any additional
integrity you need to enforce either at a specific table level or
across two or more tables, if this is required. Also, remember to
write down any justifications for the data types/integrity or for
any other design features that you have introduced, and/or any
assumptions that you have made at any time during your design.
2. Create the THREE tables you have designed in Question 1.
above, and populate the tables with some example data (at least
5 employees (some past and some current), appropriate shift
details, and at least one shift allocation for most (but not all) of
the employees). For the Employee table ONLY, provide a
series of tests and their results so that you can be confident that
the table was set up properly. This involves testing any entity
integrity, referential integrity and other data validation
constraints using appropriate SQL statements. Print out the test
and its results, and annotate to specify the intention of each
test.
3. Create and justify THREE queries that you think FoodRU
would like to use. Make sure that your queries, in total, show
you are able to use the following facilities in Oracle SQL*Plus:
o Selection of particular table columns
o Selection of particular table rows
o Inner Join of at least 2 tables
o Use of a sorting/ordering facility
o Use of DISTINCT
o A condition using “[removed]”, IS NULL, IS NOT NULL,
or similar.
None of your queries should output an empty table!
You are required to submit:
• The completed table specifications for the required three
tables. These should be written using an appropriate text editor.
• All the CREATE TABLE and INSERT INTO Oracle
SQL*Plus statements used to create the three tables and to
populate them with suitable data, together with a printout of
each of the Oracle tables (i.e., the extension of each table) that
you have created and populated.
• The series of tests, and their results and annotations, for
the Employee table ONLY.
• A printout of the three queries you devised, showing both
the SQL code and the query result. You should provide a brief
explanation of what you expect each query to achieve and why
you think this query is relevant to FoodRU.
Marking Criteria
Generic explanation of criteria:
In order to achieve an A grade, the work must be excellent in
almost all respects, only very minor limitations.
In order to achieve a B grade, the work should show strength in
most respects, but perhaps has limitations in one or two areas. A
good piece of work nevertheless.
In order to achieve a C grade, the work should be of a
satisfactory standard, showing strength in some areas, but
perhaps let down by either poor presentation, poor practical
work, or poor written explanations where required.
In order to achieve a D grade, the work should be of a
satisfactory standard but may have significant shortcomings in
some areas. Nevertheless shows at least a basic understanding
of the concepts and a basic practical ability.
A E grade will be given to work that is just unsatisfactory.
An F grade will be given where the work contains serious
errors/limitations.
The following grid gives more guidance re: marking of specific
tasks:
TASK [removed]70%
Table specifications Poor or no attempt Basic understanding
displayed Fair understanding displayed Good Understanding
displayed Excellent understanding displayed - full and
appropriate table specifications in correct format
Creation of tables with integrity rules implemented
Inappropriate tables, poor attempt at implementing defined
integrity rules Some tables and associated integrity rules
created correctly Satisfactory
but with some significant errors/ limitations As for A but with
some minor errors/ limitations All tables created correctly,
including foreign keys. Appropriate implementation of integrity
rules
Testing of Employee table creation Poor or no attempt Basic
testing evident Fair testing evident Good testing evident
Excellent, well thought out and complete series of tests
and associated results
Development of three queries as described above, with reasons
for choice of query Little or no evidence of successful/
appropriate query development Some evidence of sensible
choice and implementation of queries Satisfactory
but with some significant errors/ limitations As for A but with
some minor errors/ limitations. Excellent choice and
implementation of queries, demonstrating appropriate use of all
required querying facilities.
OVERALL MARK:
ANY OVERALL COMMENTS:
Part 2: Haskell work
Consider the following Haskell program.
module Main where
import Data.Char (isPunctuation,toLower)
import Data.List (nub,sort)
strip :: [Char] -> [Char]
strip cs = [ c | c [removed] [Char]
lower cs = [ toLower c | c <- cs ]
prog = unlines . nub . sort . words . lower . strip
main = interact prog
You have been asked to give a lecture explaining in detail what
this program does and how it works.
You should produce a PowerPoint presentation containing about
20 slides in which you provide a full explanation (with
examples) of the program and how it works. You may assume
that your audience consists of first year functional programming
students who have a reasonable working knowledge of Haskell.
However, you should ensure that each aspect of the program
(including programming language features, standard functions,
etc.) is fully explained so that everyone has a chance to
understand the lecture fully.
You should ensure that your slides appear professional. Take
care with general layout and avoid spelling mistakes.
You should hand in a printed copy of your PowerPoint
presentation by the deadline and you should also upload your
slides to Blackboard.
The following grid gives more guidance re: marking of specific
tasks:
TASK [removed]70%
Quantity of work (i.e. how many slides and what is on them)
Poor or no attempt
Bare minimum explanation
Covers most of the main points
Covers all the main points
Covers all the main points and provides extra, appropriate and
relevant, supporting information
Quality of explanation (i.e. the depth of the understanding
demonstrated and conveyed)
Inadequate or superficial explanation
Reasonable explanation of the some of the main concepts
Good explanation of most of the main concepts
Very good explanation of most of the main concepts
Outstanding explanation that covers all of the main concepts
and also includes some of the subtler points in the code
Quality of slides (i.e. how do they look; how is the information
presented?, is it a coherent lecture?)
Confusing, badly structured, inconsistent, poor English, etc.
Consistent presentable,
Good set of slides: well structured
Very good set of slides: well structured and presented
Outstanding set of slides: thoroughly consistent, well laid out,
good quality English, etc.

More Related Content

Similar to Part 1 SQLDatabase workScenarioDevelopment of a relationa.docx

Microsoft Excel Tips
Microsoft Excel TipsMicrosoft Excel Tips
Microsoft Excel Tipsmifarooqui
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docxjane3dyson92312
 
Excel Useful Tips
Excel Useful TipsExcel Useful Tips
Excel Useful TipsParul_100in
 
Cis336 week 7 i lab 7
Cis336 week 7 i lab 7Cis336 week 7 i lab 7
Cis336 week 7 i lab 7CIS339
 
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docxAB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docxbartholomeocoombs
 
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docxCS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docxannettsparrow
 
Excel tips%20simple%20tax%20india%20dot%20org
Excel tips%20simple%20tax%20india%20dot%20orgExcel tips%20simple%20tax%20india%20dot%20org
Excel tips%20simple%20tax%20india%20dot%20orgSeshasalam Murugesan
 
Introduction to SQL, SQL*Plus
Introduction to SQL, SQL*PlusIntroduction to SQL, SQL*Plus
Introduction to SQL, SQL*PlusChhom Karath
 

Similar to Part 1 SQLDatabase workScenarioDevelopment of a relationa.docx (20)

Microsoft Excel Tips
Microsoft Excel TipsMicrosoft Excel Tips
Microsoft Excel Tips
 
Excel tips 172
Excel tips 172Excel tips 172
Excel tips 172
 
SQL Tunning
SQL TunningSQL Tunning
SQL Tunning
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
 
Excel Tips 101
Excel Tips 101Excel Tips 101
Excel Tips 101
 
Excel tips
Excel tipsExcel tips
Excel tips
 
Excel Useful Tips
Excel Useful TipsExcel Useful Tips
Excel Useful Tips
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Excel tips
Excel tipsExcel tips
Excel tips
 
Cis336 week 7 i lab 7
Cis336 week 7 i lab 7Cis336 week 7 i lab 7
Cis336 week 7 i lab 7
 
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docxAB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
AB Database Assignment 1 –FOR STUDENTS TO COMPLETEFirst create .docx
 
Excel Tips.pptx
Excel Tips.pptxExcel Tips.pptx
Excel Tips.pptx
 
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docxCS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
CS 111 - Homework 5 p. 1CS 111 - Homework 5Deadline1.docx
 
Excel useful tips
Excel useful tipsExcel useful tips
Excel useful tips
 
Excel tips%20simple%20tax%20india%20dot%20org
Excel tips%20simple%20tax%20india%20dot%20orgExcel tips%20simple%20tax%20india%20dot%20org
Excel tips%20simple%20tax%20india%20dot%20org
 
35 excel tips
35 excel tips35 excel tips
35 excel tips
 
Excel tips
Excel tipsExcel tips
Excel tips
 
Excel tips
Excel tipsExcel tips
Excel tips
 
SQL_Part1
SQL_Part1SQL_Part1
SQL_Part1
 
Introduction to SQL, SQL*Plus
Introduction to SQL, SQL*PlusIntroduction to SQL, SQL*Plus
Introduction to SQL, SQL*Plus
 

More from MARRY7

Part 1.....InstructionsSelect one of the age groups disc.docx
Part 1.....InstructionsSelect one of the age groups disc.docxPart 1.....InstructionsSelect one of the age groups disc.docx
Part 1.....InstructionsSelect one of the age groups disc.docxMARRY7
 
Part 1 – Add to Website PlanList at least three .docx
Part 1 – Add to Website PlanList at least three .docxPart 1 – Add to Website PlanList at least three .docx
Part 1 – Add to Website PlanList at least three .docxMARRY7
 
Part 1 True or False Questions. (10 questions at 1 point each).docx
Part 1 True or False Questions. (10 questions at 1 point each).docxPart 1 True or False Questions. (10 questions at 1 point each).docx
Part 1 True or False Questions. (10 questions at 1 point each).docxMARRY7
 
Part 11. Why is it so important in system engineering to become .docx
Part 11. Why is it so important in system engineering to become .docxPart 11. Why is it so important in system engineering to become .docx
Part 11. Why is it so important in system engineering to become .docxMARRY7
 
Part 1 Using the internet, search for commercial IDPS systems. What.docx
Part 1 Using the internet, search for commercial IDPS systems. What.docxPart 1 Using the internet, search for commercial IDPS systems. What.docx
Part 1 Using the internet, search for commercial IDPS systems. What.docxMARRY7
 
Part 1- Create an outline of the assignment below thenPart 2-1000 .docx
Part 1- Create an outline of the assignment below thenPart 2-1000 .docxPart 1- Create an outline of the assignment below thenPart 2-1000 .docx
Part 1- Create an outline of the assignment below thenPart 2-1000 .docxMARRY7
 
Part 1 Review QuestionsWhat is the difference between criminal la.docx
Part 1 Review QuestionsWhat is the difference between criminal la.docxPart 1 Review QuestionsWhat is the difference between criminal la.docx
Part 1 Review QuestionsWhat is the difference between criminal la.docxMARRY7
 
Part 1 Review QuestionsWhat is the difference between authenticat.docx
Part 1 Review QuestionsWhat is the difference between authenticat.docxPart 1 Review QuestionsWhat is the difference between authenticat.docx
Part 1 Review QuestionsWhat is the difference between authenticat.docxMARRY7
 
Part 1 Review QuestionsWhat functions constitute a complete infor.docx
Part 1 Review QuestionsWhat functions constitute a complete infor.docxPart 1 Review QuestionsWhat functions constitute a complete infor.docx
Part 1 Review QuestionsWhat functions constitute a complete infor.docxMARRY7
 
Part 1A persons lifestyle has a significant influence on the p.docx
Part 1A persons lifestyle has a significant influence on the p.docxPart 1A persons lifestyle has a significant influence on the p.docx
Part 1A persons lifestyle has a significant influence on the p.docxMARRY7
 
Part 1 Review QuestionsWhat is the definition of information secu.docx
Part 1 Review QuestionsWhat is the definition of information secu.docxPart 1 Review QuestionsWhat is the definition of information secu.docx
Part 1 Review QuestionsWhat is the definition of information secu.docxMARRY7
 
Part 1 Review QuestionsWhat is a security modelWhat are the es.docx
Part 1 Review QuestionsWhat is a security modelWhat are the es.docxPart 1 Review QuestionsWhat is a security modelWhat are the es.docx
Part 1 Review QuestionsWhat is a security modelWhat are the es.docxMARRY7
 
Part 1 Listed below are several key Supreme Court decisions that .docx
Part 1 Listed below are several key Supreme Court decisions that .docxPart 1 Listed below are several key Supreme Court decisions that .docx
Part 1 Listed below are several key Supreme Court decisions that .docxMARRY7
 
Part 1 Infrastructure DesignCreate an 8–10-page infrastructur.docx
Part 1 Infrastructure DesignCreate an 8–10-page infrastructur.docxPart 1 Infrastructure DesignCreate an 8–10-page infrastructur.docx
Part 1 Infrastructure DesignCreate an 8–10-page infrastructur.docxMARRY7
 
part 1 I attended an international conference on Biotechnology and .docx
part 1 I attended an international conference on Biotechnology and .docxpart 1 I attended an international conference on Biotechnology and .docx
part 1 I attended an international conference on Biotechnology and .docxMARRY7
 
Part 1 Chapter 7 Summary plus end of chapter discussion of Alfred.docx
Part 1 Chapter 7 Summary plus end of chapter discussion of Alfred.docxPart 1 Chapter 7 Summary plus end of chapter discussion of Alfred.docx
Part 1 Chapter 7 Summary plus end of chapter discussion of Alfred.docxMARRY7
 
Parent Involvement Plan This week you will create a Parent Involve.docx
Parent Involvement Plan This week you will create a Parent Involve.docxParent Involvement Plan This week you will create a Parent Involve.docx
Parent Involvement Plan This week you will create a Parent Involve.docxMARRY7
 
Parenting Practices Over GenerationsGeneration 1 Years children.docx
Parenting Practices Over GenerationsGeneration 1 Years children.docxParenting Practices Over GenerationsGeneration 1 Years children.docx
Parenting Practices Over GenerationsGeneration 1 Years children.docxMARRY7
 
ParamsThe interface must be pleasing to look at (a basic form wit.docx
ParamsThe interface must be pleasing to look at (a basic form wit.docxParamsThe interface must be pleasing to look at (a basic form wit.docx
ParamsThe interface must be pleasing to look at (a basic form wit.docxMARRY7
 
ParamsThe interface must be pleasing to look at. There must be .docx
ParamsThe interface must be pleasing to look at. There must be .docxParamsThe interface must be pleasing to look at. There must be .docx
ParamsThe interface must be pleasing to look at. There must be .docxMARRY7
 

More from MARRY7 (20)

Part 1.....InstructionsSelect one of the age groups disc.docx
Part 1.....InstructionsSelect one of the age groups disc.docxPart 1.....InstructionsSelect one of the age groups disc.docx
Part 1.....InstructionsSelect one of the age groups disc.docx
 
Part 1 – Add to Website PlanList at least three .docx
Part 1 – Add to Website PlanList at least three .docxPart 1 – Add to Website PlanList at least three .docx
Part 1 – Add to Website PlanList at least three .docx
 
Part 1 True or False Questions. (10 questions at 1 point each).docx
Part 1 True or False Questions. (10 questions at 1 point each).docxPart 1 True or False Questions. (10 questions at 1 point each).docx
Part 1 True or False Questions. (10 questions at 1 point each).docx
 
Part 11. Why is it so important in system engineering to become .docx
Part 11. Why is it so important in system engineering to become .docxPart 11. Why is it so important in system engineering to become .docx
Part 11. Why is it so important in system engineering to become .docx
 
Part 1 Using the internet, search for commercial IDPS systems. What.docx
Part 1 Using the internet, search for commercial IDPS systems. What.docxPart 1 Using the internet, search for commercial IDPS systems. What.docx
Part 1 Using the internet, search for commercial IDPS systems. What.docx
 
Part 1- Create an outline of the assignment below thenPart 2-1000 .docx
Part 1- Create an outline of the assignment below thenPart 2-1000 .docxPart 1- Create an outline of the assignment below thenPart 2-1000 .docx
Part 1- Create an outline of the assignment below thenPart 2-1000 .docx
 
Part 1 Review QuestionsWhat is the difference between criminal la.docx
Part 1 Review QuestionsWhat is the difference between criminal la.docxPart 1 Review QuestionsWhat is the difference between criminal la.docx
Part 1 Review QuestionsWhat is the difference between criminal la.docx
 
Part 1 Review QuestionsWhat is the difference between authenticat.docx
Part 1 Review QuestionsWhat is the difference between authenticat.docxPart 1 Review QuestionsWhat is the difference between authenticat.docx
Part 1 Review QuestionsWhat is the difference between authenticat.docx
 
Part 1 Review QuestionsWhat functions constitute a complete infor.docx
Part 1 Review QuestionsWhat functions constitute a complete infor.docxPart 1 Review QuestionsWhat functions constitute a complete infor.docx
Part 1 Review QuestionsWhat functions constitute a complete infor.docx
 
Part 1A persons lifestyle has a significant influence on the p.docx
Part 1A persons lifestyle has a significant influence on the p.docxPart 1A persons lifestyle has a significant influence on the p.docx
Part 1A persons lifestyle has a significant influence on the p.docx
 
Part 1 Review QuestionsWhat is the definition of information secu.docx
Part 1 Review QuestionsWhat is the definition of information secu.docxPart 1 Review QuestionsWhat is the definition of information secu.docx
Part 1 Review QuestionsWhat is the definition of information secu.docx
 
Part 1 Review QuestionsWhat is a security modelWhat are the es.docx
Part 1 Review QuestionsWhat is a security modelWhat are the es.docxPart 1 Review QuestionsWhat is a security modelWhat are the es.docx
Part 1 Review QuestionsWhat is a security modelWhat are the es.docx
 
Part 1 Listed below are several key Supreme Court decisions that .docx
Part 1 Listed below are several key Supreme Court decisions that .docxPart 1 Listed below are several key Supreme Court decisions that .docx
Part 1 Listed below are several key Supreme Court decisions that .docx
 
Part 1 Infrastructure DesignCreate an 8–10-page infrastructur.docx
Part 1 Infrastructure DesignCreate an 8–10-page infrastructur.docxPart 1 Infrastructure DesignCreate an 8–10-page infrastructur.docx
Part 1 Infrastructure DesignCreate an 8–10-page infrastructur.docx
 
part 1 I attended an international conference on Biotechnology and .docx
part 1 I attended an international conference on Biotechnology and .docxpart 1 I attended an international conference on Biotechnology and .docx
part 1 I attended an international conference on Biotechnology and .docx
 
Part 1 Chapter 7 Summary plus end of chapter discussion of Alfred.docx
Part 1 Chapter 7 Summary plus end of chapter discussion of Alfred.docxPart 1 Chapter 7 Summary plus end of chapter discussion of Alfred.docx
Part 1 Chapter 7 Summary plus end of chapter discussion of Alfred.docx
 
Parent Involvement Plan This week you will create a Parent Involve.docx
Parent Involvement Plan This week you will create a Parent Involve.docxParent Involvement Plan This week you will create a Parent Involve.docx
Parent Involvement Plan This week you will create a Parent Involve.docx
 
Parenting Practices Over GenerationsGeneration 1 Years children.docx
Parenting Practices Over GenerationsGeneration 1 Years children.docxParenting Practices Over GenerationsGeneration 1 Years children.docx
Parenting Practices Over GenerationsGeneration 1 Years children.docx
 
ParamsThe interface must be pleasing to look at (a basic form wit.docx
ParamsThe interface must be pleasing to look at (a basic form wit.docxParamsThe interface must be pleasing to look at (a basic form wit.docx
ParamsThe interface must be pleasing to look at (a basic form wit.docx
 
ParamsThe interface must be pleasing to look at. There must be .docx
ParamsThe interface must be pleasing to look at. There must be .docxParamsThe interface must be pleasing to look at. There must be .docx
ParamsThe interface must be pleasing to look at. There must be .docx
 

Recently uploaded

Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

Part 1 SQLDatabase workScenarioDevelopment of a relationa.docx

  • 1. Part 1: SQL/Database work Scenario Development of a relational database system for a food producing company FoodRU is a Leicester-based food producing company. The company wants to keep details regarding both past and present employees and their assignment to shifts over time. At present, there are three defined shift patterns; the morning shift starts at 6am and finishes at 2pm, the day shift starts at 9am and finishes at 5pm, and the evening shift starts at 4pm and finishes at 12am (midnight). However, management have already indicated that they may need to add further shift patterns in the future (e.g., by adding a night shift to the existing ones so that the company can meet a high user demand for their foods). They therefore require shift details to be stored within a separate Shift table, with attributes that allow the storage of a shift name with its associated start and finish times (use the 24 hour clock for these times). Past and present employee details are to be kept in the same Employee table, and the details to be kept are the employee’s unique 6 digit reference number, the first name, surname and any other names (if there are any) of the employee, the employee’s gender, contact address and contact telephone, the date on which the employee started his/her employment at the company and the date on which the employee finished his/her
  • 2. employment at the company (should s/he be a past employee). Details regarding staff assignments to shifts include the date that an employee was allocated to work a particular shift, and the date that s/he was taken off the shift (if not still assigned to it). Employees can be assigned to different shifts over time and even to the same shift over different time periods, although they cannot be assigned to more than one shift at any one time. A new employee may not yet be assigned to a shift. Tasks: 1. Provide the table specifications for the THREE tables that are required by FoodRU to store employee, shift and assignment details. That is, for each of the three tables, you should provide, in a suitable presentation format, the name of the table and a specification of each its attributes to include: • Attribute name • Attribute brief description as to its meaning • a description of the attribute’s data type/integrity (e.g., date field, character field of length 20, number field <= 10, etc. – you can use the Oracle data types within these descriptions if you want to) • An indication as to whether the attribute is a primary key attribute and/or foreign key attribute • An indication as to whether the attribute can or cannot take null values
  • 3. Make sure your design specifies the appropriate links between the three tables. Remember to write down any additional integrity you need to enforce either at a specific table level or across two or more tables, if this is required. Also, remember to write down any justifications for the data types/integrity or for any other design features that you have introduced, and/or any assumptions that you have made at any time during your design. 2. Create the THREE tables you have designed in Question 1. above, and populate the tables with some example data (at least 5 employees (some past and some current), appropriate shift details, and at least one shift allocation for most (but not all) of the employees). For the Employee table ONLY, provide a series of tests and their results so that you can be confident that the table was set up properly. This involves testing any entity integrity, referential integrity and other data validation constraints using appropriate SQL statements. Print out the test and its results, and annotate to specify the intention of each test. 3. Create and justify THREE queries that you think FoodRU would like to use. Make sure that your queries, in total, show you are able to use the following facilities in Oracle SQL*Plus: o Selection of particular table columns o Selection of particular table rows
  • 4. o Inner Join of at least 2 tables o Use of a sorting/ordering facility o Use of DISTINCT o A condition using “[removed]”, IS NULL, IS NOT NULL, or similar. None of your queries should output an empty table! You are required to submit: • The completed table specifications for the required three tables. These should be written using an appropriate text editor. • All the CREATE TABLE and INSERT INTO Oracle SQL*Plus statements used to create the three tables and to populate them with suitable data, together with a printout of each of the Oracle tables (i.e., the extension of each table) that you have created and populated. • The series of tests, and their results and annotations, for the Employee table ONLY.
  • 5. • A printout of the three queries you devised, showing both the SQL code and the query result. You should provide a brief explanation of what you expect each query to achieve and why you think this query is relevant to FoodRU. Marking Criteria Generic explanation of criteria: In order to achieve an A grade, the work must be excellent in almost all respects, only very minor limitations. In order to achieve a B grade, the work should show strength in most respects, but perhaps has limitations in one or two areas. A good piece of work nevertheless. In order to achieve a C grade, the work should be of a satisfactory standard, showing strength in some areas, but perhaps let down by either poor presentation, poor practical work, or poor written explanations where required.
  • 6. In order to achieve a D grade, the work should be of a satisfactory standard but may have significant shortcomings in some areas. Nevertheless shows at least a basic understanding of the concepts and a basic practical ability. A E grade will be given to work that is just unsatisfactory. An F grade will be given where the work contains serious errors/limitations. The following grid gives more guidance re: marking of specific tasks: TASK [removed]70% Table specifications Poor or no attempt Basic understanding displayed Fair understanding displayed Good Understanding displayed Excellent understanding displayed - full and appropriate table specifications in correct format Creation of tables with integrity rules implemented Inappropriate tables, poor attempt at implementing defined integrity rules Some tables and associated integrity rules created correctly Satisfactory
  • 7. but with some significant errors/ limitations As for A but with some minor errors/ limitations All tables created correctly, including foreign keys. Appropriate implementation of integrity rules Testing of Employee table creation Poor or no attempt Basic testing evident Fair testing evident Good testing evident Excellent, well thought out and complete series of tests and associated results Development of three queries as described above, with reasons for choice of query Little or no evidence of successful/ appropriate query development Some evidence of sensible choice and implementation of queries Satisfactory but with some significant errors/ limitations As for A but with some minor errors/ limitations. Excellent choice and implementation of queries, demonstrating appropriate use of all required querying facilities. OVERALL MARK: ANY OVERALL COMMENTS:
  • 8. Part 2: Haskell work Consider the following Haskell program. module Main where import Data.Char (isPunctuation,toLower) import Data.List (nub,sort) strip :: [Char] -> [Char] strip cs = [ c | c [removed] [Char] lower cs = [ toLower c | c <- cs ] prog = unlines . nub . sort . words . lower . strip main = interact prog
  • 9. You have been asked to give a lecture explaining in detail what this program does and how it works. You should produce a PowerPoint presentation containing about 20 slides in which you provide a full explanation (with examples) of the program and how it works. You may assume that your audience consists of first year functional programming students who have a reasonable working knowledge of Haskell. However, you should ensure that each aspect of the program (including programming language features, standard functions, etc.) is fully explained so that everyone has a chance to understand the lecture fully. You should ensure that your slides appear professional. Take care with general layout and avoid spelling mistakes. You should hand in a printed copy of your PowerPoint presentation by the deadline and you should also upload your slides to Blackboard. The following grid gives more guidance re: marking of specific tasks: TASK [removed]70%
  • 10. Quantity of work (i.e. how many slides and what is on them) Poor or no attempt Bare minimum explanation Covers most of the main points Covers all the main points Covers all the main points and provides extra, appropriate and relevant, supporting information Quality of explanation (i.e. the depth of the understanding demonstrated and conveyed) Inadequate or superficial explanation Reasonable explanation of the some of the main concepts Good explanation of most of the main concepts Very good explanation of most of the main concepts Outstanding explanation that covers all of the main concepts and also includes some of the subtler points in the code Quality of slides (i.e. how do they look; how is the information presented?, is it a coherent lecture?) Confusing, badly structured, inconsistent, poor English, etc. Consistent presentable, Good set of slides: well structured
  • 11. Very good set of slides: well structured and presented Outstanding set of slides: thoroughly consistent, well laid out, good quality English, etc.