Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please give correct answer QUESTIONS CITY(CITY_CODE SMALLINT, CITY_NAME NVARCHAR(30)) CUSTOMER(C_CODE NVARCHAR(20), C_NAME NVARCHAR(30), CLASTRUME WAOA). BIRTH_DATE DATE, PHONE NUMBER CHAR(11), GROUP CODE NVAROHARIZO), CITY CODE

image text in transcribed

please give correct answer

QUESTIONS CITY(CITY_CODE SMALLINT, CITY_NAME NVARCHAR(30)) CUSTOMER(C_CODE NVARCHAR(20), C_NAME NVARCHAR(30), CLASTRUME WAOA). BIRTH_DATE DATE, PHONE NUMBER CHAR(11), GROUP CODE NVAROHARIZO), CITY CODE SMALLIT) STOCK(STOCK_CODE NVARCHAR(20), STOCK_NAME NVARCHAR(50), PRIOE NUMERIC 10,7), STOCK_GROUP_CODE NVARCHAR(20)) CUSTOMER_ACCOUNT(ID BIGINT, C_CODE NVARCHAR(20), OPERATION DATE DATE STOCK_CODE NVARCHAR(20), QUANTITY NUMERIC (5), PRICE NUMERIC(10,2), DEBT NUMERIC (107) RECEIVABLE NUMERIC(10,2), COMMENT NVARCHAR(50)) According to the tables above (CUSTOMER database), answer the following questions by using MS SOL Server 1. "Database normalization is the process of organizing the columns (attributes) and tables (relations) of a relational database to reduce data redundancy and improve data integrity Discuss how normalization is achieved on CUSTOMER database above (10 points) 2. Write an SQL statement to list all customers who were born in February and who are from SVAS (C_CODE, C_NAME, C_LASTNAME will be listed) (10 points) 3. Write an SQL statement to list the stocks which have been sold so far at least 100 (STOCK_CODE, STOCK_NAME, SoldQuantity) (10 points) 4. Write a stored procedure to decrease the prices (PRICE) at the given percentage in CUSTOMER ACCOUNT table for customers with given GROUP CODE and CITY CODE (15 ports) 5. Write a stored function to find how much a given stock group (STOCK_GROUP CODE) was sold between two dates given in terms of money (15 points) 6. Write a t-sql code to create a trigger on any table above (You can create extra tables if you require) (10 points) 7 Write the SOL statements to create a view and an inder on any table above (10 points) 8. Write a stored procedure to send Happy Birthday" SMS message to customers who was born on ca date by using a CURSOR variable (Assume that you already have SMS_SEND(PHONE NUMBER MESSAGE) stored procedure) (ex: Happy Birthday, Peri Gunes) (20 points) 109 Hoffm

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

2nd Edition

1597499471, 978-1597499477

Students also viewed these Databases questions

Question

Develop successful mentoring programs. page 400

Answered: 1 week ago