Part 1 true or false please explain why 1 sql structured

Assignment Help Database Management System
Reference no: EM13371269

Part 1: True or False, please explain why.

1, SQL (Structured Query Language) is both DDL (Data Definition Language) and DML (Data Manipulation Language).

2, View is not updatable.

3, For Character data type, value NULL is equivalent to empty string ''.

4, A table has only one primary key, but it can have more than one foreign keys.

5, In SQL, an asterisk (*) can be used to express "all columns".

6, If a schema satisfies BCNF, then it also satisfies 3NF.

7, A secondary index can be either dense or sparse.

8, Given a hash function h and two search-key values, Ki and kj, if ki≠kj, then h(ki)≠h(kj).

9, ΠLname, Fname, Salary(σsalary>30000(Employee)) is equivalent to σsalary>30000(ΠLname, Fname, Salary(Employee)).

10, since Natural-join operations are associative, (E1 E2) E3 = E1 (E2 E3), the ordering of natural-join is not important for query optimization.

 Part 2: Case study

The following tables form part of a database held in a relational DBMS:

 Employee(Fname, Minit, Lname, Ssn, Bdate, Address, Sex, Salary, Super_ssn, Dno)

Department(Dname, Dnumber, Mgr_ssn, Mgr_start_date)

Project(Pname, Pnumber, Plocation, Dnum)

Works_on(Essn, Pno, Hours)

The underlined attribute(s) in each relational schema is primary key.

Employee contains employee details, Super_ssn is the SSN of supervisor, which is a foreign key that refers to Ssn in table Employee, and Dno is the department number, which is another foreign key that refers to Dnumber in table Department.

Department contains department details and Mgr_ssn is SSN of the department manager, which is a foreign key that refers to Ssn in table Employee.

Project contains project details, and Dnum is a foreign key which refers to Dnumber in table Department.

Works_on records who work on which project, Essn is a foreign key that refers to Ssn in table

Employee, and Pno is another foreign key that refers to Pnumber in table Project.

 Based on the schema defined above, write SQL statements to answer the following queries:

1, Retrieve the birth date and address of the employee(s) whose name is 'John B. Smith'.

2, Retrieve the name and address of all employees who work for the 'Research' department.

3, For each employee, retrieve the employee's first name and last name and the first name and last name of his or her immediate supervisor.

4, Find the sum of the salaries of all employees, the maximum salary, the minimum salary, and the average salary.

5, For each project, retrieve the project number, the project name, and the number of employees who work on that project.

Describe what the following SQL statements return and give the equivalent relational algebra expressions.

6, Select Fname, Lname, Sex, Address

From Employee;

7, Select Fname, Lname

From Employee

Where Sex='M';

Describe what the following relational algebra expressions return and give the equivalent SQL statements

8, ΠLname, Fname, Salarysalary>30000(Employee))

9, ΠDname, Lname, Fname(Department Mgr_ssn = SsnEmployee)

Part 3: Questions

1, Use Armstrong's axioms to prove the soundness of the union rule. Union rule: If a → b holds and a → c holds, then a → b c holds.

2, For B+ Tree below, show the steps involved in the following queries:

 a. Find records with a search-key value which is great than 18.

 b. Find records with a search-key value which is between 5 and 19, inclusively.

Reference no: EM13371269

Questions Cloud

Question 1 consider the images distributed or collected as : question 1 consider the images distributed or collected as a part of your project. develop the equivalent of a low pass
1 during the 1880s japans senior leaders took several : 1. during the 1880s japans senior leaders took several steps to protect their power and privilege prior to the
Problem 1 estimating the marginal return to schooling : problem 1 estimating the marginal return to schooling suppose carls wage-schooling locus is given by the following
Jet copies james banks was standing in line next to robin : jet copies james banks was standing in line next to robin cole at kleckos copy center waiting to use one of the copy
Part 1 true or false please explain why 1 sql structured : part 1 true or false please explain why. 1 sql structured query language is both ddl data definition language and dml
Q in this question we use the vectors of r5u 1 0 1 1 1 v : q1. in this question we use the vectors of r5.u 1 0 1 1 1 v 3 2 1 1 1 and w 0 1 1 1 2.a calculate u vb calculate
Student counseling expert systemthis is a web-based expert : student counseling expert systemthis is a web-based expert system rule-based. wamp should be the platform of execution.
Q1in the second order differential equation we described : q1in the second order differential equation we described the motion of the pendulum. unfortunately the differential
Identify as well as define each of the four essential : identify as well as define each of the four essential elements of a contract. utilizing the facts of the case to

Reviews

Write a Review

Database Management System Questions & Answers

  Study and modify the postgresql source code

Write a Assignment to study and modify the PostgreSQL source code, with a focus on one of the core modules - the buffer manager

  1 start with checksalary trigger explain below on triggers

1 start with checksalary trigger explain below on triggers. show that that trigger creates muttating table error. in

  Display the averaged measurements every time

The application uses hash tables - for a brief introduction, refer tothese slides . While the approach used by the simulator is very basic (using a dilated simulation clock), it is has been deemed sufficient for the purpose at hand.

  Spreadsheet and database

Explain the differences between the storing data in Access and Excel. Why you would use a spreadsheet over the database?

  Explain a structured data type that can hold multiple values

The array was the first example of a structured data type that can hold multiple values. The structure is the second example

  Construct a use-case diagram

Construct (i) a use-case diagram (ii) a class diagram (iii) System Sequence Diagram (iv) detailed Sequence Diagram or diagrams as appropriate and (v) a state chart for a car object/class according this scenario. Include appropriate properties for ..

  List whether the index matches the given selection condition

Athabasca University has about 32,000 students between the ages of 17 to 60. Consider the AU student relation with the following schema.

  How to make an xml file with markup tags

Create an XML file with markup tags and some sample data to represent a list of invoices. Include the XML tags for two invoices in the list. Also, assume the invoices are created from a database whose tables are shown in the following database re..

  A county wishes to create a database

A county wishes to create a database to control its local libraries. Each library has a number of employees, one of whom is designated as the manager of the library and is responsible for supervising employees and the general day-to-day management..

  Problem on relational algebra

The database used for this question is a very simple one with the following schema: (Primary keys are bold, foreign keys are underlined)

  List and explain the defined business rules

The Relational Data Model (RDM) which corresponds to the ERD in the format shown below. The RDMMUSTidentify all primary keys, alternate keys and foreign key constraints. Raw SQL Create Table script dumps from a modeling tool, or SQL Server WILL NO..

  Write a monitor using to implement readers-writers problem

Suppose that we replace the wait and signal operations of monitors with a single construct await(B), where B is a general Boolean expression. Write a monitor using this scheme to implement the readers--writers problem.

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