Question: Submit a single plain text file with filename as studentid _ studentname _ AL _ SQL containing all SQL implementation. Your SQL queries must work
Submit a single plain text file with filename as studentidstudentnameALSQL containing all SQL implementation. Your
SQL queries must work on MS SQL Server and be able to be demonstrated. SQL code required Use MS SQL Server:
Create a database and CREATE TABLE statements for all tables in your ERD Part A including primary and foreign
keys.
INSERT INTO statements for populating the database
i Insert five rows of madeup data into each table. Make sure that the data you enter in these tables should
be sufficient to return at least one row for each query in Task AL should hold at least bottles of Penfold
Grange in some branch or other.
Select Statements
i List the branches ID of MA that have in stock at least bottles of Penfold Grange
ii SELECT statement to generate a list of all email addresses of members whose card will expire in the month
after the coming month. Thus, for instance, if the query is run in November it will list the emails of all
members whose membership will expire in January The emails should be ordered by Branch ID then
by expiry date, and then by the email address, all in ascending order.
Research and Discussion
Submitted as a MS Word or PDF Document
Consider the following relation schema as the join of a few tables from Assignment ERD
AbnormalRel ProductID, BranchID, campaignID, MemberID,
ProductType, PackageType, YearProduced, Price, Brand,
StockLevel, CampaignStartDate, CampaignEndDate, FirstName, LastName, eMail, MembershipLevel,
MemberExpDate, Discount
Determine for UPDATE anomaly whether or not the relation AbnormalRel is susceptible to that anomaly. Support
your determination with adequate explanation and a small example.
Normalizedecompose the relation schema AbnormalRel until you get relations that are in NF Use appropriate
illustration to aid the understanding of your work
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
