Fundamentals of Database System
(PreLabQuiz)
(PreLabExam)
(MidLabQuiz)
(MidLabExam)
(FinLabActivity)
(FinLabQuiz)
Question text
Database Tables:
employee (EmpId, ename, bdate, title, salary, DeptId)
project (ProjId, pname, budget, DeptId)
department (DeptId, dname, mgreno)
workson (EmpId, ProjId, resp, hours)
Write an SQL query that returns the project number and name for projects with a budget less than 50,000.Question text
Database Tables:
employee (EmpId, ename, bdate, title, salary, DeptId)
project (ProjId, pname, budget, DeptId)
department (DeptId, dname, mgreno)
workson (EmpId, ProjId, resp, hours)
Write an SQL query that returns all works on records where hours worked is less than 10 and the responsibility is 'Manager'.
Question text
Database Tables:
employee (EmpId, ename, bdate, title, salary, DeptId)
project (ProjId, pname, budget, DeptId)
department (DeptId, dname, mgreno)
workson (EmpId, ProjId, resp, hours)
Write an SQL query that returns the departments (all fields) ordered by ascending department name.
Question text
Database Tables:
employee (EmpId, ename, bdate, title, salary, DeptId)
project (ProjId, pname, budget, DeptId)
department (DeptId, dname, mgreno)
workson (EmpId, ProjId, resp, hours)
Write an SQL query that returns the employee name, department name, and employee title.
Question text
Database Tables:
employee (EmpId, ename, bdate, title, salary, DeptId)
project (ProjId, pname, budget, DeptId)
department (DeptId, dname, mgreno)
workson (EmpId, ProjId, resp, hours)
Write an SQL query that returns all employee information.
Question text
Determine the normal form using the following sets of table.
Emp_Course(Emp_ID, Course_Title, Date_Completed)
Question text
What is normal form of the following sets of tables?
Student(Student_ID, Major)
Major Advisor( Major, Advisor)
Question text
Identify the foreign key for the department table below:
Employee1( Emp_ID, Name, Dept_Name, Salary)
Department (Dept_Name, Location, Fax)
Question text
Merge the following two relation:
Employee1(Employee_ID, Name, Address, Phone)
Employee2(Employee_ID, Name, Address, Phone, Jobcode, No_Years)
Question text
It is a functional dependency between two nonkey attributes
Question text
Question text
Employee is assigned to a parking place is an example of unary relationship.
Question text
Product line contains many product. What is the cardinality?
Question text
What is the cardinality of this relation? Students registers for many courses.
Question text
What is the cardinality using the following relation? A person is married to another person
Question text
Given the following data definition, select all city names in descending order:
TABLE cities
id INTEGER NOT NULL PRIMARY KEY
name VARCHAR(30) NOT NULL
Question text
salesman_id | name | city | commission
-------------+------------+----------+------------
5001 | James Hoog | New York | 0.15
5002 | Nail Knite | Paris | 0.13
5005 | Pit Alex | London | 0.11
5006 | Mc Lyon | Paris | 0.14
5007 | Paul Adam | Rome | 0.13
5003 | Lauson Hen | San Jose | 0.12
You need to create a table for a salesmen table, which statement creates the table above?
Question text
salesman_id | name | city | commission
-------------+------------+----------+------------
5001 | James Hoog | New York | 0.15
5002 | Nail Knite | Paris | 0.13
5005 | Pit Alex | London | 0.11
5006 | Mc Lyon | Paris | 0.14
5007 | Paul Adam | Rome | 0.13
5003 | Lauson Hen | San Jose | 0.12
Which SQL statement below displays all the information of all salesmen?
Question text
Which SQL statement will display the names and city of the salesman, who belongs to the city of Paris?
Question text
YEAR SUBJECT CATEGORY WINNER COUNTRY
---- ------------------------- --------------------------------------------- ------------------------- ------------
1970 Physics Scientist Hannes Alfven Sweden
1970 Physics Scientist Louis Neel France
1970 Chemistry Scientist Luis Federico Leloir France
1970 Physiology Scientist Ulf von Euler Sweden
1970 Physiology Scientist Bernard Katz Germany
1970 Literature Linguist Aleksandr Solzhenitsyn Russia
1970 Economics Economist Paul Samuelson USA
1970 Physiology Scientist Julius Axelrod USA
1971 Physics Scientist Dennis Gabor Hungary
1971 Chemistry Scientist Gerhard Herzberg Germany
1971 Peace Chancellor Willy Brandt Germany
1971 Literature Linguist Pablo Neruda Chile
1971 Economics Economist Simon Kuznets Russia
1978 Peace President Anwar al-Sadat Egypt
Using the nobel_win table above, give the name of the 'Physics Scientist' winner since 1970.
Which of the following SQL statement produced the desired result?
Question text
Using the nobel_win table above, you need to write all the details of the Chemistry winner(year,subjectcategory, winner, country) from the year 1970.
Which of the SQL statement would produce the required result?
Question text
Using the above nobel_win table, you need to generate a report that will show all the Physiology winners in the year 1970.
Question text
Using the salesmen table above, you need to generate a report that shows the name and commission from the table salesmen.
Which SQL statement would produce the required result?
Question text
You need to generate a report that will show all the salesmen's commissions with less than or equal to 15%.
Which SQL statement produced the desired result?
Question text
Which SQL statement displays the city of the salesmen that starts with the letter P?
Question text
Which SQL statement will display the name of the winner from Physiology Scientist?
Question text
It is the process of producing a set of tables with proper attributes
Question text
Based on the given table above, what is the primary key for the user table?
Question text
CompanyTable( companyid, company, company_address)
What is the primary key?
Question text
UserTable(userid, name)
Using the above table, what is the primary key of the table named UserTable?
Question text
In the given relationship, the doctor attends to the patient. What is the relationship between doctor and patients?
Question text
Entity CUSTOMER can be characterized by Id, Name, and Address. What is sub-attributes of the customer address?
Question text
An Engineer builds a house with few workers and raw materials participating in this building at the same time. What are the entities involved in this relation?
Question textGiven the following relationship, the patient was assigned to a room. What is the relationship between patient and room
Question text
An Engineer builds a house with few workers. Based on the given statement, what is the relationship between engineer and a few workers?