Sql Assignment 1

67 %
33 %
Information about Sql Assignment 1

Published on March 15, 2016

Author: AnjuRenjith

Source: slideshare.net

1. 1. Create a database ‘EmployeeDB’withthe followingtables You have to choose the data typesof the fields. Table name - Allowance ( intID- auto incrementing PrimaryKey, AllowanceID, Allowance Name ) Table name - Designation ( intID- auto incrementing PrimaryKey DesignationID, Designation Name ) Table name - Employee ( EmployeeID- autoincrementingPrimary Key, FirstName , MiddleName, LastName, DateofBirth, DesignationID- FKtoDesignationtable, MobileTelephone Address, City, State, Country, Gender(hint:bitfield(true-male,false-female)) ) Table name - EmployeeAllowance ( intID- auto incrementing PrimaryKey EmployeeID–FKto Employee table, AllowanceID- FKtoAllowance table, Amount ) Table name - DesignationAllowanceMapping ( intID- auto incrementing PrimaryKey DesignationID–FKto Designationtable, AllowanceID- FKtoAllowance table )

2. 2. Write separate SQL Functionsforthe following a. employeeidasa parameterand outputsthe total salaryof that employee b. employeeidasa parameterandoutputsthe age of that employee c. employee idasaparameterand outputs employee id,name,designation,age,address,city,state, country, mobile telephone 3. Write a SQL Viewtogetemployee id,name,designation, age, address,city,state,country, mobile telephone,genderandtotal salary.Use the SQL functionswhich compute age and total salary in the view 4. Write a SQL StoredProcedure to get outputinthe followingformat. The storedprocedure shoulduse the viewfor employee details. 5. Write a stored procedure to getoutputin the followingformat. This stored procedure shouldnot use the viewand functions No needtoconsiderthe above valuesinthe output. Justthe above formatisrequired Please sendthe answersbytomorrow12pm.We shall have the call by4pm. You can sendthe answersinscripts.

Add a comment

Related pages

Assignment Operator (Transact-SQL) - msdn.microsoft.com

The equal sign (=) is the only Transact-SQL assignment operator. In the following example, the @MyCounter variable is created, and then the assignment ...
Read more

Assignment description - Homework Tutoring

Programming Assignment. Assignment 3 - Oracle Database Creation Overview. ... create_structure.sql----- STEP 1 ----- Campus. CREATE TABLE Campus ...
Read more

SQL Assignment 1 - Ayana Pendergrass Data Analytics ...

View Notes - SQL Assignment 1 from BUSINESS 1101 at Temple. Ayana Pendergrass Data Analytics Professor Chen 21 February 2013 1. What is the rental rate
Read more

PL/SQL Language Elements - Oracle

Assignment Statement. ... PL/SQL allows aggregate assignment between entire records if their declarations refer ... Example 13-1 Declaring and Assigning ...
Read more

SQL Assignment - Computer Science homework help

1. Write a SELECT statement that returns these columns from the Products table: The ListPrice column. The DiscountPercent column A column named ...
Read more

SQL Assignment - Computer Science homework help

body preview (2 words) SQL Assignment. file1.doc preview (93 words) xx Write x xxxxxx statement xxxx xxxxxxx xxxxx xxxxxxx from the xxxxxxxx xxxxxx The ...
Read more

Assignment 1 SQL - Brown CS

The /course/cs1951a/pub/assignments/sql/stencil/stencil.zip zip file contains all the data and stencil code you will need. First, you'll want to copy this ...
Read more

SQL Assignment - scribd.com

STRUCTURE QUERY LANGUAGE. 1. Write the outputs of SQL commands given in (h) with the help of the table shown. EmpNo Name Job Mgr Hiredate Sal Deptno ...
Read more

Assignment 2(SQL) - scribd.com

DATABASE SYSTEMS Assignment-2. SQL Submitted To: Prof. Shoaib Farooq Submitted By: Farhan Saleem Reg. No : L1F07BSCS2007 University of Central Punjab
Read more

Problem Set 1: SQL - Massachusetts Institute of Technology

6.814/6.830 Problem Set 1 (Fall 2016). Build 2016/09/13:09:33:01 1 Problem Set 1: SQL Assigned: 9/12/2016 Due: 9/19/2016 11:59 PM Submit to the 6.830 ...
Read more