Find Jobs
Hire Freelancers

BASIC SQL QUESTIONS

$10-30 USD

Завершено
Опублікований over 7 years ago

$10-30 USD

Оплачується при отриманні
, 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: (2 points each) 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. (3 points each) 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. (2 points each) 8, ΠLname, Fname, Salary(σsalary>30000(Employee)) 9, ΠDname, Lname, Fname(Department Mgr_ssn=SsnEmployee) Part 3: Questions 1, (4 points) Use Armstrong’s axioms to prove the soundness of the union rule. Union rule: If ab holds and ac holds, then abc holds. 2, (6 points) 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.
ID проекту: 11241760

Про проект

6 пропозицій(-ї)
Дистанційний проект
Активність 8 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
Доручений:
Аватарка користувача
Hi,My self Baraiya. Love to develop web & desktop applications professionaly. About me: - Professional developer - Delivered before time - Prefer to maintain permanent professional relation - Master Degree in Computer Science - 4+ years of experience * Before award project, discus time and budget? Feel free to ask any query. Thanks for your time...! ***** Wish you a very Happy life *****
$50 USD за 1 день
4,8 (18 відгуки(-ів))
4,0
4,0
6 фрілансерів(-и) готові виконати цю роботу у середньому за $29 USD
Аватарка користувача
Hi there, i went through the requirements and I would like to do this project if given the opportunity. Let me know if you are interested so I can have further details. Thanks.
$30 USD за 1 день
5,0 (77 відгуки(-ів))
5,3
5,3
Аватарка користувача
Hi! I'm senior lecturer on database. As I saw your task - it is a student's work. I've experience in help with similar task. Please chat me for details
$25 USD за 1 день
5,0 (10 відгуки(-ів))
3,8
3,8
Аватарка користувача
Major in computer Science from IIT. Have done numerous database assignments and projects. Guaranteed quality work or will refund complete amount.
$25 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
I am an Database expert and associated with IBM corporation , hire me for quality work within your deadline
$25 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор UNITED STATES
boca raton, United States
5,0
10
Спосіб оплати верифіковано
На сайті з бер. 8, 2016

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.