0% found this document useful (0 votes)
6 views1 page

SQL Server 2012 Database Tutorial

The document outlines a practical SQL exercise involving the creation of a database named 'MyBar' with specified tables and primary keys. It includes instructions for inserting five records into each table and performing various SQL queries related to drinkers and beers. Additionally, it highlights the need to address a multivalued field in the BEERS table and requires the relational tables to be presented on the answer sheet.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

SQL Server 2012 Database Tutorial

The document outlines a practical SQL exercise involving the creation of a database named 'MyBar' with specified tables and primary keys. It includes instructions for inserting five records into each table and performing various SQL queries related to drinkers and beers. Additionally, it highlights the need to address a multivalued field in the BEERS table and requires the relational tables to be presented on the answer sheet.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Advanced Database 5. Fill five records on each table. For all tables the primary key is given.

You can use appropriate name and values for the remaining fields.
Practical example on SQL server 2012 Primary key for the relations is given as follows. Each relation has five
records
Perform all the questions using transact SQL (SQL queries of DDL and DML) for
a. The primary key for bars is (from bar101, bar102 – bar105)
the following Er-diagram. Put all your answers on the answer sheet after
b. The primary key for BEERS is (Meta, Harer, Bedelie, Amber,
running them on SQL server
Habesha)
c. The primary key for DRINKERS is (from Drink301, drink302 –
drink305) at least two should be females

6. Write the following select queries


a. Name of female drinkers and their favorite beers
b. Unit Profit of each beer that each bar sold
c. Total profit of all beers sold

1. Create a database named “MyBar”


2. Create all the tables with their primary key, proper data types, and
their relationships

3. It was forgotten that the following multivalued field were supposed to


be on BEERS table

4. LOCATION Create the relational tables of the above diagram and paste
it on your answer sheet

You might also like