Site icon Tutor Bin

GSU Computer Science Database Design Programming Questions

GSU Computer Science Database Design Programming Questions

Description

Create a trigger named Instructors_INSERT that inserts the current date for the HireDate column of the Instructors table if the value for that column is null.

Test this trigger with an appropriate INSERT statement.

Here is a table information:

INSTRUCTORS (InstructorID, LastName, FirstName, Status, DepartmentChairman, HireDate, AnnualSalary, DepartmentID)

Primary Key: InstructorID

For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).

QUESTION 28

  1. Create a scalar-valued function named fnCheapProduct that accepts one parameter, @CategoryName and returns the ProductName of the highest UnitPrice under the Category, @CategoryName. Here are PRODCUCT and CATEGORIES tables. Fields are listed next to table name. Primary keys are underlined.CATEGORIES (CategoryID, CategoryName, Description)PRODUCTS (ProductID, ProductName, UnitPrice, CategoryID, UnitsInStock)
    For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).

    Create a stored procedure named spGetOrderInfo that accepts one parameter, @CustomerID. The procedure return a result set consisting of OrderDate, ShippedDate, CustomerName and Phone.

    Here are CUSTOMERS and ORDERS tables’ structures. Fields are listed next to table name. Primary keys are underlined. CUSTOMERs (CustomerID, CustomerName, Phone, Address)CustomerID varchar(5)Customername varchar(50)Phone varchar(25)Address varchar(60) ORODERS (OrderID, CustomerID, OrderDate, ShippedDate)OrderID intCustomerID varchar(5)Orderdate datetimeShipppedDate dateime
    For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Exit mobile version