Yam Code
Sign up
Login
New paste
Home
Trending
Archive
English
English
Tiếng Việt
भारत
Sign up
Login
New Paste
Browse
Barems: Q1-25%, Q2-15% each sub question Objectives: H5SD - SQL skills Problem Descriptions: You work as a Database Developer for ABC Inc. The company uses RDBMS for project management. The fragments of database schema are given in figure below. As shown, the Project database contains four tables: Projects, Employee, Project_Modules and Work_Done. Each project is assigned to an employee called Project Manager and there can be only one Project Manager for a project. For better planning and management, each project is divided into smaller modules and responsibility of each module is assigned to an Employee. Reporting is done on a daily basis and employees report the work done on their modules as well as other employees’ modules (if any). You remove the project information after three months of project completion. Beside the fact that a Project Manager is an ABC Inc employee, we have some other assumptions on the table fields as below: ProjectCompletedOne: the date project was completed. ProjectModulesDate: the due date for the owner employee to complete the module ProjectModulesCompletedOn: the actual date that the owner employee has completed the module. WorkDoneDate: the date when the relevant employee has completed the Work, it would be NULL if the Work is still in progress SupervisorID: the ID of mentioned employee’s supervisor, who is also an ABC Inc employee. Questions 1.Update the database schema above to reflect the business logics, design 2.Write : Create the tables (with the most appropriate field/column constraints & types) and add at least 3 records into each created table. Write a stored procedure (with parameter) to print out the modules that a specific employee has been working on. Write a user function (with parameter) that return the Works information that a specific employee has been involving though those were not assigned to him/her. Write the trigger(s) to prevent the case that the end user to input invalid Projects and Project Modules information (Project_Modules.ProjectModulesDate < Projects.ProjectStartDate, Project_Modules.ProjectModulesCompletedOn > Projects.ProjectCompletedOn).
Paste Settings
Paste Title :
[Optional]
Paste Folder :
[Optional]
Select
Syntax Highlighting :
[Optional]
Select
Markup
CSS
JavaScript
Bash
C
C#
C++
Java
JSON
Lua
Plaintext
C-like
ABAP
ActionScript
Ada
Apache Configuration
APL
AppleScript
Arduino
ARFF
AsciiDoc
6502 Assembly
ASP.NET (C#)
AutoHotKey
AutoIt
Basic
Batch
Bison
Brainfuck
Bro
CoffeeScript
Clojure
Crystal
Content-Security-Policy
CSS Extras
D
Dart
Diff
Django/Jinja2
Docker
Eiffel
Elixir
Elm
ERB
Erlang
F#
Flow
Fortran
GEDCOM
Gherkin
Git
GLSL
GameMaker Language
Go
GraphQL
Groovy
Haml
Handlebars
Haskell
Haxe
HTTP
HTTP Public-Key-Pins
HTTP Strict-Transport-Security
IchigoJam
Icon
Inform 7
INI
IO
J
Jolie
Julia
Keyman
Kotlin
LaTeX
Less
Liquid
Lisp
LiveScript
LOLCODE
Makefile
Markdown
Markup templating
MATLAB
MEL
Mizar
Monkey
N4JS
NASM
nginx
Nim
Nix
NSIS
Objective-C
OCaml
OpenCL
Oz
PARI/GP
Parser
Pascal
Perl
PHP
PHP Extras
PL/SQL
PowerShell
Processing
Prolog
.properties
Protocol Buffers
Pug
Puppet
Pure
Python
Q (kdb+ database)
Qore
R
React JSX
React TSX
Ren'py
Reason
reST (reStructuredText)
Rip
Roboconf
Ruby
Rust
SAS
Sass (Sass)
Sass (Scss)
Scala
Scheme
Smalltalk
Smarty
SQL
Soy (Closure Template)
Stylus
Swift
TAP
Tcl
Textile
Template Toolkit 2
Twig
TypeScript
VB.Net
Velocity
Verilog
VHDL
vim
Visual Basic
WebAssembly
Wiki markup
Xeora
Xojo (REALbasic)
XQuery
YAML
HTML
Paste Expiration :
[Optional]
Never
Self Destroy
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Status :
[Optional]
Public
Unlisted
Private (members only)
Password :
[Optional]
Description:
[Optional]
Tags:
[Optional]
Encrypt Paste
(
?
)
Create New Paste
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Site Languages
×
English
Tiếng Việt
भारत