The resto txt:
/* Use for TM254 2021J, TMA02, Question 6 Copyright 2021 The Open University */
/* Note - all dates are in 'YYYY-MM-DD' format */
/* This overrides the date format set by the local PC locale variable. */
GRANT USAGE ON SCHEMA public TO PUBLIC;
GRANT ALL ON SCHEMA public TO PUBLIC;
/* Evaluate/Run this file in the default database, postgres, and as the*/
/* default user, postgres. */
/* If you re-run the file you will reset any changes you have made to */
/* the database content back to the original content. */
/* The DROP IF EXISTS ensures that when you re-run the script file it */
/* replaces the content of the database, on first run the tables and */
/* domains don't exist so are not dropped and you recieve a warning */
/* message. */
DROP VIEW IF EXISTS Catalogue CASCADE;
DROP TABLE IF EXISTS TaskTicket CASCADE;
DROP TABLE IF EXISTS HasExpertiseIn CASCADE;
DROP TABLE IF EXISTS RestorationItem CASCADE;
DROP TABLE IF EXISTS Expert CASCADE;
DROP TABLE IF EXISTS Specialism CASCADE;
DROP DOMAIN IF EXISTS ItemCodes;
DROP DOMAIN IF EXISTS DescriptionString;
DROP DOMAIN IF EXISTS TaskNumbers;
DROP DOMAIN IF EXISTS NameString;
DROP DOMAIN IF EXISTS AddressString;
DROP DOMAIN IF EXISTS PublicityString;
DROP DOMAIN IF EXISTS EmailString;
DROP DOMAIN IF EXISTS YN;
DROP DOMAIN IF EXISTS SpecialismString;
DROP DOMAIN IF EXISTS QualificationsString;
DROP DOMAIN IF EXISTS MonetaryValues;
/* Now creating the domains */
CREATE DOMAIN ItemCodes AS INTEGER CHECK(VALUE > 0);
CREATE DOMAIN DescriptionString AS VARCHAR(120);
CREATE DOMAIN TaskNumbers AS INTEGER CHECK(VALUE > 0);
CREATE DOMAIN NameString AS VARCHAR(120);
CREATE DOMAIN AddressString AS VARCHAR(400);
CREATE DOMAIN PublicityString AS VARCHAR(120);
CREATE DOMAIN EmailString AS VARCHAR(100) CHECK (VALUE LIKE ('%@%'));
CREATE DOMAIN YN AS CHAR(1) CHECK(VALUE IN ('Y','N') );
CREATE DOMAIN SpecialismString AS VARCHAR(120);
CREATE DOMAIN QualificationsString AS VARCHAR(300);
CREATE DOMAIN MonetaryValues AS NUMERIC(9,2) CHECK (VALUE >= 0.00);
/* DOMAINS CREATED */
/* now creating tables */
CREATE TABLE Specialism(
Name SpecialismString PRIMARY KEY
);
CREATE TABLE RestorationItem(
ItemCode ItemCodes PRIMARY KEY,
ItemDescription DescriptionString NOT NULL,
WorkDescription DescriptionString NOT NULL,
InsuranceValue MonetaryValues,
CostEstimate MonetaryValues NOT NULL,
DateAccepted DATE NOT NULL,
DateReturned DATE,
PriceCharged MonetaryValues,
-- relationship Requires mandatory participation
-- WARNING - the requires mandatory participation
-- constraint has not been implemented.
-- This omission permits the entry of a row that
-- does not match a related TaskTicket record.
-- CONSTRAINT RequiresMandatory CHECK (ItemCode
-- IN (SELECT ItemCode FROM TaskTicket))
CONSTRAINT ValueAcceptanceDate CHECK (DateAccepted <= CURRENT_DATE),
CONSTRAINT DateOrderCheck CHECK (DateReturned > DateAccepted),
CONSTRAINT ValidInsuranceValue CHECK (InsuranceValue <= 1000000.00)
);
CREATE TABLE Expert(
Name NameStrin.
Use this script for the assignment.Please follow instructions as t.docxgarnerangelika
Use this script for the assignment.
Please follow instructions as to what to turn in.
USE MYSQL ONLY.
# orderentrydbScript.sql
# REV 3 Updated 05/15/2017 Added employee comm pct to employee name Theresa Beck
# Script to build the Order Entry Database
# Creates tables and inserts data for this assignment
# into an already open database.
#
# Drop database if exists for a clean copy
Drop database if exists orderentrydb;
# Assumes student has created a database and activated it.
# Create Database before you begin to populate data
Create Database orderentrydb;
Use orderentrydb;
# Remove tables if they already exist
# Useful if it's not your first time trying this script
DROP TABLE if exists ordline ;
Drop TABLE if exists OrderTBL ;
DROP TABLE if exists Customer ;
DROP TABLE if exists Employee ;
DROP TABLE if exists Product ;
# Create the Product Table
CREATE TABLE Product
( ProdNo CHAR(8),
ProdName VARCHAR(50) NOT NULL,
ProdMfg varchar(20) NOT NULL,
ProdQOH decimal(10,2),
ProdPrice DECIMAL(12,2),
ProdNextShipDate DATE,
PRIMARY KEY (ProdNo) );
# Put data into the Product Table
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P0036566','17 inch Color Monitor','ColorMeg, Inc.',12,'2007-02-20',169.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P0036577','19 inch Color Monitor','ColorMeg, Inc.',10,'2007-02-20',319.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P1114590','R3000 Color Laser Printer','Connex',5,'2007-01-22',699.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P1412138','10 Foot Printer Cable','Ethlite',100,null,12.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P1445671','8-Outlet Surge Protector','Intersafe',33,null,14.99);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P1556678','CVP Ink Jet Color Printer','Connex',8, '2007-01-22',99.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P3455443','Color Ink Jet Cartridge','Connex',24,'2007-01-22',38.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P6677900','Black Ink Jet Cartridge','Connex',44,null,25.69);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P9995676','Battery Back-up System','Cybercx',12,'2007-02-01',89.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P4200344','36-Bit Color Scanner','UV Components',16,'2007-01-29',199.99);
# Create the Employee Table
CREATE TABLE Employee
( EmpNo varCHAR(8),
EmpFirstName varchar(20) NOT NULL,
EmpLastName varchar(30) NOT NULL,
EmpPhone varCHAR(15),
EmpEMail ...
When debugging the code, use Drop table statementsto drop pr.docxaryan532920
/* When debugging the code, use Drop table statements
to drop previously created tables.
When code is re-run, new tables will be created.
This allows easy debugging. */
Drop table dept cascade constraints;
Drop table emp cascade constraints;
Drop table customer cascade constraints;
Drop table product cascade constraints;
Drop table ord cascade constraints;
Drop table item cascade constraints;
Drop table salgrade cascade constraints;
Drop table bonus cascade constraints;
Drop table price cascade constraints;
Drop table dummy cascade constraints;
Purge RecycleBin;
CREATE TABLE DEPT (
DEPTNO NUMBER(2) NOT NULL,
DNAME VARCHAR2(14),
LOC VARCHAR2(13),
CONSTRAINT DEPT_PRIMARY_KEY PRIMARY KEY (DEPTNO));
INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');
INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');
INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');
INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');
CREATE TABLE EMP (
EMPNO NUMBER(4) NOT NULL,
ENAME VARCHAR2(10),
JOB VARCHAR2(9),
MGR NUMBER(4) CONSTRAINT EMP_MGR_FK REFERENCES EMP (EMPNO),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2) NOT NULL,
CONSTRAINT EMP_DEPTNO_FK FOREIGN KEY (DEPTNO) REFERENCES DEPT (DEPTNO),
CONSTRAINT EMP_EMPNO_PK PRIMARY KEY (EMPNO));
INSERT INTO EMP VALUES (7839,'KING','PRESIDENT',NULL,TO_DATE('17-NOV-2011','DD-MON-YYYY'),15000,NULL,10);
INSERT INTO EMP VALUES (7698,'Blake','MANAGER',7839,TO_DATE('1-MAY-2012','DD-MON-YYYY'),6850,NULL,30);
INSERT INTO EMP VALUES (7782,'CLARK','MANAGER',7839,TO_DATE('9-JUN-2013','DD-MON-YYYY'),5450,NULL,10);
INSERT INTO EMP VALUES (7566,'Jones','MANAGER',7839,TO_DATE('2-APR-2011','DD-MON-YYYY'),5975,NULL,20);
INSERT INTO EMP VALUES (7654,'Martin','SALESMAN',7698,TO_DATE('28-SEP-2012','DD-MON-YYYY'),4250,27400,30);
INSERT INTO EMP VALUES (7499,'ALLEN','SALESMAN',7698,TO_DATE('20-FEB-2013','DD-MON-YYYY'),3600,16300,30);
INSERT INTO EMP VALUES (7844,'TURNER','SALESMAN',7698,TO_DATE('8-SEP-2014','DD-MON-YYYY'),3500,0,30);
INSERT INTO EMP VALUES (7900,'James','CLERK',7698,TO_DATE('3-DEC-2015','DD-MON-YYYY'),4950,NULL,30);
INSERT INTO EMP VALUES (7521,'WARD','SALESMAN',7698,TO_DATE('22-FEB-2016','DD-MON-YYYY'),3250,55500,30);
INSERT INTO EMP VALUES (7902,'ford','ANALYST',7566,TO_DATE('3-DEC-2016','DD-MON-YYYY'),6000,NULL,20);
INSERT INTO EMP VALUES (7369,'SMITH','CLERK',7902,TO_DATE('17-DEC-2015','DD-MON-YYYY'),3800,NULL,20);
INSERT INTO EMP VALUES (7788,'SCOTT','ANALYST',7566,TO_DATE('09-DEC-2014','DD-MON-YYYY'),6000,NULL,20);
INSERT INTO EMP VALUES (7876,'ADAMS','CLERK',7788,TO_DATE('12-JAN-2013','DD-MON-YYYY'),4100,NULL,20);
INSERT INTO EMP VALUES (7934,'MILLER','CLERK',7782,TO_DATE('23-JAN-2016','DD-MON-YYYY'),4300,NULL,10);
CREATE TABLE BONUS (
ENAME VARCHAR2(10),
JOB ...
- For each of the given standard normal distributions, find the -score (critical value) corresponding
to the indicated shaded area. Round to two decimal places.
a) 0.9591
b) 0.7157
-According to the National Center for Education Statistics, the mean SAT score for the math
portion in the United States in 2021 was = 528 with a standard deviation of = 120.
a) To join the Mathletes competition team, applicants must score in the 95th percentile on the SAT
math test. What is the minimum SAT math score required to join the Mathletes? Round to the
nearest whole number.
b) If a government program offers financial aid for those who score below the 30th percentile, does
a
score of 450 qualify for financial aid? Support your answer with mathematical reasoning.
(6 points) For each of the given standard normal distributions, find the z-score (critical value)
corresponding to the indicated shaded area. Round to two decimal places. a) b) (10 points)
According to the National Center for Education Statistics, the mean SAT score for the ma portion
in the United States in 2021 was =528 with a standard deviation of =120. a) To join the "Mathletes"
competition team, applicants must score in the 95th percentile on the S math test. What is the
minimum SAT math score required to join the Mathletes? Round to the nearest whole number. b)
If a government program offers financial aid for those who score below the 30th percentile, doe
score of 450 qualify for financial aid? Support your answer with mathematical reasoning..
Question 7 0 out of 1 points and unit costs As the marginal physical product of U.S. workers ,
the marginal cost of goods produced in the US, competitive in the global marketplace. - This
makes American goods Selected Answer: b. falls; falls; fall; more Answers: a rises; falls; fall;
less b. falls; falls; fall; more c. rises; falls; fall; more d, rises; falls; fall; more
Solution
As the marginal physical product of US workers RISES, the marginal cost of goods produced in
the US FALLS and unit costs FALL. This makes American goods More competitive in the
global market as they are cheaper than the rest. Hence will have larger market share.
Answer uis Part C.
Use this script for the assignment.Please follow instructions as t.docxgarnerangelika
Use this script for the assignment.
Please follow instructions as to what to turn in.
USE MYSQL ONLY.
# orderentrydbScript.sql
# REV 3 Updated 05/15/2017 Added employee comm pct to employee name Theresa Beck
# Script to build the Order Entry Database
# Creates tables and inserts data for this assignment
# into an already open database.
#
# Drop database if exists for a clean copy
Drop database if exists orderentrydb;
# Assumes student has created a database and activated it.
# Create Database before you begin to populate data
Create Database orderentrydb;
Use orderentrydb;
# Remove tables if they already exist
# Useful if it's not your first time trying this script
DROP TABLE if exists ordline ;
Drop TABLE if exists OrderTBL ;
DROP TABLE if exists Customer ;
DROP TABLE if exists Employee ;
DROP TABLE if exists Product ;
# Create the Product Table
CREATE TABLE Product
( ProdNo CHAR(8),
ProdName VARCHAR(50) NOT NULL,
ProdMfg varchar(20) NOT NULL,
ProdQOH decimal(10,2),
ProdPrice DECIMAL(12,2),
ProdNextShipDate DATE,
PRIMARY KEY (ProdNo) );
# Put data into the Product Table
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P0036566','17 inch Color Monitor','ColorMeg, Inc.',12,'2007-02-20',169.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P0036577','19 inch Color Monitor','ColorMeg, Inc.',10,'2007-02-20',319.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P1114590','R3000 Color Laser Printer','Connex',5,'2007-01-22',699.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P1412138','10 Foot Printer Cable','Ethlite',100,null,12.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P1445671','8-Outlet Surge Protector','Intersafe',33,null,14.99);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P1556678','CVP Ink Jet Color Printer','Connex',8, '2007-01-22',99.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P3455443','Color Ink Jet Cartridge','Connex',24,'2007-01-22',38.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P6677900','Black Ink Jet Cartridge','Connex',44,null,25.69);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P9995676','Battery Back-up System','Cybercx',12,'2007-02-01',89.00);
INSERT INTO product
(ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
VALUES ('P4200344','36-Bit Color Scanner','UV Components',16,'2007-01-29',199.99);
# Create the Employee Table
CREATE TABLE Employee
( EmpNo varCHAR(8),
EmpFirstName varchar(20) NOT NULL,
EmpLastName varchar(30) NOT NULL,
EmpPhone varCHAR(15),
EmpEMail ...
When debugging the code, use Drop table statementsto drop pr.docxaryan532920
/* When debugging the code, use Drop table statements
to drop previously created tables.
When code is re-run, new tables will be created.
This allows easy debugging. */
Drop table dept cascade constraints;
Drop table emp cascade constraints;
Drop table customer cascade constraints;
Drop table product cascade constraints;
Drop table ord cascade constraints;
Drop table item cascade constraints;
Drop table salgrade cascade constraints;
Drop table bonus cascade constraints;
Drop table price cascade constraints;
Drop table dummy cascade constraints;
Purge RecycleBin;
CREATE TABLE DEPT (
DEPTNO NUMBER(2) NOT NULL,
DNAME VARCHAR2(14),
LOC VARCHAR2(13),
CONSTRAINT DEPT_PRIMARY_KEY PRIMARY KEY (DEPTNO));
INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');
INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');
INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');
INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');
CREATE TABLE EMP (
EMPNO NUMBER(4) NOT NULL,
ENAME VARCHAR2(10),
JOB VARCHAR2(9),
MGR NUMBER(4) CONSTRAINT EMP_MGR_FK REFERENCES EMP (EMPNO),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2) NOT NULL,
CONSTRAINT EMP_DEPTNO_FK FOREIGN KEY (DEPTNO) REFERENCES DEPT (DEPTNO),
CONSTRAINT EMP_EMPNO_PK PRIMARY KEY (EMPNO));
INSERT INTO EMP VALUES (7839,'KING','PRESIDENT',NULL,TO_DATE('17-NOV-2011','DD-MON-YYYY'),15000,NULL,10);
INSERT INTO EMP VALUES (7698,'Blake','MANAGER',7839,TO_DATE('1-MAY-2012','DD-MON-YYYY'),6850,NULL,30);
INSERT INTO EMP VALUES (7782,'CLARK','MANAGER',7839,TO_DATE('9-JUN-2013','DD-MON-YYYY'),5450,NULL,10);
INSERT INTO EMP VALUES (7566,'Jones','MANAGER',7839,TO_DATE('2-APR-2011','DD-MON-YYYY'),5975,NULL,20);
INSERT INTO EMP VALUES (7654,'Martin','SALESMAN',7698,TO_DATE('28-SEP-2012','DD-MON-YYYY'),4250,27400,30);
INSERT INTO EMP VALUES (7499,'ALLEN','SALESMAN',7698,TO_DATE('20-FEB-2013','DD-MON-YYYY'),3600,16300,30);
INSERT INTO EMP VALUES (7844,'TURNER','SALESMAN',7698,TO_DATE('8-SEP-2014','DD-MON-YYYY'),3500,0,30);
INSERT INTO EMP VALUES (7900,'James','CLERK',7698,TO_DATE('3-DEC-2015','DD-MON-YYYY'),4950,NULL,30);
INSERT INTO EMP VALUES (7521,'WARD','SALESMAN',7698,TO_DATE('22-FEB-2016','DD-MON-YYYY'),3250,55500,30);
INSERT INTO EMP VALUES (7902,'ford','ANALYST',7566,TO_DATE('3-DEC-2016','DD-MON-YYYY'),6000,NULL,20);
INSERT INTO EMP VALUES (7369,'SMITH','CLERK',7902,TO_DATE('17-DEC-2015','DD-MON-YYYY'),3800,NULL,20);
INSERT INTO EMP VALUES (7788,'SCOTT','ANALYST',7566,TO_DATE('09-DEC-2014','DD-MON-YYYY'),6000,NULL,20);
INSERT INTO EMP VALUES (7876,'ADAMS','CLERK',7788,TO_DATE('12-JAN-2013','DD-MON-YYYY'),4100,NULL,20);
INSERT INTO EMP VALUES (7934,'MILLER','CLERK',7782,TO_DATE('23-JAN-2016','DD-MON-YYYY'),4300,NULL,10);
CREATE TABLE BONUS (
ENAME VARCHAR2(10),
JOB ...
- For each of the given standard normal distributions, find the -score (critical value) corresponding
to the indicated shaded area. Round to two decimal places.
a) 0.9591
b) 0.7157
-According to the National Center for Education Statistics, the mean SAT score for the math
portion in the United States in 2021 was = 528 with a standard deviation of = 120.
a) To join the Mathletes competition team, applicants must score in the 95th percentile on the SAT
math test. What is the minimum SAT math score required to join the Mathletes? Round to the
nearest whole number.
b) If a government program offers financial aid for those who score below the 30th percentile, does
a
score of 450 qualify for financial aid? Support your answer with mathematical reasoning.
(6 points) For each of the given standard normal distributions, find the z-score (critical value)
corresponding to the indicated shaded area. Round to two decimal places. a) b) (10 points)
According to the National Center for Education Statistics, the mean SAT score for the ma portion
in the United States in 2021 was =528 with a standard deviation of =120. a) To join the "Mathletes"
competition team, applicants must score in the 95th percentile on the S math test. What is the
minimum SAT math score required to join the Mathletes? Round to the nearest whole number. b)
If a government program offers financial aid for those who score below the 30th percentile, doe
score of 450 qualify for financial aid? Support your answer with mathematical reasoning..
Question 7 0 out of 1 points and unit costs As the marginal physical product of U.S. workers ,
the marginal cost of goods produced in the US, competitive in the global marketplace. - This
makes American goods Selected Answer: b. falls; falls; fall; more Answers: a rises; falls; fall;
less b. falls; falls; fall; more c. rises; falls; fall; more d, rises; falls; fall; more
Solution
As the marginal physical product of US workers RISES, the marginal cost of goods produced in
the US FALLS and unit costs FALL. This makes American goods More competitive in the
global market as they are cheaper than the rest. Hence will have larger market share.
Answer uis Part C.
SQL FILE FROM MOODLEUSE [master]GO Object Databa.pdfarrowit1
***SQL FILE FROM MOODLE***
USE [master]
GO
/****** Object: Database [PVF] Script Date: 6/17/2013 1:07:19 PM ******/
CREATE DATABASE [PVF]
ALTER DATABASE [PVF] SET COMPATIBILITY_LEVEL = 110
GO
IF (1 = FULLTEXTSERVICEPROPERTY(\'IsFullTextInstalled\'))
begin
EXEC [PVF].[dbo].[sp_fulltext_database] @action = \'enable\'
end
GO
ALTER DATABASE [PVF] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [PVF] SET ANSI_NULLS OFF
GO
ALTER DATABASE [PVF] SET ANSI_PADDING OFF
GO
ALTER DATABASE [PVF] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [PVF] SET ARITHABORT OFF
GO
ALTER DATABASE [PVF] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [PVF] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [PVF] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [PVF] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [PVF] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [PVF] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [PVF] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [PVF] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [PVF] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [PVF] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [PVF] SET DISABLE_BROKER
GO
ALTER DATABASE [PVF] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [PVF] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [PVF] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [PVF] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [PVF] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [PVF] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [PVF] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [PVF] SET RECOVERY SIMPLE
GO
ALTER DATABASE [PVF] SET MULTI_USER
GO
ALTER DATABASE [PVF] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [PVF] SET DB_CHAINING OFF
GO
ALTER DATABASE [PVF] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [PVF] SET TARGET_RECOVERY_TIME = 0 SECONDS
GO
ALTER DATABASE [PVF] SET READ_WRITE
GO
USE [PVF]
CREATE TABLE Customer_T
(CustomerID NUMERIC(11,0) NOT NULL,
CustomerName VARCHAR(25) NOT NULL,
CustomerAddress VARCHAR(30) ,
CustomerCity VARCHAR(20) ,
CustomerState CHAR(2) ,
CustomerPostalCode VARCHAR(10) ,
CONSTRAINT Customer_PK PRIMARY KEY (CustomerID));
CREATE TABLE Territory_T
(TerritoryID NUMERIC(11,0) NOT NULL,
TerritoryName VARCHAR(50) ,
CONSTRAINT Territory_PK PRIMARY KEY (TerritoryID));
CREATE TABLE DoesBusinessIn_T
(CustomerID NUMERIC(11,0) NOT NULL,
TerritoryID NUMERIC(11,0) NOT NULL,
CONSTRAINT DoesBusinessIn_PK PRIMARY KEY (CustomerID, TerritoryID),
CONSTRAINT DoesBusinessIn_FK1 FOREIGN KEY (CustomerID) REFERENCES
Customer_T(CustomerID),
CONSTRAINT DoesBusinessIn_FK2 FOREIGN KEY (TerritoryID) REFERENCES
Territory_T(TerritoryID));
CREATE TABLE Employee_T
(EmployeeID VARCHAR(10) NOT NULL,
EmployeeName VARCHAR(25) ,
EmployeeAddress VARCHAR(30) ,
EmployeeBirthDate DATE ,
EmployeeCity VARCHAR(20) ,
EmployeeState CHAR(2) ,
EmployeeZipCode VARCHAR(10) ,
EmployeeDateHired DATE ,
EmployeeSupervisor VARCHAR(10) ,
CONSTRAINT Employee_PK PRIMARY KEY (EmployeeID));
CREATE TABLE Skill_T
(SkillID VARCHAR(12) NOT NULL,
SkillDescription.
I have the attached copy of the assignment description. And here is .docxsamirapdcosden
I have the attached copy of the assignment description. And here is the scripts.
/* Database Systems, 9th Ed., Coronel/MOrris/Rob */
/* Type of SQL : MySQL */
CREATE SCHEMA TINY_VIDEO;
USE TINY_VIDEO;
/*Create table price*/
CREATE TABLE price
(price_id INTEGER PRIMARY KEY AUTO_INCREMENT,
description VARCHAR(20) NOT NULL,
rental_fee DECIMAL(5,2),
daily_late_fee DECIMAL(5,2));
/*Insert data into price*/
INSERT INTO price VALUES(1,'Standard',2.5,1);
INSERT INTO price VALUES(2,'New Release',4.0,3);
INSERT INTO price VALUES(3,'Discount',2.0,1);
INSERT INTO price VALUES(4,'Weekly Special',1.5,.5);
/*Create table movie*/
CREATE TABLE movie
(movie_id INTEGER PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(75) NOT NULL,
year_released INTEGER,
cost DECIMAL(5,2),
genre VARCHAR(50),
price_id INTEGER,
FOREIGN KEY(price_id) REFERENCES price(price_id));
/*Insert data into movie*/
INSERT INTO movie VALUES(1234,'The Cesar Family Christmas',2007,39.95,'FAMILY',2);
INSERT INTO movie VALUES(1235,'Smokey Mountain Wildlife',2004,59.95,'ACTION',3);
INSERT INTO movie VALUES(1236,'Richard Goodhope',2008,59.95,'DRAMA',2);
INSERT INTO movie VALUES(1237,'Beatnik Fever',2007,29.95,'COMEDY',2);
INSERT INTO movie VALUES(1238,'Constant Companion',2008,89.95,'DRAMA',NULL);
INSERT INTO movie VALUES(1239,'Where Hope Dies',1998,25.49,'DRAMA',3);
INSERT INTO movie VALUES(1245,'Time to Burn',2006,45.49,'ACTION',3);
INSERT INTO movie VALUES(1246,'What He Doesn''t Know',2006,58.29,'COMEDY',1);
/*Create table video*/
CREATE TABLE video
(video_id INTEGER PRIMARY KEY AUTO_INCREMENT,
purchase_date DATE,
movie_id INTEGER,
FOREIGN KEY(movie_id) REFERENCES movie(movie_id));
/*Insert data into video*/
INSERT INTO video VALUES(54321,'2008-06-18',1234);
INSERT INTO video VALUES(54324,'2008-06-18',1234);
INSERT INTO video VALUES(54325,'2008-06-18',1234);
INSERT INTO video VALUES(34341,'2007-01-22',1235);
INSERT INTO video VALUES(34342,'2007-01-22',1235);
INSERT INTO video VALUES(34366,'2009-03-02',1236);
INSERT INTO video VALUES(34367,'2009-03-02',1236);
INSERT INTO video VALUES(34368,'2009-03-02',1236);
INSERT INTO video VALUES(34369,'2009-03-02',1236);
INSERT INTO video VALUES(44392,'2008-10-21',1237);
INSERT INTO video VALUES(44397,'2008-10-21',1237);
INSERT INTO video VALUES(59237,'2009-02-14',1237);
INSERT INTO video VALUES(61388,'2007-01-25',1239);
INSERT INTO video VALUES(61353,'2006-01-28',1245);
INSERT INTO video VALUES(61354,'2006-01-28',1245);
INSERT INTO video VALUES(61367,'2008-07-30',1246);
INSERT INTO video VALUES(61369,'2008-07-30',1246);
/*Create table membership*/
CREATE TABLE membership
(membership_id INTEGER PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
street VARCHAR(120),
city VARCHAR(50),
state VARCHAR(2),
zi.
I am working on this homework using MYSQL database. Can you help. At.docxmaple8qvlisbey
I am working on this homework using MYSQL database. Can you help. Attached is the homework question.
Here is the scripts am using for the question.
/* Database Systems, 9th Ed., Coronel/MOrris/Rob */
/* Type of SQL : MySQL */
CREATE SCHEMA TINY_VIDEO;
USE TINY_VIDEO;
/*Create table price*/
CREATE TABLE price
(price_id INTEGER PRIMARY KEY AUTO_INCREMENT,
description VARCHAR(20) NOT NULL,
rental_fee DECIMAL(5,2),
daily_late_fee DECIMAL(5,2));
/*Insert data into price*/
INSERT INTO price VALUES(1,'Standard',2.5,1);
INSERT INTO price VALUES(2,'New Release',4.0,3);
INSERT INTO price VALUES(3,'Discount',2.0,1);
INSERT INTO price VALUES(4,'Weekly Special',1.5,.5);
/*Create table movie*/
CREATE TABLE movie
(movie_id INTEGER PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(75) NOT NULL,
year_released INTEGER,
cost DECIMAL(5,2),
genre VARCHAR(50),
price_id INTEGER,
FOREIGN KEY(price_id) REFERENCES price(price_id));
/*Insert data into movie*/
INSERT INTO movie VALUES(1234,'The Cesar Family Christmas',2007,39.95,'FAMILY',2);
INSERT INTO movie VALUES(1235,'Smokey Mountain Wildlife',2004,59.95,'ACTION',3);
INSERT INTO movie VALUES(1236,'Richard Goodhope',2008,59.95,'DRAMA',2);
INSERT INTO movie VALUES(1237,'Beatnik Fever',2007,29.95,'COMEDY',2);
INSERT INTO movie VALUES(1238,'Constant Companion',2008,89.95,'DRAMA',NULL);
INSERT INTO movie VALUES(1239,'Where Hope Dies',1998,25.49,'DRAMA',3);
INSERT INTO movie VALUES(1245,'Time to Burn',2006,45.49,'ACTION',3);
INSERT INTO movie VALUES(1246,'What He Doesn''t Know',2006,58.29,'COMEDY',1);
/*Create table video*/
CREATE TABLE video
(video_id INTEGER PRIMARY KEY AUTO_INCREMENT,
purchase_date DATE,
movie_id INTEGER,
FOREIGN KEY(movie_id) REFERENCES movie(movie_id));
/*Insert data into video*/
INSERT INTO video VALUES(54321,'2008-06-18',1234);
INSERT INTO video VALUES(54324,'2008-06-18',1234);
INSERT INTO video VALUES(54325,'2008-06-18',1234);
INSERT INTO video VALUES(34341,'2007-01-22',1235);
INSERT INTO video VALUES(34342,'2007-01-22',1235);
INSERT INTO video VALUES(34366,'2009-03-02',1236);
INSERT INTO video VALUES(34367,'2009-03-02',1236);
INSERT INTO video VALUES(34368,'2009-03-02',1236);
INSERT INTO video VALUES(34369,'2009-03-02',1236);
INSERT INTO video VALUES(44392,'2008-10-21',1237);
INSERT INTO video VALUES(44397,'2008-10-21',1237);
INSERT INTO video VALUES(59237,'2009-02-14',1237);
INSERT INTO video VALUES(61388,'2007-01-25',1239);
INSERT INTO video VALUES(61353,'2006-01-28',1245);
INSERT INTO video VALUES(61354,'2006-01-28',1245);
INSERT INTO video VALUES(61367,'2008-07-30',1246);
INSERT INTO video VALUES(61369,'2008-07-30',1246);
/*Create table membership*/
CREATE TABLE membership
(membership_id INTEGER PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
street VARCHAR.
Select, Select with Boolean Exp, Select with Numeric Exp, Select with Date Exp, Create database, Drop database, Use database, Create table, Describe table, Drop table, Insert record, Update record(s), Delete record(s), Like clause with Select statement, Top clause with Select Statement, Order By clause with Select Statement, Group By clause with Select Statement, Distinct clause with Select Statement, Default constraint, Identity Property, Unique constraint, Check constraint, Alter Table, Primary Key constraint, Foreign Key constraint, Index, Views, Equi-Join, Natural Join, Cross Join
Starting from the database used in Project 1 (see the slightly cha.docxdessiechisomjj4
Starting from the database used in Project 1 (see the slightly changed schema from the original version used in P1, defined in the attached DDL file), a data warehouse star schema with the following characteristics will be defined:
· Dimension tables:
1. Date
2. Product
3. Customer
· Fact table:
1. Sales
For this final project, perform the following steps:
· Create the tables defined above in a star schema. Add the necessary columns in each table to facilitate the implementation of the queries defined below. Only the four tables listed above are allowed in that star schema
· Write PL/SQL code (anonymous blocks and/or subprograms) to populate the warehouse schema with data from the normalized database provided in the attached DDL script
· Write SQL code to perform the following queries:
1. What customer age group spent the most money in the last year? An age group is defined as a ten years interval, such as: 11 – 20, 21 – 30, etc
2. In what zip codes did the highest number of sales (number of items) occur during April 2015?
3. What day of the week did they do most business (by value of sales) in the last year?
4. What quarter is the worst (by value of sales) for each product category, using the whole set of historical data available in the warehouse?
5. What was the best sales month for each product in the last year?
· Write a couple of paragraphs describing:
. How this small data warehouse can help decision making
. How is it different from the original database used as data source
Submit the PL/SQL blocks and SQL statements as a text file (Notepad) following the document naming convention FirstLastFP.txt.
Grading: this project is awarded 100 points
15 points
DDL Script to create the tables in the star schema
25 points
PL/SQL code to populate the star schema from the original database
5 x 10 points
SQL statements for each of the requested queries
10 points
Description of how this data warehouse helps decision making and how it differs from regular databases
DROP TABLE ORDER_ITEMS;
DROP TABLE ORDERS;
DROP TABLE CUSTOMERS;
DROP TABLE PRODUCTS;
DROP TABLE CATEGORIES;
CREATE TABLE CATEGORIES (
ID NUMBER PRIMARY KEY,
Name VARCHAR2(20) NOT NULL);
CREATE TABLE PRODUCTS (
ID NUMBER PRIMARY KEY,
CatID NUMBER,
Name VARCHAR2(20) NOT NULL,
Price NUMBER NOT NULL,
FOREIGN KEY (CatID) REFERENCES CATEGORIES(ID));
CREATE TABLE CUSTOMERS (
ID NUMBER PRIMARY KEY,
Name VARCHAR2(50) NOT NULL,
DOB DATE NOT NULL,
Email VARCHAR2(50),
ZipCode CHAR(5) NOT NULL);
CREATE TABLE ORDERS (
ID NUMBER PRIMARY KEY,
CustID NUMBER NOT NULL,
DatePlaced DATE DEFAULT SYSDATE,
FOREIGN KEY (CustID) REFERENCES CUSTOMERS(ID));
CREATE TABLE ORDER_ITEMS (
OrderID NUMBER NOT NULL,
ProdID NUMBER NOT NULL,
Quantity NUMBER DEFAULT 1,
DateShipped DATE,
FOREIGN KEY (OrderID) REFERENCES ORDERS(ID),
FOREIGN KEY (ProdID) REFERENCES PRODUCTS(ID));
INSERT INTO CATEGORIES VALUES (1, 'Books');
INSERT INTO CATEGORIES VALUES (2, '.
In this talk we will discover the "new" version of the standard of the most hated|used|loved programming language: JavaScript. We're going to see how it evolved and how it got better, making our developers' life definitely better.
We will also see how it allows us to pick our favourite paradigm: Functional or Object Oriented.
Production.javapublic class Production { Declaring instance.pdfsooryasalini
Production.java
public class Production {
//Declaring instance variables
private String title;
private String director;
private String writer;
//Parameterized constructor
public Production(String title, String director, String writer) {
super();
this.title = title;
this.director = director;
this.writer = writer;
}
//Setters and getters.
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
public String getWriter() {
return writer;
}
public void setWriter(String writer) {
this.writer = writer;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println(\"Title: \" + this.title);
System.out.println(\"Director: \" + this.director);
System.out.println(\"Writer: \" + this.writer);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return \"Title :\" + title + \"\ Director :\" + director
+ \"\ Writer :\" + writer;
}
}
___________________________________________
Film.java
public class Film extends Production{
//Declaring instance variables
private int boxOfficeGross;
//Parameterized constructor
public Film(String title, String director, String writer, int boxOfficeGross) {
super(title, director, writer);
this.boxOfficeGross = boxOfficeGross;
}
//Setters and getters.
public int getBoxOfficeGross() {
return boxOfficeGross;
}
public void setBoxOfficeGross(int boxOfficeGross) {
this.boxOfficeGross = boxOfficeGross;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println(\"BoxOfiiceGross: \" + this.boxOfficeGross);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return super.toString()+\"\ BoxOfficeGross :\" + boxOfficeGross+\"\ \";
}
}
_______________________________________________
Play.java
public class Play extends Production {
//Declaring instance variables
private int performances;
//Parameterized constructor
public Play(String title, String director, String writer, int performances) {
super(title, director, writer);
this.performances = performances;
}
//Setters and getters.
public int getPerformances() {
return performances;
}
public void setPerformances(int performances) {
this.performances = performances;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println(\"Performances: \" + this.performances);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return super.toString()+\"\ Performances :\" + performances+\"\ \";
}
}
_______________________________________________
Musical.java
public class BobsTerribleTests
{
public static void main(String[] args)
{
//Creating an Film Object by passing parameters
Film titanic = new Film(\"Titanic\", \"James Cameron\", \"James Cameron\.
Which of these refers to the degree and nature of interdepen.pdfgiriraj65
Which of these refers to the degree and nature of interdependence between the power holder and
others? visibility substitutability centrality discretion Question 27 Which of the following is a "hard"
influence tactic? ingratiation upward appeal persuasion visibility Question 28 2pts Which of the
following is correct regarding assertiveness? It refers to the process of gaining support from one or
more people with higher authority or expertise. It is an indicator that a person lacks power due to
low centraity. It is an attempt to increase liking by, or perceived cimilarity to, some targeted
person. It is alsa known as vocal authority..
Wheat crops across the Americas Asia Europe and Africa ar.pdfgiriraj65
Wheat crops across the Americas, Asia, Europe, and Africa are frequently ravaged by Wheat Yellow Mosaic Virus (WYMV), so there is high demand for wheat varieties or cultivars that can resist this virus.
Published today in PNAS, the study found the resistance gene originated in an ancient Mediterranean wild plant relative of wheat.
Study lead researcher University of Melbourne Dr Mohammad Pourkheirandish said: "This discovery could assist with the development of more resistant wheat cultivars, increase crop yields, and reduce the use of harmful fungicides. It also emphasises the need to preserve biodiversity to protect food supplies."
WYMV reduces grain yield by up to 80 per cent, causing significant economic losses. The virus is hosted and transmitted by a soil-dwelling fungus that colonises the roots of wheat plants, discolouring wheat leaves, and stunting plant growth.
Microscopic fungal spores containing WYMV can live in soil for up to a decade. While fungicides can kill the spores and stop transmission, the fungicide treatment is neither cost-effective nor ecologically sustainable.
"The viable alternative is to selectively breed or genetically engineer wheat with resistance to WYMV," Dr Pourkheirandish said.
"Before this research, we knew that a dominant gene called Ym2 reduces the impact of WYMV on wheat plants by more than 70 per cent, but we didn't understand how the gene achieved this."
The research team used a technique called positional cloning to locate the Ym2 gene on a chromosome in bread wheat, and found that its DNA sequence codes for a protein of the type known as NBS-LRR. These proteins are 'guardians' that detect pathogens and trigger an immune response in plants.
"Now that we know the gene's DNA sequence, we can select breeding lines carrying Ym2 by simply analysing DNA from a small piece of leaf even without the virus inoculation step," Dr Pourkheirandish said.
"It will also make it easier to find variants of Ym2 in wild relatives of wheat, which may provide superior disease resistance for further crop improvement."
The DNA of modern wheat is chimeric, meaning its genetic material derives from several ancestral plants through natural interbreeding, or hybridisation, followed by selective breeding by humans.
By comparing DNA sequences across related species, the researchers discovered that Ym2 in modern bread wheat derives from an ancient wild plant called Aegilops sharonensis, native to eastern Mediterranean countries. A similar gene occurs in Aegilops speltoides, another wild ancestor of bread wheat.
"These wild species would have interbred with cultivated wheat at some point and passed on the genetic resistance that is now so commercially critical," Dr Pourkheirandish said.
"Ancestral wild plants are a rich source of useful traits, like disease resistance, that plant breeders and geneticists can mine to protect modern crops and maintain a healthy food supply -- including the bread, pasta, noodles, couscous, pastries, cak.
More Related Content
Similar to The resto txt Use for TM254 2021J TMA02 Question 6 .pdf
SQL FILE FROM MOODLEUSE [master]GO Object Databa.pdfarrowit1
***SQL FILE FROM MOODLE***
USE [master]
GO
/****** Object: Database [PVF] Script Date: 6/17/2013 1:07:19 PM ******/
CREATE DATABASE [PVF]
ALTER DATABASE [PVF] SET COMPATIBILITY_LEVEL = 110
GO
IF (1 = FULLTEXTSERVICEPROPERTY(\'IsFullTextInstalled\'))
begin
EXEC [PVF].[dbo].[sp_fulltext_database] @action = \'enable\'
end
GO
ALTER DATABASE [PVF] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [PVF] SET ANSI_NULLS OFF
GO
ALTER DATABASE [PVF] SET ANSI_PADDING OFF
GO
ALTER DATABASE [PVF] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [PVF] SET ARITHABORT OFF
GO
ALTER DATABASE [PVF] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [PVF] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [PVF] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [PVF] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [PVF] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [PVF] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [PVF] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [PVF] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [PVF] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [PVF] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [PVF] SET DISABLE_BROKER
GO
ALTER DATABASE [PVF] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [PVF] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [PVF] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [PVF] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [PVF] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [PVF] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [PVF] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [PVF] SET RECOVERY SIMPLE
GO
ALTER DATABASE [PVF] SET MULTI_USER
GO
ALTER DATABASE [PVF] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [PVF] SET DB_CHAINING OFF
GO
ALTER DATABASE [PVF] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [PVF] SET TARGET_RECOVERY_TIME = 0 SECONDS
GO
ALTER DATABASE [PVF] SET READ_WRITE
GO
USE [PVF]
CREATE TABLE Customer_T
(CustomerID NUMERIC(11,0) NOT NULL,
CustomerName VARCHAR(25) NOT NULL,
CustomerAddress VARCHAR(30) ,
CustomerCity VARCHAR(20) ,
CustomerState CHAR(2) ,
CustomerPostalCode VARCHAR(10) ,
CONSTRAINT Customer_PK PRIMARY KEY (CustomerID));
CREATE TABLE Territory_T
(TerritoryID NUMERIC(11,0) NOT NULL,
TerritoryName VARCHAR(50) ,
CONSTRAINT Territory_PK PRIMARY KEY (TerritoryID));
CREATE TABLE DoesBusinessIn_T
(CustomerID NUMERIC(11,0) NOT NULL,
TerritoryID NUMERIC(11,0) NOT NULL,
CONSTRAINT DoesBusinessIn_PK PRIMARY KEY (CustomerID, TerritoryID),
CONSTRAINT DoesBusinessIn_FK1 FOREIGN KEY (CustomerID) REFERENCES
Customer_T(CustomerID),
CONSTRAINT DoesBusinessIn_FK2 FOREIGN KEY (TerritoryID) REFERENCES
Territory_T(TerritoryID));
CREATE TABLE Employee_T
(EmployeeID VARCHAR(10) NOT NULL,
EmployeeName VARCHAR(25) ,
EmployeeAddress VARCHAR(30) ,
EmployeeBirthDate DATE ,
EmployeeCity VARCHAR(20) ,
EmployeeState CHAR(2) ,
EmployeeZipCode VARCHAR(10) ,
EmployeeDateHired DATE ,
EmployeeSupervisor VARCHAR(10) ,
CONSTRAINT Employee_PK PRIMARY KEY (EmployeeID));
CREATE TABLE Skill_T
(SkillID VARCHAR(12) NOT NULL,
SkillDescription.
I have the attached copy of the assignment description. And here is .docxsamirapdcosden
I have the attached copy of the assignment description. And here is the scripts.
/* Database Systems, 9th Ed., Coronel/MOrris/Rob */
/* Type of SQL : MySQL */
CREATE SCHEMA TINY_VIDEO;
USE TINY_VIDEO;
/*Create table price*/
CREATE TABLE price
(price_id INTEGER PRIMARY KEY AUTO_INCREMENT,
description VARCHAR(20) NOT NULL,
rental_fee DECIMAL(5,2),
daily_late_fee DECIMAL(5,2));
/*Insert data into price*/
INSERT INTO price VALUES(1,'Standard',2.5,1);
INSERT INTO price VALUES(2,'New Release',4.0,3);
INSERT INTO price VALUES(3,'Discount',2.0,1);
INSERT INTO price VALUES(4,'Weekly Special',1.5,.5);
/*Create table movie*/
CREATE TABLE movie
(movie_id INTEGER PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(75) NOT NULL,
year_released INTEGER,
cost DECIMAL(5,2),
genre VARCHAR(50),
price_id INTEGER,
FOREIGN KEY(price_id) REFERENCES price(price_id));
/*Insert data into movie*/
INSERT INTO movie VALUES(1234,'The Cesar Family Christmas',2007,39.95,'FAMILY',2);
INSERT INTO movie VALUES(1235,'Smokey Mountain Wildlife',2004,59.95,'ACTION',3);
INSERT INTO movie VALUES(1236,'Richard Goodhope',2008,59.95,'DRAMA',2);
INSERT INTO movie VALUES(1237,'Beatnik Fever',2007,29.95,'COMEDY',2);
INSERT INTO movie VALUES(1238,'Constant Companion',2008,89.95,'DRAMA',NULL);
INSERT INTO movie VALUES(1239,'Where Hope Dies',1998,25.49,'DRAMA',3);
INSERT INTO movie VALUES(1245,'Time to Burn',2006,45.49,'ACTION',3);
INSERT INTO movie VALUES(1246,'What He Doesn''t Know',2006,58.29,'COMEDY',1);
/*Create table video*/
CREATE TABLE video
(video_id INTEGER PRIMARY KEY AUTO_INCREMENT,
purchase_date DATE,
movie_id INTEGER,
FOREIGN KEY(movie_id) REFERENCES movie(movie_id));
/*Insert data into video*/
INSERT INTO video VALUES(54321,'2008-06-18',1234);
INSERT INTO video VALUES(54324,'2008-06-18',1234);
INSERT INTO video VALUES(54325,'2008-06-18',1234);
INSERT INTO video VALUES(34341,'2007-01-22',1235);
INSERT INTO video VALUES(34342,'2007-01-22',1235);
INSERT INTO video VALUES(34366,'2009-03-02',1236);
INSERT INTO video VALUES(34367,'2009-03-02',1236);
INSERT INTO video VALUES(34368,'2009-03-02',1236);
INSERT INTO video VALUES(34369,'2009-03-02',1236);
INSERT INTO video VALUES(44392,'2008-10-21',1237);
INSERT INTO video VALUES(44397,'2008-10-21',1237);
INSERT INTO video VALUES(59237,'2009-02-14',1237);
INSERT INTO video VALUES(61388,'2007-01-25',1239);
INSERT INTO video VALUES(61353,'2006-01-28',1245);
INSERT INTO video VALUES(61354,'2006-01-28',1245);
INSERT INTO video VALUES(61367,'2008-07-30',1246);
INSERT INTO video VALUES(61369,'2008-07-30',1246);
/*Create table membership*/
CREATE TABLE membership
(membership_id INTEGER PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
street VARCHAR(120),
city VARCHAR(50),
state VARCHAR(2),
zi.
I am working on this homework using MYSQL database. Can you help. At.docxmaple8qvlisbey
I am working on this homework using MYSQL database. Can you help. Attached is the homework question.
Here is the scripts am using for the question.
/* Database Systems, 9th Ed., Coronel/MOrris/Rob */
/* Type of SQL : MySQL */
CREATE SCHEMA TINY_VIDEO;
USE TINY_VIDEO;
/*Create table price*/
CREATE TABLE price
(price_id INTEGER PRIMARY KEY AUTO_INCREMENT,
description VARCHAR(20) NOT NULL,
rental_fee DECIMAL(5,2),
daily_late_fee DECIMAL(5,2));
/*Insert data into price*/
INSERT INTO price VALUES(1,'Standard',2.5,1);
INSERT INTO price VALUES(2,'New Release',4.0,3);
INSERT INTO price VALUES(3,'Discount',2.0,1);
INSERT INTO price VALUES(4,'Weekly Special',1.5,.5);
/*Create table movie*/
CREATE TABLE movie
(movie_id INTEGER PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(75) NOT NULL,
year_released INTEGER,
cost DECIMAL(5,2),
genre VARCHAR(50),
price_id INTEGER,
FOREIGN KEY(price_id) REFERENCES price(price_id));
/*Insert data into movie*/
INSERT INTO movie VALUES(1234,'The Cesar Family Christmas',2007,39.95,'FAMILY',2);
INSERT INTO movie VALUES(1235,'Smokey Mountain Wildlife',2004,59.95,'ACTION',3);
INSERT INTO movie VALUES(1236,'Richard Goodhope',2008,59.95,'DRAMA',2);
INSERT INTO movie VALUES(1237,'Beatnik Fever',2007,29.95,'COMEDY',2);
INSERT INTO movie VALUES(1238,'Constant Companion',2008,89.95,'DRAMA',NULL);
INSERT INTO movie VALUES(1239,'Where Hope Dies',1998,25.49,'DRAMA',3);
INSERT INTO movie VALUES(1245,'Time to Burn',2006,45.49,'ACTION',3);
INSERT INTO movie VALUES(1246,'What He Doesn''t Know',2006,58.29,'COMEDY',1);
/*Create table video*/
CREATE TABLE video
(video_id INTEGER PRIMARY KEY AUTO_INCREMENT,
purchase_date DATE,
movie_id INTEGER,
FOREIGN KEY(movie_id) REFERENCES movie(movie_id));
/*Insert data into video*/
INSERT INTO video VALUES(54321,'2008-06-18',1234);
INSERT INTO video VALUES(54324,'2008-06-18',1234);
INSERT INTO video VALUES(54325,'2008-06-18',1234);
INSERT INTO video VALUES(34341,'2007-01-22',1235);
INSERT INTO video VALUES(34342,'2007-01-22',1235);
INSERT INTO video VALUES(34366,'2009-03-02',1236);
INSERT INTO video VALUES(34367,'2009-03-02',1236);
INSERT INTO video VALUES(34368,'2009-03-02',1236);
INSERT INTO video VALUES(34369,'2009-03-02',1236);
INSERT INTO video VALUES(44392,'2008-10-21',1237);
INSERT INTO video VALUES(44397,'2008-10-21',1237);
INSERT INTO video VALUES(59237,'2009-02-14',1237);
INSERT INTO video VALUES(61388,'2007-01-25',1239);
INSERT INTO video VALUES(61353,'2006-01-28',1245);
INSERT INTO video VALUES(61354,'2006-01-28',1245);
INSERT INTO video VALUES(61367,'2008-07-30',1246);
INSERT INTO video VALUES(61369,'2008-07-30',1246);
/*Create table membership*/
CREATE TABLE membership
(membership_id INTEGER PRIMARY KEY AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
street VARCHAR.
Select, Select with Boolean Exp, Select with Numeric Exp, Select with Date Exp, Create database, Drop database, Use database, Create table, Describe table, Drop table, Insert record, Update record(s), Delete record(s), Like clause with Select statement, Top clause with Select Statement, Order By clause with Select Statement, Group By clause with Select Statement, Distinct clause with Select Statement, Default constraint, Identity Property, Unique constraint, Check constraint, Alter Table, Primary Key constraint, Foreign Key constraint, Index, Views, Equi-Join, Natural Join, Cross Join
Starting from the database used in Project 1 (see the slightly cha.docxdessiechisomjj4
Starting from the database used in Project 1 (see the slightly changed schema from the original version used in P1, defined in the attached DDL file), a data warehouse star schema with the following characteristics will be defined:
· Dimension tables:
1. Date
2. Product
3. Customer
· Fact table:
1. Sales
For this final project, perform the following steps:
· Create the tables defined above in a star schema. Add the necessary columns in each table to facilitate the implementation of the queries defined below. Only the four tables listed above are allowed in that star schema
· Write PL/SQL code (anonymous blocks and/or subprograms) to populate the warehouse schema with data from the normalized database provided in the attached DDL script
· Write SQL code to perform the following queries:
1. What customer age group spent the most money in the last year? An age group is defined as a ten years interval, such as: 11 – 20, 21 – 30, etc
2. In what zip codes did the highest number of sales (number of items) occur during April 2015?
3. What day of the week did they do most business (by value of sales) in the last year?
4. What quarter is the worst (by value of sales) for each product category, using the whole set of historical data available in the warehouse?
5. What was the best sales month for each product in the last year?
· Write a couple of paragraphs describing:
. How this small data warehouse can help decision making
. How is it different from the original database used as data source
Submit the PL/SQL blocks and SQL statements as a text file (Notepad) following the document naming convention FirstLastFP.txt.
Grading: this project is awarded 100 points
15 points
DDL Script to create the tables in the star schema
25 points
PL/SQL code to populate the star schema from the original database
5 x 10 points
SQL statements for each of the requested queries
10 points
Description of how this data warehouse helps decision making and how it differs from regular databases
DROP TABLE ORDER_ITEMS;
DROP TABLE ORDERS;
DROP TABLE CUSTOMERS;
DROP TABLE PRODUCTS;
DROP TABLE CATEGORIES;
CREATE TABLE CATEGORIES (
ID NUMBER PRIMARY KEY,
Name VARCHAR2(20) NOT NULL);
CREATE TABLE PRODUCTS (
ID NUMBER PRIMARY KEY,
CatID NUMBER,
Name VARCHAR2(20) NOT NULL,
Price NUMBER NOT NULL,
FOREIGN KEY (CatID) REFERENCES CATEGORIES(ID));
CREATE TABLE CUSTOMERS (
ID NUMBER PRIMARY KEY,
Name VARCHAR2(50) NOT NULL,
DOB DATE NOT NULL,
Email VARCHAR2(50),
ZipCode CHAR(5) NOT NULL);
CREATE TABLE ORDERS (
ID NUMBER PRIMARY KEY,
CustID NUMBER NOT NULL,
DatePlaced DATE DEFAULT SYSDATE,
FOREIGN KEY (CustID) REFERENCES CUSTOMERS(ID));
CREATE TABLE ORDER_ITEMS (
OrderID NUMBER NOT NULL,
ProdID NUMBER NOT NULL,
Quantity NUMBER DEFAULT 1,
DateShipped DATE,
FOREIGN KEY (OrderID) REFERENCES ORDERS(ID),
FOREIGN KEY (ProdID) REFERENCES PRODUCTS(ID));
INSERT INTO CATEGORIES VALUES (1, 'Books');
INSERT INTO CATEGORIES VALUES (2, '.
In this talk we will discover the "new" version of the standard of the most hated|used|loved programming language: JavaScript. We're going to see how it evolved and how it got better, making our developers' life definitely better.
We will also see how it allows us to pick our favourite paradigm: Functional or Object Oriented.
Production.javapublic class Production { Declaring instance.pdfsooryasalini
Production.java
public class Production {
//Declaring instance variables
private String title;
private String director;
private String writer;
//Parameterized constructor
public Production(String title, String director, String writer) {
super();
this.title = title;
this.director = director;
this.writer = writer;
}
//Setters and getters.
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
public String getWriter() {
return writer;
}
public void setWriter(String writer) {
this.writer = writer;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println(\"Title: \" + this.title);
System.out.println(\"Director: \" + this.director);
System.out.println(\"Writer: \" + this.writer);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return \"Title :\" + title + \"\ Director :\" + director
+ \"\ Writer :\" + writer;
}
}
___________________________________________
Film.java
public class Film extends Production{
//Declaring instance variables
private int boxOfficeGross;
//Parameterized constructor
public Film(String title, String director, String writer, int boxOfficeGross) {
super(title, director, writer);
this.boxOfficeGross = boxOfficeGross;
}
//Setters and getters.
public int getBoxOfficeGross() {
return boxOfficeGross;
}
public void setBoxOfficeGross(int boxOfficeGross) {
this.boxOfficeGross = boxOfficeGross;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println(\"BoxOfiiceGross: \" + this.boxOfficeGross);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return super.toString()+\"\ BoxOfficeGross :\" + boxOfficeGross+\"\ \";
}
}
_______________________________________________
Play.java
public class Play extends Production {
//Declaring instance variables
private int performances;
//Parameterized constructor
public Play(String title, String director, String writer, int performances) {
super(title, director, writer);
this.performances = performances;
}
//Setters and getters.
public int getPerformances() {
return performances;
}
public void setPerformances(int performances) {
this.performances = performances;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println(\"Performances: \" + this.performances);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return super.toString()+\"\ Performances :\" + performances+\"\ \";
}
}
_______________________________________________
Musical.java
public class BobsTerribleTests
{
public static void main(String[] args)
{
//Creating an Film Object by passing parameters
Film titanic = new Film(\"Titanic\", \"James Cameron\", \"James Cameron\.
Which of these refers to the degree and nature of interdepen.pdfgiriraj65
Which of these refers to the degree and nature of interdependence between the power holder and
others? visibility substitutability centrality discretion Question 27 Which of the following is a "hard"
influence tactic? ingratiation upward appeal persuasion visibility Question 28 2pts Which of the
following is correct regarding assertiveness? It refers to the process of gaining support from one or
more people with higher authority or expertise. It is an indicator that a person lacks power due to
low centraity. It is an attempt to increase liking by, or perceived cimilarity to, some targeted
person. It is alsa known as vocal authority..
Wheat crops across the Americas Asia Europe and Africa ar.pdfgiriraj65
Wheat crops across the Americas, Asia, Europe, and Africa are frequently ravaged by Wheat Yellow Mosaic Virus (WYMV), so there is high demand for wheat varieties or cultivars that can resist this virus.
Published today in PNAS, the study found the resistance gene originated in an ancient Mediterranean wild plant relative of wheat.
Study lead researcher University of Melbourne Dr Mohammad Pourkheirandish said: "This discovery could assist with the development of more resistant wheat cultivars, increase crop yields, and reduce the use of harmful fungicides. It also emphasises the need to preserve biodiversity to protect food supplies."
WYMV reduces grain yield by up to 80 per cent, causing significant economic losses. The virus is hosted and transmitted by a soil-dwelling fungus that colonises the roots of wheat plants, discolouring wheat leaves, and stunting plant growth.
Microscopic fungal spores containing WYMV can live in soil for up to a decade. While fungicides can kill the spores and stop transmission, the fungicide treatment is neither cost-effective nor ecologically sustainable.
"The viable alternative is to selectively breed or genetically engineer wheat with resistance to WYMV," Dr Pourkheirandish said.
"Before this research, we knew that a dominant gene called Ym2 reduces the impact of WYMV on wheat plants by more than 70 per cent, but we didn't understand how the gene achieved this."
The research team used a technique called positional cloning to locate the Ym2 gene on a chromosome in bread wheat, and found that its DNA sequence codes for a protein of the type known as NBS-LRR. These proteins are 'guardians' that detect pathogens and trigger an immune response in plants.
"Now that we know the gene's DNA sequence, we can select breeding lines carrying Ym2 by simply analysing DNA from a small piece of leaf even without the virus inoculation step," Dr Pourkheirandish said.
"It will also make it easier to find variants of Ym2 in wild relatives of wheat, which may provide superior disease resistance for further crop improvement."
The DNA of modern wheat is chimeric, meaning its genetic material derives from several ancestral plants through natural interbreeding, or hybridisation, followed by selective breeding by humans.
By comparing DNA sequences across related species, the researchers discovered that Ym2 in modern bread wheat derives from an ancient wild plant called Aegilops sharonensis, native to eastern Mediterranean countries. A similar gene occurs in Aegilops speltoides, another wild ancestor of bread wheat.
"These wild species would have interbred with cultivated wheat at some point and passed on the genetic resistance that is now so commercially critical," Dr Pourkheirandish said.
"Ancestral wild plants are a rich source of useful traits, like disease resistance, that plant breeders and geneticists can mine to protect modern crops and maintain a healthy food supply -- including the bread, pasta, noodles, couscous, pastries, cak.
Using an Array include ltstdiohgt include ltmpih.pdfgiriraj65
Using an Array:
#include <stdio.h>
#include <mpi.h>
int main(int argc, char** argv) {
int rank, size;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
// Define topology
int topology[5][2] = {{1, 4}, {0, 2, 3}, {1,-1}, {0, 4}, {0, 3}};
// Initialize index and edge arrays
int index[5] = {0};
int edges[5][3] = {{0}};
// Add edges into index array
int i =0;
int j =0;
for (i = 0; i < 5; i++)
{
index[i] = sizeof(topology[i]) / sizeof(int);
for (j = 0; j < index[i]; j++)
{
edges[i][j] = topology[i][j];
}
}
// Display topology for each process
for (i = 0; i < size; i++)
{
if (rank == i)
{
printf("Process %d has %d neighbors: ", i, index[i]);
for (j = 0; j < index[i]; j++)
{
printf("%d ", edges[i][j]);
}
printf("n");
}
MPI_Barrier(MPI_COMM_WORLD);
}
MPI_Finalize();
return 0;
}
MPI Functions:
#include <mpi.h>
#include <stdio.h>
int main(int argc, char** argv)
{
int rank, size;
MPI_Init(&argc, &argv); // Initialize MPI
MPI_Comm_rank(MPI_COMM_WORLD, &rank); // Get the rank of the current process
MPI_Comm_size(MPI_COMM_WORLD, &size); // Get the total number of processes
int nnodes = 5; // Number of nodes in the topology
int nedges = 8; // Number of edges in the topolofy
// Index of the first edge for each node
int index[5] = {2, 5, 6, 8, 9};
int edges[9] = {4, 1, 0, 2, 3, 1, 4, 0, 3}; // List of all edges
MPI_Comm graph_comm; // Create a new communicator for the graph topology
MPI_Graph_create(MPI_COMM_WORLD, nnodes, index, edges, 0, &graph_comm); // Create the
graph topology
int count; // Number of neighbors
int* neighbors; // Neighbor Ranks
MPI_Graph_neighbors_count(graph_comm, rank, &count); // Get the number of neighbors for the
current process
neighbors = (int*) malloc(count * sizeof(int)); // Allocate memory for the array of neighbor ranks
MPI_Graph_neighbors(graph_comm, rank, count, neighbors); // Get the neighbor ranks for the
current process
// Display process and the node in the topologies neighbors
printf("Process %d has %d neighbors:", rank, count);
int i;
for (i = 0; i < count; i++)
{
printf(" %d", neighbors[i]); // Print the neighbor ranks
}
printf("n");
MPI_Finalize();
return 0;
}
ive provided my own code above in case that helps or makes it easier on you guys.
My output isnt quite right ive been at it for a while if someone could fix the output and explain it to
me id be very happy :)
4. Use Graph topology to create following one. Once you create your topology, use one process
(e.g., process 0 ) to display the number of neighbors and its neighbors at each node (i.e.,
process). Use following two methods to check your topology. (20 points) i) Use two arrays, index
and edges, to display number of neighbors and its neighbors for each node. ii) Use two functions
in MPI, "MPI Graph neighbors count" and "MPI Graph neighbors". llinn@scholar-fe06: /470 $
mpirun -n 5 ./hmwk5q4-b Process 0 has 2 neighbors: 41 Process 1 has 3 neighbors: 023 Process
2 has 1 neighbors: 1 Process 3 has 2 neighbors: 40.
Tableau DA 33 MiniCase Analyzing adjusting entries and p.pdfgiriraj65
Tableau DA 3-3: Mini-Case, Analyzing adjusting entries and preparing an adjusted trial balance
LO P5 [The following information applies to the questions displayed below.] Roland Company
began operations on December 1 and needs assistance in preparing December 31 financial
statements, including its year-end adjustments. The Tableau dashboard is provided to assist in the
work. Selected December-January Transactions Additional Information as of December 31 Telo
Job Completion at Year-End ABX Job Completion at Year-End Supplies Remaining at Year-End
Wages Earned By Workers but not yet Paid at Year-End2. Enter the December 31 adjustments in
the following table for prepaid insurance, supplies, accrued wages, accrued revenue, and
unearned revenue. Then, complete the adjusted trial balance by entering the adjusted balance for
each of the accounts..
Rios Co is a regional insurance company that began operatio.pdfgiriraj65
Rios Co. is a regional insurance company that began operations on January 1, 20Y2. The
following selected transactions relate to investments acquired by Rios Co., which has a fiscal year
ending on December 31:
Record these transactions on page 10:
20Y2
Record these transactions on page 11:
20Y3
20Y2
Purchased 7,500 shares of
Caldwell Inc. common stock at
$50 per share plus a brokerage
Feb. 1
commission of $75. Caldwell
has 100,000 shares of common
stock outstanding.
Purchased securities of Holland
May 1 Inc. as a trading investment for
$126,000.
Sold 4,500 shares of Caldwell
July 1 Inc. for $46 per share less a
$110 brokerage commission.
Received an annual dividend of
31 $0.50 per share on 3,000
shares of Caldwell Inc. stock.
Sold the remaining shares of
Caldwell Inc. for $51 per share
Nov. 15
less a $90 brokerage
commission.
The trading securities of
Dec. 31 Holland Inc. have a fair value
on December 31 of $120,000..
Question 1 2 pts Which of the following can be absolute defe.pdfgiriraj65
Question 1 2 pts Which of the following can be absolute defenses to the tort of defamation? truth
and self-defense privilege and self-defense truth and defense of property truth and privilegeDean
runs a small sweater manufacturing company named Dean's Duds. He learns his competitor,
Susie's Sweaters is getting a rare silk yarn blend from Yasmine's Yarns. Dean calls Yasmine and
learns she is receiving $2,000 per commercial roll of the specialized silk yarn under a contract with
Susie's Sweaters. There is a very limited quantity and Yasmine has no extra to sell to Dean. Dean
tells Yasmine he will pay her $3,000 per commercial roll if Yasmine's Yarns will sell its limited
supply of yam to Dean's Duds instead. If Yasmine agrees, Susie's Sweaters may sue Dean for:
disparagement fraudulent misrepresentation conversion interference with contractual
relationsQuestion 3 2 pts Invasion of privacy consists of: ALL of the answers are correct
appropriation intrusion public disclosure of private factsA Macy's store security guard follows a
customer at a distance and watches him put several men's watches and expensive colognes in a
large pocket of his sweatshirt. When the customer walked past the registers and started to exit
Macy's to go into the parking lot, the security guard radioed his supervisor to call the police and
detained the customer. The guard asked to customer to wait in a private office until the police
could arrive. If the customer decides to sue the store for false imprisonment, Macy's would
probably win the lawsuit because the security guard detained the suspected shoplifter: without
physical discomfort in a way that will not cause embarrassment or physical injury to the suspect for
no more than 30 minutes with reasonable cause, in a reasonable manner, and for not more than a
reasonable timeDesiree is a waitress at a Denny's restaurant. She is angry that she has been
assigned to really slow shifts which means her tips were low and she does not make much money.
She decides to take several large boxes of steaks (24 steaks each box) to sell so she make up the
loss in tips. Desiree has committed the tort of: disparagement trespass to personal property
conversion fraudVan is a professional chef with multiple "V" restaurants in the New York City area.
Diamond is also a chef but his only restaurant has been losing business ever since Van opened a
" V " restaurant next door. Diamond opens multiple email and social media accounts to post
hundreds of fake, bad reviews about the "V" restaurants. Van sues Diamond because of the false
reviews and the damage they caused his restaurants under the tort theory of: appropriation public
disclosure of private facts disparagement false lightQuestion 7 2 pts Which of the following is a
business tort? ALL of the answers are correct fraudulent misrepresentation interference with
contractual relations disparagementVanessa, a famous actress, is sun-bathing nude on the back
deck of her secluded home which is surroun.
Objective The purpose of this exercise is to create a Linke.pdfgiriraj65
Objective: The purpose of this exercise is to create a Linked List data structure that mimics the
behavior of the Java Standard Library Version (Java API). The outcomes/results of using the
library features should be identical with your own version (My API). However, the underlying
implementation should follow with the descriptions listed below.
Instructions : Create the following Linked List Data Structure with the given description below in
your utils package and use "for loops" for your repetitive tasks.
Where to find starter code in my-api
package.class : utils.LinkedList
package.class : tests.console.week04.LinkedListTest
Where to find your JUNIT test in my-api
package.class : tests.junit.LinkedListJUnitTest
Nested Class that has to be added to LinkedList class
package.class : utils.LinkedList.Node
Task Check List
ONLY "for" loops should be used within the data structure class. There is an automatic 30%
deduction, if other loops are used.
The names of identifiers MUST match the names listed in the description below. Deductions
otherwise.
Complete coding Assignment in your "my-api" GitHub Repository. You will not be graded
otherwise and will receive a 0, if not uploaded there.
Run JUNIT TEST and take a SNAPSHOT of results. Upload PDF of snapshot of your JUnitTest
results to Canvas.
Description
The internal structure of the Linked List is a doubly linked Node data structure and should have
at a minimum the following specifications:
data fields: The data fields to declare are private and you will keep track of the size of the list with
the variable size and the start of the list with the reference variable data.
first is a reference variable for the first Node<E> in the list.
last is a reference variable for the last Node<E> in the list.
size keeps track of the number of nodes in the list of type int. This will allow you to know the
current size of the list without having to traversing the list.
constructors: The overloaded constructors will initialize the data fields size and data.
A constructor that is a default constructor initializes the starting node location first and size to a
zero equivalent, that is, constructs an empty list.
methods: methods that manages the behavior of the linked nodes.
Together, the methods below give the illusion of a index or countable location. Implement these
methods within your generic Linked List class.
Method
Description
Header
public boolean add(E item)
public void add(int index, E item)
public void append( E item)
private void checkIndex(int index)
public boolean contains(E item)
public void clear()
private E detach(int index)
public E get(int index)
public int indexOf(E item)
private void insertBefore(int index, E item)
public boolean isEmpty()
private Node<E> node(int index)
public E remove(int index)
public boolean remove(E item)
public E set(int index, E item)
public int size()
public String toString()
Node Data Structure
The generic Linked List class includes a static Node class as a nested class, .
Problem 6 Create the Kmaps and then simplify for the followi.pdfgiriraj65
Problem 6 Create the Kmaps and then simplify for the following functions (leave in sum-ofproducts
form): F(w,x,y,z)=wxyz+wxyz+wxyz+wxyz+wxyz+wxyz+wxyz F(w,x,y,z)=wxyz+wxyz+wxyz+wxyz+
wxyz F(w,x,y,z)=yz+wy+wxy+wxyz+wxyz.
PLEASE ANSWER PART A B C D Thank you Kingbird Inc uses.pdfgiriraj65
PLEASE ANSWER PART A, B, C, D. Thank you
Kingbird Inc. uses a calendar year for financial reporting. The company is authorized to issue 8,
420,000 shares of $12 par common stock. At no time has Kingbird issued any potentially dilutive
securities. Listed below is a summary of Kingbird's common stock activities. (a) Compute the
weighted-average number of common shares used in computing earnings per common share for
2024 on the 2025 comparative income statement. shares.
Please discuss the following i Using examples for each typ.pdfgiriraj65
Please discuss the following: i) Using examples for each type, please discuss how firms are
utilizing the four types of distribution channels. ii) Given the recent environmental changes due to
COVID-19 and the continuous technological developments; which two types are most critical to
shoe manufacturers? NB As a reminder: please remember to add at least three developed
contributions to the class discussions..
Mill Company began operations on January 1201 and recogni.pdfgiriraj65
Mill Company began operations on January 1,201, and recognized income from construction-type
contracts under different methods for tax purposes and financial reporting purposes. Information
concerning income recognition under each method is as follows: Required: Assume the income
tax rate is 21% in all years and that Mill has no other temporary differences. In its December 31,20
3, balance sheet, what amount of deferred income taxes should Mill report? Indicate whether the
amount is an asset or a liability..
For each situation described below indicate which financial.pdfgiriraj65
For each situation described below, indicate which financial instrument you think would be the
most appropriate to use and why. a. The City Of Philadelphia needs to raise $100 million for
improvements and repairs to the Walt Whitman toll bridge. b. Citizens Bank discovers they have
reserves in excess of the level required that are expected to last for 3 days. c. DiBruno Bros.
imports hundreds of wheels of cheese from Italy each month that typically take between 30 and 60
days to arrive. Due to the perishable nature of the cargo, they prefer to postpone payment until
delivery. d. Tasty Baking Company finds itself in need of some short-term working capital to
finance an increase in the value of their ingredients inventory. e. Bank of America has substantial
Treasury bill holdings but finds itself with an insufficient level of required reserves. The reserve
deficiency is expected to last only for a day. f. Revere Cookware imports copper from Chile and is
concerned that the value of the Chilean peso will rise in relation to the US dollar in coming months..
Exercise I Georgettes and Georges Genotypes Gene 1 Geor.pdfgiriraj65
Exercise I: Georgette's and George's Genotypes
Gene #1
Georgette's genotype for colorblindness
X^C X^c
George's genotype for colorblindness
X^C Y
Gene #2
Georgette's genotype for tongue rolling
Tt
George's genotype for tongue rolling
Tt
Gene #3
Georgette's genotype for eye color
bb
George's genotype for eye color
Bb
Gene #4
Georgette's genotype for hair form
HCHS
George's genotype for hair form
HCHS
Gene #5
Georgette's genotype for ABO blood type
lAlB
George's genotype for ABO blood type
ii
Exercise II: Predictions
Gene #1
Expected phenotypic ratio
3:1
Expected sex ratio
1:1
Gene #2
Expected phenotypic ratio
3:1
Gene #3
Expected phenotypic ratio
1:1
Gene #4
Expected phenotypic ratio
1:2:1
Gene #5
Expected phenotypic ratio
1:1
Exercise III: Making Babies
Exercise IV: Results
Write the symbol for the allele, then record how many and what color beans you put in that bag for
that allele.
Gene Number
Phenotype
Predicted
Actual
Gender
Female
1
1
Male
1
1
#1
Normal Color Vision
3
9
Colorblind
1
3
#2
Tongue Roller
3
9
Non-Roller
1
3
#3
Brown Eyes
1
6
Blue Eyes
1
6
#4
Curly Hair
1
3
Wavy Hair
2
6
Straight Hair
1
3
#5
Blood Type A
1
Blood Type B
1
Blood Type O
1
Blood Type AB
1
Bag Number
First Allele
Second Allele
Georgette #1
W
w
Georgette #2
W
Wm
Georgette #3
W
w
Georgette #4
w
W
Georgette #5
W
Wm
George #1
W
Wm
George #2
W
w
George #3
w
Wm
George #4
w
W
George #5
W
Wm
Questions:
1.
2.
3.
Georgette's genotype for
X^C X^c
colorblindness
Gene #1
George's genotype for
X^C Y
colorblindness
Georgette's genotype for
Tt
tongue rolling
Gene #2
George's genotype for tongue
Tt
rolling
Georgette's genotype for eye
bb
color
Gene #3
George's genotype for eye
Bb
color
Georgette's genotype for hair
HCHS
form
Gene #4
George's genotype for hair form HCHS
Georgette's genotype for ABO
lAlB
blood type
Gene #5
George's genotype for ABO
ii
blood type.
El 23 de enero se adquieren 17000 acciones de Tolle Company.pdfgiriraj65
El 23 de enero se adquieren 17,000 acciones de Tolle Company a un precio de $24 por accin ms
una comisin de corretaje de $180. El 12 de abril, se recibi un dividendo de $0.30 por accin sobre
las acciones de Tolle Company. El 10 de junio, se vendieron 6,600 acciones de Tolle Company a
$31 por accin menos una comisin de corretaje de $125.
Prepare los asientos de diario para la compra original, el dividendo y la venta bajo el mtodo del
costo. Consulte el Plan de cuentas para obtener la redaccin exacta de los ttulos de las cuentas.
Cuando sea necesario, redondee sus respuestas al dlar ms cercano.
PLAN DE CUENTAS Libro mayor
ACTIVOS
110 Dinero
111 Dinero para gastos menores
120 Cuentas por cobrar
121 Estimacin para cuentas de cobro dudoso
131 Documentos por cobrar
132 Intereses por cobrar
141 Inventario de mercanca
145 Material de oficina
161 Inversiones-Tolle Company Stock
Asignacin de valoracin para inversiones
165
comerciales
Reserva de valuacin para inversiones
166
disponibles para la venta
181 Tierra
193 Equipo de oficina
194 Depreciacin Acumulada-Equipos de Oficina.
Ests realizando experimentos de mejoramiento en maz Comie.pdfgiriraj65
Ests realizando experimentos de mejoramiento en maz. Comienza con una generacin P con una
verdadera planta reproductora que tiene cubierta de semilla normal y endospermo coloreado. La
segunda planta de maz es un verdadero criador de cubierta de semilla abigarrada y endospermo
incoloro. Usted sospecha que los genes estn vinculados, por lo que toma una de las generaciones
F1 del cruce anterior y realiza un cruce de prueba con una planta de reproduccin verdadera con
cubierta de semilla abigarrada y endospermo incoloro. Los resultados del cruce de prueba son:
350 tegumento normal y endospermo coloreado; 63 tegumento abigarrado y endospermo normal;
57 tegumento normal y endospermo incoloro; 350 tegumento abigarrado y endospermo incoloro.
Cul es la distancia en el mapa entre estos genes?.
Assume that a cross is made between AaBb and aabb plants and.pdfgiriraj65
Assume that a cross is made between AaBb and aabb plants and that the offspring occur in the
following numbers: 406 Aabb, 48 AaBb, 494aaBb. and 52aabb. These results are consistent with
which of the following? linkage with 50% crossing over the genotype of the heterozygous parent is
in trans configuration (Ab/aB) the genes are on different chromosomes linkage with approximately
33 map units between the two gene loci independent assortment.
a How much money was eriginally invested t Show that th.pdfgiriraj65
(a) How much money was eriginally invested? (t) Show that the data are eiponential. (Round your
answer to three decimal places.) tach succeswive ratio of newold is x. which shows that the eata is
expenential, Lel What ie bhe monthiy interest rate? (hound your answer to one decimal place.) (d)
what is the yearly interest fate? (Hoond you aftwer to we decimal place.) X h fund wil ahe hove?
(Round vour animes te the nearest cent) x xt mentha X montis.
A Bucle remolino y arco B Crestas surcos y colinas .pdfgiriraj65
A.
Bucle, remolino y arco
B.
Crestas, surcos y colinas
C.
Cresta final, bifurcacin y punto
D.
Ncleo, delta y arco
A. Bucle, remolino y arco
B. Crestas, surcos y colinas
C. Cresta final, bifurcacin y punto
D. Ncleo, delta y arco.
68 Exercise Ferris Corporation makes a single product a f.pdfgiriraj65
6.8 Exercise Ferris Corporation makes a single product - a fire-resistant commercial filing
cabinetthat it sells to office furniture distributors. The company has a simple ABC system that it
uses for internal decision making. The company has two overhead departments whose costs are
listed on the following page: The company's ABC system has the following activity cost pools and
activity [measures: Costs assigned to the "Other" activity cost pool have no activity measure; they
consist of the costs of unused capacity and organization-sustaining costs - neither of which are
assigned to orders, customers, or the product. Ferris Corporation distributes the costs of
manufacturing overhead and selling and administrative overhead to the activity cost pools based
on employee interviews, the results of which are reported below: Required: 1. Perform the first-
stage allocation of overhead costs to the activity cost pools. 2. Compute activity rates for the
activity cost pools..
A special interest speaks for a position or program which 1.pdfgiriraj65
A special interest speaks for a position or program which (1) fails to benefit the general public or (2
) benefits a few far more than the public, and (3) whose costs outweigh the general benefit. True
False.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
The resto txt Use for TM254 2021J TMA02 Question 6 .pdf
1. The resto txt:
/* Use for TM254 2021J, TMA02, Question 6 Copyright 2021 The Open University */
/* Note - all dates are in 'YYYY-MM-DD' format */
/* This overrides the date format set by the local PC locale variable. */
GRANT USAGE ON SCHEMA public TO PUBLIC;
GRANT ALL ON SCHEMA public TO PUBLIC;
/* Evaluate/Run this file in the default database, postgres, and as the*/
/* default user, postgres. */
/* If you re-run the file you will reset any changes you have made to */
/* the database content back to the original content. */
/* The DROP IF EXISTS ensures that when you re-run the script file it */
/* replaces the content of the database, on first run the tables and */
/* domains don't exist so are not dropped and you recieve a warning */
/* message. */
DROP VIEW IF EXISTS Catalogue CASCADE;
DROP TABLE IF EXISTS TaskTicket CASCADE;
DROP TABLE IF EXISTS HasExpertiseIn CASCADE;
DROP TABLE IF EXISTS RestorationItem CASCADE;
DROP TABLE IF EXISTS Expert CASCADE;
DROP TABLE IF EXISTS Specialism CASCADE;
DROP DOMAIN IF EXISTS ItemCodes;
DROP DOMAIN IF EXISTS DescriptionString;
DROP DOMAIN IF EXISTS TaskNumbers;
DROP DOMAIN IF EXISTS NameString;
DROP DOMAIN IF EXISTS AddressString;
DROP DOMAIN IF EXISTS PublicityString;
DROP DOMAIN IF EXISTS EmailString;
DROP DOMAIN IF EXISTS YN;
DROP DOMAIN IF EXISTS SpecialismString;
DROP DOMAIN IF EXISTS QualificationsString;
DROP DOMAIN IF EXISTS MonetaryValues;
2. /* Now creating the domains */
CREATE DOMAIN ItemCodes AS INTEGER CHECK(VALUE > 0);
CREATE DOMAIN DescriptionString AS VARCHAR(120);
CREATE DOMAIN TaskNumbers AS INTEGER CHECK(VALUE > 0);
CREATE DOMAIN NameString AS VARCHAR(120);
CREATE DOMAIN AddressString AS VARCHAR(400);
CREATE DOMAIN PublicityString AS VARCHAR(120);
CREATE DOMAIN EmailString AS VARCHAR(100) CHECK (VALUE LIKE ('%@%'));
CREATE DOMAIN YN AS CHAR(1) CHECK(VALUE IN ('Y','N') );
CREATE DOMAIN SpecialismString AS VARCHAR(120);
CREATE DOMAIN QualificationsString AS VARCHAR(300);
CREATE DOMAIN MonetaryValues AS NUMERIC(9,2) CHECK (VALUE >= 0.00);
/* DOMAINS CREATED */
/* now creating tables */
CREATE TABLE Specialism(
Name SpecialismString PRIMARY KEY
);
CREATE TABLE RestorationItem(
ItemCode ItemCodes PRIMARY KEY,
ItemDescription DescriptionString NOT NULL,
WorkDescription DescriptionString NOT NULL,
InsuranceValue MonetaryValues,
CostEstimate MonetaryValues NOT NULL,
DateAccepted DATE NOT NULL,
DateReturned DATE,
PriceCharged MonetaryValues,
-- relationship Requires mandatory participation
-- WARNING - the requires mandatory participation
-- constraint has not been implemented.
-- This omission permits the entry of a row that
-- does not match a related TaskTicket record.
-- CONSTRAINT RequiresMandatory CHECK (ItemCode
-- IN (SELECT ItemCode FROM TaskTicket))
CONSTRAINT ValueAcceptanceDate CHECK (DateAccepted <= CURRENT_DATE),
CONSTRAINT DateOrderCheck CHECK (DateReturned > DateAccepted),
CONSTRAINT ValidInsuranceValue CHECK (InsuranceValue <= 1000000.00)
3. );
CREATE TABLE Expert(
Name NameString PRIMARY KEY,
Address AddressString NOT NULL,
PublicityText PublicityString,
Email EmailString NOT NULL,
UseInExternalCatalogue YN NOT NULL,
DateApprovedUse DATE NOT NULL,
-- relationship HasExpertiseIn mandatory participation
-- WARNING - the HasExpertiseIn mandatory participation
-- constraint has not been implemented.
-- This omission permits the entry of a row that
-- does not match a related HasExpertiseIn record.
-- CONSTRAINT HasExpertiseInMandatory CHECK (Name
-- IN (SELECT ExpertName FROM HasExpertiseIn))
CONSTRAINT DateApprovedUseValid CHECK (DateApprovedUse <= CURRENT_DATE)
);
CREATE TABLE HasExpertiseIn(
ExpertName NameString,
SpecialismName SpecialismString,
PRIMARY KEY(ExpertName,SpecialismName),
ChargeRate MonetaryValues NOT NULL,
QualificationsHeld QualificationsString,
CONSTRAINT ExpertHasExpertiseIn FOREIGN KEY (ExpertName) REFERENCES Expert,
CONSTRAINT HasExpertiseInSpecialism FOREIGN KEY (SpecialismName) REFERENCES
Specialism
);
CREATE TABLE TaskTicket(
TaskNumber TaskNumbers PRIMARY KEY,
Description DescriptionString NOT NULL,
SpecialismNeeded SpecialismString NOT NULL,
DateCreated DATE NOT NULL,
DateCompleted DATE,
CostOfParts MonetaryValues,
4. CostOflabour MonetaryValues,
ItemCode ItemCodes NOT NULL,
Name NameString,
CONSTRAINT Needs FOREIGN KEY (SpecialismNeeded) REFERENCES Specialism,
CONSTRAINT Requires FOREIGN KEY (ItemCode) REFERENCES RestorationItem,
CONSTRAINT WorkedOnBy FOREIGN KEY (Name) REFERENCES Expert,
CONSTRAINT DateCreatedValidity CHECK ( DateCreated <= CURRENT_DATE ),
CONSTRAINT DateSequenceValidity CHECK ( DateCompleted >= DateCreated )
);
/* TABLES CREATED */
/* now to populate the tables with data */
INSERT INTO Specialism VALUES ('Clockwork Toys');
INSERT INTO Specialism VALUES ('Clocks');
INSERT INTO Specialism VALUES ('Lighting');
INSERT INTO Specialism VALUES ('Electrical Items');
INSERT INTO Specialism VALUES ('Taxidermy');
INSERT INTO Specialism VALUES ('Tractors');
INSERT INTO Specialism VALUES ('Painting - small scale');
INSERT INTO Specialism VALUES ('Painting - large scale');
INSERT INTO Specialism VALUES ('Stationary Engines, pre-1940');
INSERT INTO Specialism VALUES ('Model Trains - all scales');
INSERT INTO Specialism VALUES ('Lawnmowers pre-1960');
INSERT INTO Specialism VALUES ('Model Steamboats');
INSERT INTO Specialism VALUES ('Welding');
INSERT INTO Specialism VALUES ('Metal Fabrication');
INSERT INTO Specialism VALUES ('Fabric restoration');
INSERT INTO Specialism VALUES ('Woodworking');
INSERT INTO Expert VALUES('Bob','Sunflower Valley','Fixing it since
1999.','bob@theyard','Y','2022-02-01');
INSERT INTO Expert VALUES('Wendy','Fixham Harbour',NULL,
'wendy@harbourview','Y','2022-01-04');
INSERT INTO Expert VALUES('Pilchard','Sunflower Valley','All era, all fabrics, no job too
small.','PT6@sunflowermail','N','2022-02-13');
INSERT INTO Expert VALUES('Leo','Campus Lane','Trains a speciality, also clocks and clockwork
toys.','LeoR12@TheCampus','Y','2022-01-19');
INSERT INTO Expert VALUES('Spud','Pickles Field','All things
5. steam.','strawman@valley','Y','2022-05-17');
INSERT INTO Expert VALUES('Anish','Ancient Hollow','Restoration paintwork, toys and small
engines a speciality.','digdig@oldground','N','2022-05-11');
INSERT INTO Expert VALUES('Benjamin','The Post Office','Fabrication and welding - no job too
big.','postie1@sortingyard','Y','2022-04-10');
INSERT INTO Expert VALUES('JJ','Spring City','Small scale traction and stationary engines, repair
and refurbishment, call for a quote.','rocket23@SpringCityRockets','Y','2022-05-13');
INSERT INTO Expert VALUES('Angelo','Bobsville Pizzeria','Lighting them up since
1999.','Angelo@bakersfield','N','2022-03-02');
INSERT INTO Expert VALUES('Saffron','Pickles Sunflower Factory','Farm machinery
repairs.','Saff@Pickles','Y','2022-03-10');
INSERT INTO HasExpertiseIn VALUES ('Bob','Welding',23.00,'City&Guilds, Level 3
welding,2021');
INSERT INTO HasExpertiseIn VALUES ('Wendy','Fabric restoration',10.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Pilchard','Fabric restoration',14.00,'Advanced UFT,
2019');
INSERT INTO HasExpertiseIn VALUES ('Pilchard','Taxidermy',25.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Leo','Model Trains - all scales',35.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Leo','Clocks',18.00,'BHI Technician Grade, 2019');
INSERT INTO HasExpertiseIn VALUES ('Leo', 'Clockwork Toys',15.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Spud', 'Model Steamboats',15.50,NULL);
INSERT INTO HasExpertiseIn VALUES ('Spud', 'Stationary Engines, pre-1940',23.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Spud','Metal Fabrication',20.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Spud', 'Tractors',18.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Anish', 'Painting - small scale',16.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Anish', 'Painting - large scale',23.00,'Vehicle body and
paint - level 2 apprenticeship');
INSERT INTO HasExpertiseIn VALUES ('Anish', 'Clockwork Toys',17.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Benjamin','Metal Fabrication',19.00,'Fundamentals of
Metal Fabrication Certificate, 2010');
INSERT INTO HasExpertiseIn VALUES ('Benjamin', 'Welding',22.00,'3G MIG Welding, 2020');
INSERT INTO HasExpertiseIn VALUES ('Benjamin', 'Woodworking',18.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('JJ','Stationary Engines, pre-1940',26.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('JJ','Metal Fabrication',18.00, 'Advanced of Metal
Fabrication Certificate, 2011');
INSERT INTO HasExpertiseIn VALUES ('Angelo','Lighting',19.00,'LIA Certificate - Advanced');
INSERT INTO HasExpertiseIn VALUES ('Angelo','Electrical Items',19.00,'Part P 2393-10');
INSERT INTO HasExpertiseIn VALUES ('Saffron','Tractors',22.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Saffron', 'Metal Fabrication',17.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Saffron','Welding',21.90,'MIG/MAG, TIG and MMA,
ASME IX, TWI, 2020');
6. INSERT INTO HasExpertiseIn VALUES ('Saffron','Stationary Engines, pre-1940',26.00,NULL);
INSERT INTO RestorationItem VALUES(291,'Ratchet Seed spreader','Straighten ratchet, replace
handle',80.00,15.00,'2022-05-01','2022-05-20',55.00);
INSERT INTO RestorationItem VALUES(101,'Dentist drill, 1940','Improve look', 100.00,
60.00,'2022-05-01','2022-05-22',66.00);
INSERT INTO RestorationItem VALUES(524,'Sir Nigel Gresley, BR Blue, Hattons Original','Align
bogies',900.00,25.00,'2022-04-20','2022-04-30',25.00 );
INSERT INTO RestorationItem VALUES(118,'Chandelier, 200 drop, 6ft diameter, plain','repair and
replace missing elements',870.00,80.00,'2022-04-01',NULL,NULL );
INSERT INTO RestorationItem VALUES(293,'Lister D Type single cylinder petrol engine built Sept
1946','Ensure running and fit to wheeled trailer',400.00,690.00,'2022-05-02','2022-05-18',660.00 );
INSERT INTO RestorationItem VALUES(249,'1928 Ruston Hornby and bamford cornmill','Redress
flywheel, repaint',1500.00,400.00,'2022-03-25','2022-04-15',280.00 );
INSERT INTO RestorationItem VALUES(483,'BAMFORD OPEN CRANK, 1933','try to get
running',300.00, 600.00,'2022-02-02','2022-3-10',630.00);
INSERT INTO RestorationItem VALUES(884,'TIN PLATE WIND UP SPEEDBOAT SCHYLLING
COLLECTOR SERIES','lossen tight spring, make new key',NULL,60.00,'2022-02-17' ,'2022-03-
10',80.00);
INSERT INTO RestorationItem VALUES(937,'Schuco Clockwork Pecking Bird','re-
feather',NULL,30.50,'2022-04-28',NULL,NULL );
INSERT INTO RestorationItem VALUES(867,'Wind-Up Walking Turkey, Blomer & Scholer, US
Zone Germany, 50s.','repaint and reattach foot',100.00,60.00,'2022-03-15','2022-04-05',80.00 );
INSERT INTO RestorationItem VALUES(239,'Foster 4" scale Traction Engine','Make boiler good
for steam',20000.00,1550.00,'2022-04-21',NULL,NULL );
INSERT INTO RestorationItem VALUES(845,'Steam Chair-o-plane, 1910 by Walkers of
Tewkesbury','refit chairs, re-upholster in vintage fabrics',400000.00,5000.00,'2022-01-05','2022-
02-15',2050.00);
INSERT INTO RestorationItem VALUES(224,'Lotus Elan Fuel Gauge, BF2201','re-chrome',NULL,
60.00,'2022-02-27','2022-03-15',100.00 );
INSERT INTO RestorationItem VALUES(163,'Asco Counter Scales, sweet shop','re-balance',
NULL, 25.00,'2022-03-20','2022-04-04',30.00 );
INSERT INTO RestorationItem VALUES(246,'Victorian Brass Postal Scales with Mahogany
Base','replace missing crossrod',100.00,30.00,'2022-03-23','2022-04-14',80.00 );
INSERT INTO RestorationItem VALUES(934,'Ransomes Mg2 Crawler Tractor','retread and clear
oil residue',500.00, 1500.00,'2022-01-02','2022-01-31',1800.00 );
INSERT INTO RestorationItem VALUES(468,'Oxford Allen Scythe, Villiers 4 stroke engine grass
mower cutter brush finger bar','Address finger bar alignment',100.00,30.00,'2022-03-19','2022-03-
29',30.00 );
INSERT INTO RestorationItem VALUES(835,'Plough and ridger','replace plough blade, repaint in
original colours',400.00,350.00,'2022-03-24','2022-04-25',350.00);
INSERT INTO RestorationItem VALUES(348,'Corn mill grinder, 16inch spindle','re-box corn
7. holder',250.00,100.00,'2022-01-20','2022-02-15',200.00 );
INSERT INTO RestorationItem VALUES(783,'Vintage Antique poss Victorian Rotary Knife Cleaner
Sharpener - premier', 'trim sharpening wheel, re-varnish',200.00,100.00,'2022-03-15',NULL,NULL
);
INSERT INTO RestorationItem VALUES(359,'63inch Gents Railway Station Factory Clock','fit new
hands',5000.00,250.00,'2022-03-12','2022-03-30',110.00 );
INSERT INTO TaskTicket VALUES(100, 'Straighten ratchet','Metal Fabrication','2022-05-02',
'2022-05-06',0.00,28.00,291,'JJ');
INSERT INTO TaskTicket VALUES(101, 'Replace handle','Woodworking','2022-05-02', '2022-05-
09',5.00,22.00,291,'Benjamin');
INSERT INTO TaskTicket VALUES(102, 'Check and refurbish electricals','Electrical
Items','2022-05-02', '2022-05-04',12.00,16.00,101,'Angelo');
INSERT INTO TaskTicket VALUES(103, 'Restore paintwork','Painting - small scale','2022-05-06',
'2022-05-09',18.00,20.00,101,'Anish');
INSERT INTO TaskTicket VALUES(104, 'Align bogies','Model Trains - all
scales','2022-04-21','2022-04-29',0.00,20.00,524,'Leo');
INSERT INTO TaskTicket VALUES(105, 'Repair and replace missing
elements','Lighting','2022-04-03',NULL,NULL,NULL,118,'Angelo');
INSERT INTO TaskTicket VALUES(106, 'Ensure running','Stationary Engines, pre-
1940','2022-05-02', '2022-05-06' ,80.00,140.00,293,'Saffron');
INSERT INTO TaskTicket VALUES(107, 'Construct chassis','Metal
Fabrication','2022-05-02','2022-05-05',110.00,200.00,293,'Spud');
INSERT INTO TaskTicket VALUES(108, 'Construct trolley on
chassis','Woodworking','2022-05-10','2022-05-18',50.00,83.00,293,'Benjamin');
INSERT INTO TaskTicket VALUES(109, 'Redress fly-wheel','Stationary Engines, pre-
1940','2022-03-26','2022-03-29',10.00,23.00,249,'Saffron');
INSERT INTO TaskTicket VALUES(110, 'Repaint','Painting - large scale','2022-03-30','2022-04-
05',105.00,88.00,249,'Anish');
INSERT INTO TaskTicket VALUES(111, 'Overhaul to working state','Stationary Engines, pre-
1940','2022-02-04','2022-02-27',377.00,238.00,483,'Spud');
INSERT INTO TaskTicket VALUES(112, 'Loosen tight spring','Clockwork Toys','2022-02-18','2022-
02-21', 0.00, 40.00,884,'Leo');
INSERT INTO TaskTicket VALUES(113, 'Make new key','Clockwork Toys','2022-02-18','2022-02-
8. 28',5.00,30.00,884,'Leo');
INSERT INTO TaskTicket VALUES(114, 'Re-feather','Taxidermy','2022-04-28',NULL,
NULL,NULL,937,'Pilchard');
INSERT INTO TaskTicket VALUES(115, 'Re-attach foot','Clockwork Toys','2022-03-20','2022-03-
22', 5.00, 20.00,867,'Anish');
INSERT INTO TaskTicket VALUES(116, 'Repaint','Painting - small scale','2022-03-23','2022-03-
29',25.00,25.00,867,'Anish');
INSERT INTO TaskTicket VALUES(117, 'Construct replacement for damaged boiler plates','Metal
Fabrication','2022-04-22',NULL,NULL,NULL,239,'Benjamin');
INSERT INTO TaskTicket VALUES(118, 'Weld new boiler
plates','Welding','2022-04-28',NULL,NULL,NULL,239,'Benjamin');
INSERT INTO TaskTicket VALUES(119, 'Paint boiler','Painting - large
scale','2022-04-30',NULL,NULL,NULL,239,'Anish');
INSERT INTO TaskTicket VALUES(120, 'Replace missing
chairs','Woodworking','2022-01-05','2022-01-13', 250.00,240.00 ,845,'Benjamin');
INSERT INTO TaskTicket VALUES(121, 'Re-upholster all chairs in vintage fabrics','Fabric
restoration','2022-01-15','2022-01-30', 400.00,340.00,845,'Wendy');
INSERT INTO TaskTicket VALUES(122, 'Attach chairs replacing chains as required','Metal
Fabrication','2022-01-31','2022-02-10', 180.00,100.00,845,'Spud');
INSERT INTO TaskTicket VALUES(123, 'Rechrome','Painting - small scale','2022-02-28','2022-03-
12', 40.00,40.00,224,'Anish');
INSERT INTO TaskTicket VALUES(124, 'Rebalance scale','Clockwork Toys','2022-03-22','2022-
03-29', 3.00, 20.00,163,'Anish');
INSERT INTO TaskTicket VALUES(125, 'Replace missing cross-rod','Metal
Fabrication','2022-03-26','2022-03-30', 30.00, 35.00,246,'Spud');
INSERT INTO TaskTicket VALUES(126, 'Retread','Tractors','2022-01-03','2022-01-
18',340.00,120.00 ,934,'Saffron');
INSERT INTO TaskTicket VALUES(127, 'Refurbish engine','Tractors','2022-01-08','2022-01-
26',430.00, 550.00,934,'Saffron');
INSERT INTO TaskTicket VALUES(128, 'Align finger bars','Metal Fabrication','2022-03-19','2022-
03-21', 0.00, 23.00,468,'JJ');
INSERT INTO TaskTicket VALUES(129, 'Replace plough blade','Metal
Fabrication','2022-03-25','2022-03-28',70.00, 35.00,835,'Saffron');
9. INSERT INTO TaskTicket VALUES(130, 'Repaint with matching original colours','Painting - large
scale','2022-03-29','2022-04-15', 105.00, 95.00,835,'Anish');
INSERT INTO TaskTicket VALUES(131, 'Replace corn holder using
Oak','Woodworking','2022-01-20','2022-01-29', 80.00, 100.00,348,'Benjamin');
INSERT INTO TaskTicket VALUES(132, 'Trim sharpening wheel','Metal
Fabrication','2022-03-16',NULL, NULL,NULL,783,'Spud');
INSERT INTO TaskTicket VALUES(133, 'Re-varnish','Painting - small scale','2022-03-25',NULL,
NULL,NULL,783,'Anish' );
INSERT INTO TaskTicket VALUES(134, 'Fit new hands','Metal Fabrication','2022-03-16','2022-03-
22',30.00, 40.00,359,'JJ' );
/* Data input ends */
/* Use for TM254 2021J, TMA02, Question 6 Copyright 2021 The Open University */
/* Note - all dates are in 'YYYY-MM-DD' format */
/* This overrides the date format set by the local PC locale variable. */
GRANT USAGE ON SCHEMA public TO PUBLIC;
GRANT ALL ON SCHEMA public TO PUBLIC;
/* Evaluate/Run this file in the default database, postgres, and as the*/
/* default user, postgres. */
/* If you re-run the file you will reset any changes you have made to */
/* the database content back to the original content. */
/* The DROP IF EXISTS ensures that when you re-run the script file it */
/* replaces the content of the database, on first run the tables and */
/* domains don't exist so are not dropped and you recieve a warning */
/* message. */
10. DROP VIEW IF EXISTS Catalogue CASCADE;
DROP TABLE IF EXISTS TaskTicket CASCADE;
DROP TABLE IF EXISTS HasExpertiseIn CASCADE;
DROP TABLE IF EXISTS RestorationItem CASCADE;
DROP TABLE IF EXISTS Expert CASCADE;
DROP TABLE IF EXISTS Specialism CASCADE;
DROP DOMAIN IF EXISTS ItemCodes;
DROP DOMAIN IF EXISTS DescriptionString;
DROP DOMAIN IF EXISTS TaskNumbers;
DROP DOMAIN IF EXISTS NameString;
DROP DOMAIN IF EXISTS AddressString;
DROP DOMAIN IF EXISTS PublicityString;
DROP DOMAIN IF EXISTS EmailString;
DROP DOMAIN IF EXISTS YN;
DROP DOMAIN IF EXISTS SpecialismString;
DROP DOMAIN IF EXISTS QualificationsString;
DROP DOMAIN IF EXISTS MonetaryValues;
/* Now creating the domains */
CREATE DOMAIN ItemCodes AS INTEGER CHECK(VALUE > 0);
11. CREATE DOMAIN DescriptionString AS VARCHAR(120);
CREATE DOMAIN TaskNumbers AS INTEGER CHECK(VALUE > 0);
CREATE DOMAIN NameString AS VARCHAR(120);
CREATE DOMAIN AddressString AS VARCHAR(400);
CREATE DOMAIN PublicityString AS VARCHAR(120);
CREATE DOMAIN EmailString AS VARCHAR(100) CHECK (VALUE LIKE ('%@%'));
CREATE DOMAIN YN AS CHAR(1) CHECK(VALUE IN ('Y','N') );
CREATE DOMAIN SpecialismString AS VARCHAR(120);
CREATE DOMAIN QualificationsString AS VARCHAR(300);
CREATE DOMAIN MonetaryValues AS NUMERIC(9,2) CHECK (VALUE >= 0.00);
/* DOMAINS CREATED */
/* now creating tables */
CREATE TABLE Specialism(
Name SpecialismString PRIMARY KEY
);
CREATE TABLE RestorationItem(
ItemCode ItemCodes PRIMARY KEY,
ItemDescription DescriptionString NOT NULL,
WorkDescription DescriptionString NOT NULL,
InsuranceValue MonetaryValues,
12. CostEstimate MonetaryValues NOT NULL,
DateAccepted DATE NOT NULL,
DateReturned DATE,
PriceCharged MonetaryValues,
-- relationship Requires mandatory participation
-- WARNING - the requires mandatory participation
-- constraint has not been implemented.
-- This omission permits the entry of a row that
-- does not match a related TaskTicket record.
-- CONSTRAINT RequiresMandatory CHECK (ItemCode
-- IN (SELECT ItemCode FROM TaskTicket))
CONSTRAINT ValueAcceptanceDate CHECK (DateAccepted <= CURRENT_DATE),
CONSTRAINT DateOrderCheck CHECK (DateReturned > DateAccepted),
CONSTRAINT ValidInsuranceValue CHECK (InsuranceValue <= 1000000.00)
);
CREATE TABLE Expert(
Name NameString PRIMARY KEY,
Address AddressString NOT NULL,
PublicityText PublicityString,
13. Email EmailString NOT NULL,
UseInExternalCatalogue YN NOT NULL,
DateApprovedUse DATE NOT NULL,
-- relationship HasExpertiseIn mandatory participation
-- WARNING - the HasExpertiseIn mandatory participation
-- constraint has not been implemented.
-- This omission permits the entry of a row that
-- does not match a related HasExpertiseIn record.
-- CONSTRAINT HasExpertiseInMandatory CHECK (Name
-- IN (SELECT ExpertName FROM HasExpertiseIn))
CONSTRAINT DateApprovedUseValid CHECK (DateApprovedUse <= CURRENT_DATE)
);
CREATE TABLE HasExpertiseIn(
ExpertName NameString,
SpecialismName SpecialismString,
PRIMARY KEY(ExpertName,SpecialismName),
ChargeRate MonetaryValues NOT NULL,
QualificationsHeld QualificationsString,
CONSTRAINT ExpertHasExpertiseIn FOREIGN KEY (ExpertName) REFERENCES Expert,
15. /* TABLES CREATED */
/* now to populate the tables with data */
INSERT INTO Specialism VALUES ('Clockwork Toys');
INSERT INTO Specialism VALUES ('Clocks');
INSERT INTO Specialism VALUES ('Lighting');
INSERT INTO Specialism VALUES ('Electrical Items');
INSERT INTO Specialism VALUES ('Taxidermy');
INSERT INTO Specialism VALUES ('Tractors');
INSERT INTO Specialism VALUES ('Painting - small scale');
INSERT INTO Specialism VALUES ('Painting - large scale');
INSERT INTO Specialism VALUES ('Stationary Engines, pre-1940');
INSERT INTO Specialism VALUES ('Model Trains - all scales');
INSERT INTO Specialism VALUES ('Lawnmowers pre-1960');
INSERT INTO Specialism VALUES ('Model Steamboats');
INSERT INTO Specialism VALUES ('Welding');
INSERT INTO Specialism VALUES ('Metal Fabrication');
INSERT INTO Specialism VALUES ('Fabric restoration');
INSERT INTO Specialism VALUES ('Woodworking');
INSERT INTO Expert VALUES('Bob','Sunflower Valley','Fixing it since
1999.','bob@theyard','Y','2022-02-01');
INSERT INTO Expert VALUES('Wendy','Fixham Harbour',NULL,
16. 'wendy@harbourview','Y','2022-01-04');
INSERT INTO Expert VALUES('Pilchard','Sunflower Valley','All era, all fabrics, no job too
small.','PT6@sunflowermail','N','2022-02-13');
INSERT INTO Expert VALUES('Leo','Campus Lane','Trains a speciality, also clocks and clockwork
toys.','LeoR12@TheCampus','Y','2022-01-19');
INSERT INTO Expert VALUES('Spud','Pickles Field','All things
steam.','strawman@valley','Y','2022-05-17');
INSERT INTO Expert VALUES('Anish','Ancient Hollow','Restoration paintwork, toys and small
engines a speciality.','digdig@oldground','N','2022-05-11');
INSERT INTO Expert VALUES('Benjamin','The Post Office','Fabrication and welding - no job too
big.','postie1@sortingyard','Y','2022-04-10');
INSERT INTO Expert VALUES('JJ','Spring City','Small scale traction and stationary engines, repair
and refurbishment, call for a quote.','rocket23@SpringCityRockets','Y','2022-05-13');
INSERT INTO Expert VALUES('Angelo','Bobsville Pizzeria','Lighting them up since
1999.','Angelo@bakersfield','N','2022-03-02');
INSERT INTO Expert VALUES('Saffron','Pickles Sunflower Factory','Farm machinery
repairs.','Saff@Pickles','Y','2022-03-10');
INSERT INTO HasExpertiseIn VALUES ('Bob','Welding',23.00,'City&Guilds, Level 3
welding,2021');
INSERT INTO HasExpertiseIn VALUES ('Wendy','Fabric restoration',10.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Pilchard','Fabric restoration',14.00,'Advanced UFT,
2019');
INSERT INTO HasExpertiseIn VALUES ('Pilchard','Taxidermy',25.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Leo','Model Trains - all scales',35.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Leo','Clocks',18.00,'BHI Technician Grade, 2019');
INSERT INTO HasExpertiseIn VALUES ('Leo', 'Clockwork Toys',15.00,NULL);
17. INSERT INTO HasExpertiseIn VALUES ('Spud', 'Model Steamboats',15.50,NULL);
INSERT INTO HasExpertiseIn VALUES ('Spud', 'Stationary Engines, pre-1940',23.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Spud','Metal Fabrication',20.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Spud', 'Tractors',18.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Anish', 'Painting - small scale',16.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Anish', 'Painting - large scale',23.00,'Vehicle body and
paint - level 2 apprenticeship');
INSERT INTO HasExpertiseIn VALUES ('Anish', 'Clockwork Toys',17.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Benjamin','Metal Fabrication',19.00,'Fundamentals of
Metal Fabrication Certificate, 2010');
INSERT INTO HasExpertiseIn VALUES ('Benjamin', 'Welding',22.00,'3G MIG Welding, 2020');
INSERT INTO HasExpertiseIn VALUES ('Benjamin', 'Woodworking',18.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('JJ','Stationary Engines, pre-1940',26.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('JJ','Metal Fabrication',18.00, 'Advanced of Metal
Fabrication Certificate, 2011');
INSERT INTO HasExpertiseIn VALUES ('Angelo','Lighting',19.00,'LIA Certificate - Advanced');
INSERT INTO HasExpertiseIn VALUES ('Angelo','Electrical Items',19.00,'Part P 2393-10');
INSERT INTO HasExpertiseIn VALUES ('Saffron','Tractors',22.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Saffron', 'Metal Fabrication',17.00,NULL);
INSERT INTO HasExpertiseIn VALUES ('Saffron','Welding',21.90,'MIG/MAG, TIG and MMA,
ASME IX, TWI, 2020');
INSERT INTO HasExpertiseIn VALUES ('Saffron','Stationary Engines, pre-1940',26.00,NULL);
18. INSERT INTO RestorationItem VALUES(291,'Ratchet Seed spreader','Straighten ratchet, replace
handle',80.00,15.00,'2022-05-01','2022-05-20',55.00);
INSERT INTO RestorationItem VALUES(101,'Dentist drill, 1940','Improve look', 100.00,
60.00,'2022-05-01','2022-05-22',66.00);
INSERT INTO RestorationItem VALUES(524,'Sir Nigel Gresley, BR Blue, Hattons Original','Align
bogies',900.00,25.00,'2022-04-20','2022-04-30',25.00 );
INSERT INTO RestorationItem VALUES(118,'Chandelier, 200 drop, 6ft diameter, plain','repair and
replace missing elements',870.00,80.00,'2022-04-01',NULL,NULL );
INSERT INTO RestorationItem VALUES(293,'Lister D Type single cylinder petrol engine built Sept
1946','Ensure running and fit to wheeled trailer',400.00,690.00,'2022-05-02','2022-05-18',660.00 );
INSERT INTO RestorationItem VALUES(249,'1928 Ruston Hornby and bamford cornmill','Redress
flywheel, repaint',1500.00,400.00,'2022-03-25','2022-04-15',280.00 );
INSERT INTO RestorationItem VALUES(483,'BAMFORD OPEN CRANK, 1933','try to get
running',300.00, 600.00,'2022-02-02','2022-3-10',630.00);
INSERT INTO RestorationItem VALUES(884,'TIN PLATE WIND UP SPEEDBOAT SCHYLLING
COLLECTOR SERIES','lossen tight spring, make new key',NULL,60.00,'2022-02-17' ,'2022-03-
10',80.00);
INSERT INTO RestorationItem VALUES(937,'Schuco Clockwork Pecking Bird','re-
feather',NULL,30.50,'2022-04-28',NULL,NULL );
INSERT INTO RestorationItem VALUES(867,'Wind-Up Walking Turkey, Blomer & Scholer, US
Zone Germany, 50s.','repaint and reattach foot',100.00,60.00,'2022-03-15','2022-04-05',80.00 );
INSERT INTO RestorationItem VALUES(239,'Foster 4" scale Traction Engine','Make boiler good
for steam',20000.00,1550.00,'2022-04-21',NULL,NULL );
INSERT INTO RestorationItem VALUES(845,'Steam Chair-o-plane, 1910 by Walkers of
Tewkesbury','refit chairs, re-upholster in vintage fabrics',400000.00,5000.00,'2022-01-05','2022-
02-15',2050.00);
INSERT INTO RestorationItem VALUES(224,'Lotus Elan Fuel Gauge, BF2201','re-chrome',NULL,
60.00,'2022-02-27','2022-03-15',100.00 );
INSERT INTO RestorationItem VALUES(163,'Asco Counter Scales, sweet shop','re-balance',
19. NULL, 25.00,'2022-03-20','2022-04-04',30.00 );
INSERT INTO RestorationItem VALUES(246,'Victorian Brass Postal Scales with Mahogany
Base','replace missing crossrod',100.00,30.00,'2022-03-23','2022-04-14',80.00 );
INSERT INTO RestorationItem VALUES(934,'Ransomes Mg2 Crawler Tractor','retread and clear
oil residue',500.00, 1500.00,'2022-01-02','2022-01-31',1800.00 );
INSERT INTO RestorationItem VALUES(468,'Oxford Allen Scythe, Villiers 4 stroke engine grass
mower cutter brush finger bar','Address finger bar alignment',100.00,30.00,'2022-03-19','2022-03-
29',30.00 );
INSERT INTO RestorationItem VALUES(835,'Plough and ridger','replace plough blade, repaint in
original colours',400.00,350.00,'2022-03-24','2022-04-25',350.00);
INSERT INTO RestorationItem VALUES(348,'Corn mill grinder, 16inch spindle','re-box corn
holder',250.00,100.00,'2022-01-20','2022-02-15',200.00 );
INSERT INTO RestorationItem VALUES(783,'Vintage Antique poss Victorian Rotary Knife Cleaner
Sharpener - premier', 'trim sharpening wheel, re-varnish',200.00,100.00,'2022-03-15',NULL,NULL
);
INSERT INTO RestorationItem VALUES(359,'63inch Gents Railway Station Factory Clock','fit new
hands',5000.00,250.00,'2022-03-12','2022-03-30',110.00 );
INSERT INTO TaskTicket VALUES(100, 'Straighten ratchet','Metal Fabrication','2022-05-02',
'2022-05-06',0.00,28.00,291,'JJ');
INSERT INTO TaskTicket VALUES(101, 'Replace handle','Woodworking','2022-05-02', '2022-05-
09',5.00,22.00,291,'Benjamin');
INSERT INTO TaskTicket VALUES(102, 'Check and refurbish electricals','Electrical
Items','2022-05-02', '2022-05-04',12.00,16.00,101,'Angelo');
INSERT INTO TaskTicket VALUES(103, 'Restore paintwork','Painting - small scale','2022-05-06',
'2022-05-09',18.00,20.00,101,'Anish');
INSERT INTO TaskTicket VALUES(104, 'Align bogies','Model Trains - all
20. scales','2022-04-21','2022-04-29',0.00,20.00,524,'Leo');
INSERT INTO TaskTicket VALUES(105, 'Repair and replace missing
elements','Lighting','2022-04-03',NULL,NULL,NULL,118,'Angelo');
INSERT INTO TaskTicket VALUES(106, 'Ensure running','Stationary Engines, pre-
1940','2022-05-02', '2022-05-06' ,80.00,140.00,293,'Saffron');
INSERT INTO TaskTicket VALUES(107, 'Construct chassis','Metal
Fabrication','2022-05-02','2022-05-05',110.00,200.00,293,'Spud');
INSERT INTO TaskTicket VALUES(108, 'Construct trolley on
chassis','Woodworking','2022-05-10','2022-05-18',50.00,83.00,293,'Benjamin');
INSERT INTO TaskTicket VALUES(109, 'Redress fly-wheel','Stationary Engines, pre-
1940','2022-03-26','2022-03-29',10.00,23.00,249,'Saffron');
INSERT INTO TaskTicket VALUES(110, 'Repaint','Painting - large scale','2022-03-30','2022-04-
05',105.00,88.00,249,'Anish');
INSERT INTO TaskTicket VALUES(111, 'Overhaul to working state','Stationary Engines, pre-
1940','2022-02-04','2022-02-27',377.00,238.00,483,'Spud');
INSERT INTO TaskTicket VALUES(112, 'Loosen tight spring','Clockwork Toys','2022-02-18','2022-
02-21', 0.00, 40.00,884,'Leo');
INSERT INTO TaskTicket VALUES(113, 'Make new key','Clockwork Toys','2022-02-18','2022-02-
28',5.00,30.00,884,'Leo');
INSERT INTO TaskTicket VALUES(114, 'Re-feather','Taxidermy','2022-04-28',NULL,
NULL,NULL,937,'Pilchard');
INSERT INTO TaskTicket VALUES(115, 'Re-attach foot','Clockwork Toys','2022-03-20','2022-03-
22', 5.00, 20.00,867,'Anish');
INSERT INTO TaskTicket VALUES(116, 'Repaint','Painting - small scale','2022-03-23','2022-03-
21. 29',25.00,25.00,867,'Anish');
INSERT INTO TaskTicket VALUES(117, 'Construct replacement for damaged boiler plates','Metal
Fabrication','2022-04-22',NULL,NULL,NULL,239,'Benjamin');
INSERT INTO TaskTicket VALUES(118, 'Weld new boiler
plates','Welding','2022-04-28',NULL,NULL,NULL,239,'Benjamin');
INSERT INTO TaskTicket VALUES(119, 'Paint boiler','Painting - large
scale','2022-04-30',NULL,NULL,NULL,239,'Anish');
INSERT INTO TaskTicket VALUES(120, 'Replace missing
chairs','Woodworking','2022-01-05','2022-01-13', 250.00,240.00 ,845,'Benjamin');
INSERT INTO TaskTicket VALUES(121, 'Re-upholster all chairs in vintage fabrics','Fabric
restoration','2022-01-15','2022-01-30', 400.00,340.00,845,'Wendy');
INSERT INTO TaskTicket VALUES(122, 'Attach chairs replacing chains as required','Metal
Fabrication','2022-01-31','2022-02-10', 180.00,100.00,845,'Spud');
INSERT INTO TaskTicket VALUES(123, 'Rechrome','Painting - small scale','2022-02-28','2022-03-
12', 40.00,40.00,224,'Anish');
INSERT INTO TaskTicket VALUES(124, 'Rebalance scale','Clockwork Toys','2022-03-22','2022-
03-29', 3.00, 20.00,163,'Anish');
INSERT INTO TaskTicket VALUES(125, 'Replace missing cross-rod','Metal
Fabrication','2022-03-26','2022-03-30', 30.00, 35.00,246,'Spud');
INSERT INTO TaskTicket VALUES(126, 'Retread','Tractors','2022-01-03','2022-01-
18',340.00,120.00 ,934,'Saffron');
INSERT INTO TaskTicket VALUES(127, 'Refurbish engine','Tractors','2022-01-08','2022-01-
26',430.00, 550.00,934,'Saffron');
INSERT INTO TaskTicket VALUES(128, 'Align finger bars','Metal Fabrication','2022-03-19','2022-
22. 03-21', 0.00, 23.00,468,'JJ');
INSERT INTO TaskTicket VALUES(129, 'Replace plough blade','Metal
Fabrication','2022-03-25','2022-03-28',70.00, 35.00,835,'Saffron');
INSERT INTO TaskTicket VALUES(130, 'Repaint with matching original colours','Painting - large
scale','2022-03-29','2022-04-15', 105.00, 95.00,835,'Anish');
INSERT INTO TaskTicket VALUES(131, 'Replace corn holder using
Oak','Woodworking','2022-01-20','2022-01-29', 80.00, 100.00,348,'Benjamin');
INSERT INTO TaskTicket VALUES(132, 'Trim sharpening wheel','Metal
Fabrication','2022-03-16',NULL, NULL,NULL,783,'Spud');
INSERT INTO TaskTicket VALUES(133, 'Re-varnish','Painting - small scale','2022-03-25',NULL,
NULL,NULL,783,'Anish' );
INSERT INTO TaskTicket VALUES(134, 'Fit new hands','Metal Fabrication','2022-03-16','2022-03-
22',30.00, 40.00,359,'JJ' );
/* Data input ends */
Resto schema description Resto is a database package that holds the data records for Walton
Restorations. For this scenario we are interested in the data that the resto database handles about
items for restoration, the tasks needed to complete the restoration, the experts who perform the
restoration, and the specialisms needed to complete the tasks. In particular, we are interested in
which restoration item requires which tasks, which task is worked on by which experts, which
tasks need what specialisms and which expert has expertise in which specialism. Each restoration
item must require one or more tasks. Each task must be required by at most one restoration item.
Each task may be worked on by at most one expert (this allows a task to be created where an
expert has not yet been allocated to work on it). Each expert may work on one or more tasks.
Each task must need at most one specialism. Each specialism may be needed on one or more
tasks. Each expert must have expertise in one or more specialisms. Each specialism may be the
expertise of one or more experts. The information held about restoration items is a unique item
code, a description of the item and a description of the work required, along with the insurance
value of the item, an estimate for the cost of the work, and the date the item was accepted by
Walton Restorations. When work is completed and the item returned there will also be a value for
the price charged for the work, and the date It was returned to the client. Walton Restorations do
23. not accept items with an insurance value of greater than one million pounds.Experts have a name,
address and email held. (Names are assumed to be unique). Walton Resto also holds some
publicity text, if the expert wants to supply some. Walton resto has a record of permission (or not)
being given to include the expert's details in the online catalogue, and the date when the
permission was given. A list of specialisms is held. And each expert is associated with any of
these that they have expertise in. For each specialism held, the expert has a particular charge rate
and may hold qualifications related to that expertise. A task (also known as a task ticket) is
identified in the resto database using a unique task number issued when it is created. Task
information includes a description of the task, and the day the task was created. When a task is
complete, the task-ticket is updated by adding the cost of the parts used, the cost of the expert
labour used, and the date it was completed. If a task is incomplete then these will be NULL. The
domain and datatype descriptions of the attributes in resto are shown in Figure 8. Note this is a
simplified scenario as we aren't including details of the Clients, Manager or Parts Used related to
restoration process. (Note this description is also given in the resto_schema document).Resto
Entity Relationship diagramFigure 7 An entity relationship diagram showing Restorationltem,
TaskTicket, Expert and Specialism entity types and the relationship types Requires, WorkedOnBy,
HasExpertiseln and Needs. (Note this figure is also given in the resto_schema document).Figure 8
A schema and description of the tables defined in the resto.txt file (note this is also given in the
resto_schema document).. Figure 8 This shows a physical schema model consisting of five
relations: Restorationltem, TaskTicket, Expert, Specialism and HasExpertiseln. There is an
unlabelled line between Restorationitem and TaskTicket, TaskTicket and Expert, TaskTicket and
Specialism and Specialism and HasExpertiseln and Expert and HasExpertiseln. There is also a
'note' box labelled Domain definitions.The note box labelled 'Domain definitions' contains domain
descriptions for eleven domains: ItemCodes: INTEGER CHECK (VALUE>0), DescriptionString:
VARCHAR(120), TaskNumbers: INTEGER CHECK (VALUE)>0), NameString: VARCHAR(120),
AddressString: VARCHAR(400), Publicitystring: VARCHAR(120), EmailString: VARCHAR(100)
CHECK (VALUE LIKE %@%'), YN: CHECK (VALUE IN ('Y','N;')), SpecialismString: VARCHAR
(300), QualificationString: VARCHAR(300) and MonetaryValues: NUMERIC (9,2) CHECK
(VALUE>=0.00) The Restorationltem has eight attributes and three constraints. The attributes are
ItemCode: ItemCodes , ItemDescription: Descriptionstring , WorkDescription: DescriptionString ,
InsuranceValue: MonetaryValues, CostEstimate: Montearyvalue , DateAccepted: DATE ,
DateReturned: DATE and PriceCharged: MonetaryValues. The three constraints state: Requires
mandatory: all values of ItemCode must appear in the TaskTicket relation foreign key attribute
(ItemCode) representing Requires. 1: DateAccepted must be today or earlier, 2: DateAccepted
must be before Date Returned and 3 : InsuranceValue must be below 1 Million. The TaskTicket
has nine attributes, three foreign keys and two constraints. The attributes are TaskNumber:
TaskNumbers , Description: DescriptionString , SpecialismNeeded: SpecialismString,
DateCreated: DATE , DateCompleted: DATE, CostOfParts: MonetaryValues, CostOfLabour:
MonetaryValues, ItemCode: ItemCodes and Name: NameString. The foreign keys are:
Name(Requires) ItemCode References Restorationltem , Name(WorkedOnBy) Name References
Expert and Name(Needs) SpecialismNeeded References SpecialismName(Needs)
SpecialismNeeded References Specialism < not null>. The two constraints are: 1 : DateCreated
24. must be today or earlier and 2: DateCreated must be before DateCompleted. The Expert has six
attributes and two constraints. The attributes are Name: NameString , Address: AddressString ,
PublicityText; PublicityString, Email: EmailString , UselnExternal Catalogue: YN and
DateApprovedUse: DATE . The constraints are HasExpertiseln mandatory: all values of name
must appear in the HasExpertiseln relation foreign key attribute (ExpertName). and 1: Date
ApprovedUse must be today or earlier. The Specialism has one attribute. The attribute is Name:
SpecialismString . The HasExpertiseln has four attributes, two foreign keys and one note. The
attributes are: Expertname: NameString < primary key>, SpecialismName: SpecialismString ,
ChargeRate: MonetaryValues and QualificationsHeld: QualificationsString. The foreign keys are:
Name(HasExpertiseln) ExpertName References Expert and Name(HasExpertiseln)
SpecialismName References Specialism. The Note is: 1 . ChargeRate is per hour. a. Write SQL
statements that answer each of the requests for data in the resto.txt tables: i. Produce a list of the
expert names, rename the output column as experts. (3 marks)ii. Produce a list of the item codes
and date accepted, for any restoration item that has not yet been returned. (4 marks) iii. How
many task tickets have been created where the specialism needed is 'Tractors'? (3 marks) iv. How
many restoration items have been returned? (3 marks) v. List the item code and date accepted for
all restoration items that have been accepted between 2022-03-31 and 2022-05-01, but not yet
returned (3 marks) vi. List the task number, specialism needed and item code for all task tickets
where the description includes mention of 'replace'. (3 marks) vii. For each expert and their
specialisms, list the expert's name, email, the specialism and their charge-rate for that specialism.
Sort the output by specialism and then by charge-rate (descending order in each case). (3
marks)ii. Produce a list of the item codes and date accepted, for any restoration item that has not
yet been returned. (4 marks) iii. How many task tickets have been created where the specialism
needed is 'Tractors'? (3 marks) iv. How many restoration items have been returned? (3 marks) v.
List the item code and date accepted for all restoration items that have been accepted between
2022-03-31 and 2022-05-01, but not yet returned (3 marks) vi. List the task number, specialism
needed and item code for all task tickets where the description includes mention of 'replace'. (3
marks) vii. For each expert and their specialisms, list the expert's name, email, the specialism and
their charge-rate for that specialism. Sort the output by specialism and then by charge-rate
(descending order in each case). (3 marks)viii. For each expert and their specialisms, if they have
given permission for their details to appear in the catalogue, list the expert's name, email, the
specialism and their charge-rate for that specialism. Sort the output by specialism and then by
charge-rate (descending order in each case). (2 marks) ix. For each restoration item that has an
insurance value of over 300.00, and has a task ticket that was worked on by an expert called
'Benjamin', give the item code, item description, and insurance value. The list should be in order of
item code. (4 marks) x. List any expert that has not worked on any tasks. (3 marks) xi. For each
task ticket that has been completed, list the task number, item code and the combined cost of
parts and labour, for that task, under the heading costs. Show the list in order of the item code
values. (4 marks) xii. For each restoration item, list the item code and the number of task tickets
created for that item. (4 marks)xiii. For each restoration item that has been returned, list the item
code and the sum of the total cost of parts and labour for all task tickets related to that item code.
Give the sum of costs column the heading total_cost and display the result in ascending order of
25. this column. (5 marks) (44 marks) b. What request does the following SQL answer? (Note that a
request should be an English language question or description like the ones in part a), not an
account of how the data is processed to produce the result.) SELECT Name, COUNT
(SpecialismName) FROM Expert JOIN HasExpertiseIn ON Name = ExpertN: WHERE
UseInExternalCatalogue = ' Y ' GROUP BY Name HAVING COUNT (SpecialismName) > 2; (5
marks) c. Describe, using the logical processing model, the evaluation of the following query:
SELECT Name, COUNT(*) FROM TaskTicket WHERE DateCompleted IS NULL GROUP BY
Name HAVING COUNT ()>1;d. Consider the information: The work described by task ticket 117
has been completed by Benjamin on 2022-04-26. Benjamin's labour was 88.00 and they used
110.00 in parts. Add this information to the task ticket table using an SQL UPDATE statement,
then write a query to show that your update was successful. NOTE: after you successfully run this
UPDATE it will change some of the results you achieve with the queries you wrote in part a). If you
have not yet produced the output data for your TMA submission document, you will need to re-run
resto.txt in order to reset the content of the database. ( 3 marks) e. Describe the effect of the LEFT
OUTER JOIN in SQL when used to join the Specialism and HasExpertiseIn tables on the Name =
SpecialismName attribute comparison. SELECT Name, ExpertName FROM Specialism LEFT
OUTER JOIN HasExpertiseIn ON Name = SpecialismName ORDER BY Name; What request
would that LEFT OUTER JOIN satisfy? (5 marks)f. Walton Restorations wants to produce the data
for their online catalogue. You are to create an SQL VIEW with the name 'Catalogue'. The view
should produce rows showing each expert's name, email address, specialism, charge-rate and
qualifications they hold. The view should have columns named Name, ContactEmail, Specialism,
HourlyRate and RelevantQualification. Only data where the expert has given permission to be
included in the catalogue should appear in the data defined by the VIEW. Write a query showing
the data your VIEW defines. Your solution document should contain the CREATE VIEW
statement, the query and the output of the query. (5 marks) HAVE YOU INCLUDED YOUR SQL
AND OUTPUT IN YOUR SOLUTION DOCUMENT? For this question, in your solution document
you MUST include your SQL statements and a copy of the output produced by the evaluation of
each of your statements. If you were unable to produce a working query then a copy of any error
messages should be included in your solution. A text copy-and-paste of the SQL statements and
output should be used. Please do not use screenshots for your SQL statement and output, as they
are difficult to annotate for feedback and marking. If you do not include both SQL statement and
output (or error messages) then your tutor will not mark your answer for that part of the question.