Create a query to produce single output-er model, Database Management System

Assignment Help:

This assignment concerns the Research database. The database ER model is shown above, where attributes are omitted for clarity. The relational model for the database is:

Department(DeptNum, Descrip, Instname, DeptName, State, Postcode)

Academic(AcNum, DeptNum*, FamName, GiveName, Initials, Title)

Paper(PaNum, Title)

Author(PaNum*, AcNum*)

Field(FieldNum, ID, Title)

Interest(FieldNum*, AcNum*, Descrip)

DeptNum, AcNum, PaNum, and FieldNum are the identifiers of departments, academics, papers, and fields of interest respectively. Each Academic belongs to one Department and is the author of some (or no) Papers. Each Paper has at least one author. The table Fielddescribes areas of research work; each Academic works in some (or no) Fields, and may provide a description Descrip of their work.

The research database is used by the Department of Education, Science and Training of the Australian government on a regular basis to report on academic departments of education institutions. To this end, you are asked to write SQL queries, and present the report based on the output from your queries. Note that data inconsistency has been introduced during the data entry process, which you have to take care of in producing your report. It is known that the same state information may be represented in different ways. For example, Victoria may be kept as VIC, vic, or Vic. It is also known there are missing values for some attributes. For example, not all academic departments have their State information recorded in the database.

1. How many institutions contain the word "Technology" in their name. Your query must produce a single number as its output.

2. Make a list of academics that have more than five interests and have written or co-written less than ten papers. Use one IN construct and one EXISTS construct in your query. Output all details of the academics in the list.

3. Use a Set operator to create a list of academics who have written or co-written more than 5 papers and also have greater then 3 interests. List their academic number in the output.

4. Explain the following SQL query in English;

select givename, famname, instname

from academic natural join department

where acnum in

(select acnum

from author

where acnum not in

(select acnum

from interest

group by acnum))

and deptNum in (select deptNum

from academic

where deptname = 'Computer Science');

5. Find all the academics who have co-written a paper with academic number 151. Use only the Author table in a join query. You can use multiple instances of the table. The output should list the academic number of each co-author just once in the output. The output should not include academic number 151.

6. Write a query to find papers with more than five authors where the authors all come from different departments.


Related Discussions:- Create a query to produce single output-er model

Explain interfaces for parametric users, Explain Interfaces for parametric ...

Explain Interfaces for parametric Users? Interfaces for Parametric Users - Parametric users, such as bank tellers, frequent have a little set of operations in which they must p

Conversion of er diagram to relational database, Conversion of entity sets:...

Conversion of entity sets: I)   For  every  strong  entity  type  E  in  the  ER  diagram,  we  make  a  relation  R containing all the easy attributes of E. The relation R pri

Sources of utilities for a dbms, There are three main sources of utilities ...

There are three main sources of utilities and applications for a DBMS: a. Vendor applications and utilities are given for working with or maintaining the database, and generally

What is transaction, What is transaction? Transaction is a unit of prog...

What is transaction? Transaction is a unit of program implementation that accesses and possibly updated several data items.

Explain equivalent relational schema, Question: (a) Use the following b...

Question: (a) Use the following business rules to produce the E-R diagram. You should clearly show all the minimum and maximum cardinality constraint on each side of the relati

What is catalog in dbms, What is catalog in DBMS? Catalog - A relationa...

What is catalog in DBMS? Catalog - A relational DBMS maintains information about every table and index in which it contains. A catalog is a collection of special tables that st

Explain cnt in the respects of qbe, Explain CNT in the respects of QBE ? ...

Explain CNT in the respects of QBE ? CNT: It is one of the aggregation commands given in QBE. It is used to identify number of tuples

What is asterisk in sql, What is Asterisk in SQL? Asterisk (*): In SQL,...

What is Asterisk in SQL? Asterisk (*): In SQL, the columns for all the tables and views in the FROM clause will be displayed.

When are two schedules said to be view equivalent, When are two schedules s...

When are two schedules said to be view equivalent?     Ans: Two schedules that is denoted as S and S' are said to be view equivalent if the subsequent three conditions are met

Implementing a distributed database system, A distributed database is defin...

A distributed database is defined as "a collection of multiple logically interrelated database which are physically distributed over a computer network" (a) Give any three advan

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd