Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 9, Problem 11CRP
Program Plan Intro
Relational
- A database Management System is a software application for managing the database in a well-organized form.
- It provides a systematic way to create, retrieve and update the database.
- In DBMS, the schema explains the logical structure of the data base system.
- It provides the capability to the user to self-analyze the database and perform the necessary operations.
- A relational database comprises of rectangular tables known as relations.
- Every row in relation is known as tuple.
- Each column in table is termed as field or attribute.
- It describes the characteristics of entity represented by corresponding tuple.
Relational database design process:
- It is designed to meet requirements of particular application.
- There are no two databases that are alike.
- The design choice is based on user preference.
- The steps used in this process includes:
- Step 1 – Define the database purpose
- Step 2 – Gather data and organize in table
- Step 3 – Refine and normalize design, it includes adding columns, creating new relation and splitting large relation into smaller relations.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Please help with the folllowing:
Consider the following declaration of a relation schema
CREATE TABLE R
( A int PRIMARY KEY,
B int not null,
C char (1) );
Then execution of which of the following queries will fail?
QI: Insert INTO R (B, C) Values (353, 'B');
Q2: Insert INTO R (A, C) Values (111, ‘A’);
Q3: Insert INTO R (A, B) Values (222, 335);
Select one:
a. Both QI and Q2
b. QI only
c. Both QI and Q3
d. Q2 only
Run the problem using Relational Algebra, below the problem I added the needed table.
Use self join find the answer
(4) Find the name (fname,lname) of the direct supervisor of “Mary Smith”. (“Mary Smith” is an employee).
group: emplyeeemployee = {fname, lname, ssn,superssn, departnumber'Mary', 'Smith',111, 222, 11'Green', 'Marjorie',333, 222, 12'Gren', 'Cheryl',222, 777, 14}
Report the eid of every employee who manages at least two different people. Use the usual technique of table renaming and self-join, except use the keywords CROSS JOIN to take the Cartesian product of the two tables:
sales(eid, day, amount)employee(eid, name, salary, dept)manages(manager, junior)department(did, name, division)employee[dept] ⊆ department[did]manages[manager] ⊆ employee[eid]manages[junior] ⊆ employee[eid]sales[eid] ⊆ employee[eid]
USE CROSS JOIN PLEASE! Only Cross Join is allowed. Do not use other SQL techniques please.
Chapter 9 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 9.1 - Identify two departments in a manufacturing plant...Ch. 9.1 - Prob. 2QECh. 9.1 - Summarize the roles of the application software...Ch. 9.2 - Prob. 1QECh. 9.2 - Prob. 2QECh. 9.2 - Prob. 4QECh. 9.2 - Prob. 5QECh. 9.2 - Prob. 6QECh. 9.3 - Prob. 1QECh. 9.3 - What is a persistent object?
Ch. 9.3 - Identify some classes as well as some of their...Ch. 9.3 - Prob. 4QECh. 9.4 - Prob. 1QECh. 9.4 - Prob. 2QECh. 9.4 - Prob. 3QECh. 9.4 - Prob. 4QECh. 9.4 - Prob. 5QECh. 9.4 - Prob. 6QECh. 9.5 - Prob. 1QECh. 9.5 - Prob. 2QECh. 9.5 - Prob. 3QECh. 9.5 - Prob. 4QECh. 9.5 - Prob. 5QECh. 9.5 - Prob. 6QECh. 9.5 - Prob. 7QECh. 9.6 - Prob. 1QECh. 9.6 - Give an additional example of a pattern that might...Ch. 9.6 - Prob. 3QECh. 9.6 - How does data mining differ from traditional...Ch. 9.7 - Prob. 1QECh. 9.7 - Prob. 2QECh. 9.7 - Prob. 3QECh. 9.7 - Prob. 4QECh. 9 - Prob. 1CRPCh. 9 - Prob. 2CRPCh. 9 - Prob. 3CRPCh. 9 - Prob. 4CRPCh. 9 - Prob. 5CRPCh. 9 - Prob. 6CRPCh. 9 - Prob. 7CRPCh. 9 - Prob. 8CRPCh. 9 - Prob. 9CRPCh. 9 - Prob. 10CRPCh. 9 - Prob. 11CRPCh. 9 - Prob. 12CRPCh. 9 - Using the commands SELECT, PROJECT, and JOIN,...Ch. 9 - Answer Problem 13 using SQL. PROBLEM 13 13. Using...Ch. 9 - Prob. 15CRPCh. 9 - Prob. 16CRPCh. 9 - Prob. 17CRPCh. 9 - Prob. 18CRPCh. 9 - Prob. 19CRPCh. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Prob. 22CRPCh. 9 - Prob. 23CRPCh. 9 - Prob. 24CRPCh. 9 - Prob. 25CRPCh. 9 - Write a sequence of instructions (using the...Ch. 9 - Prob. 27CRPCh. 9 - Prob. 28CRPCh. 9 - Prob. 29CRPCh. 9 - Prob. 30CRPCh. 9 - Prob. 31CRPCh. 9 - Prob. 32CRPCh. 9 - Prob. 33CRPCh. 9 - Prob. 34CRPCh. 9 - Prob. 35CRPCh. 9 - Prob. 36CRPCh. 9 - Prob. 37CRPCh. 9 - Prob. 38CRPCh. 9 - Prob. 39CRPCh. 9 - Prob. 40CRPCh. 9 - Prob. 41CRPCh. 9 - Prob. 42CRPCh. 9 - Prob. 43CRPCh. 9 - Prob. 44CRPCh. 9 - Prob. 45CRPCh. 9 - Prob. 46CRPCh. 9 - Prob. 47CRPCh. 9 - Prob. 48CRPCh. 9 - Prob. 49CRPCh. 9 - Prob. 50CRPCh. 9 - Prob. 51CRPCh. 9 - Prob. 52CRPCh. 9 - Prob. 53CRPCh. 9 - Prob. 54CRPCh. 9 - Prob. 55CRPCh. 9 - Prob. 56CRPCh. 9 - Prob. 57CRPCh. 9 - Prob. 58CRPCh. 9 - Prob. 59CRPCh. 9 - Prob. 60CRPCh. 9 - Prob. 61CRPCh. 9 - Prob. 62CRPCh. 9 - Prob. 1SICh. 9 - Prob. 2SICh. 9 - Prob. 3SICh. 9 - Prob. 4SICh. 9 - Prob. 5SICh. 9 - Prob. 6SICh. 9 - Prob. 7SICh. 9 - Prob. 8SICh. 9 - Prob. 9SICh. 9 - Prob. 10SI
Knowledge Booster
Similar questions
- It may be advantageous to keep the join as a materialized view if a parallel data-store is used to hold two relations r and s and we need to connect them. What are the advantages and disadvantages in terms of total throughput, space utilization, and user query response time?arrow_forwardIt may be advantageous to keep the join as a materialized view if a parallel data-store is used to hold two relations r and s and we need to join r and s. What are the advantages and disadvantages in terms of total throughput, space usage, and user query response time?arrow_forwardModify the recursive query in Figure 5.16 to define a relationprereq_depth(course_id, prereq_id, depth) where the attribute depth indicates how many levels of intermediate prerequisites there are between the course and the prerequisite. Direct prerequisites havea depth of 0. Note that a prerequisite course may have multiple depths and thusmay appear more than once.arrow_forward
- Suppose relations R(A,B) and S(B,C,D) have the tuples shown below: R A B 5 3 4 46 8 479 Compute the result of the join query: SELECT A, R.B, S.B, C, D FROM R, S WHERE R.Aarrow_forwardIf a parallel data-store is used to store two relations r and s and we need to join r and s, it may be useful to maintain the join as a materialized view. What are the benefits and overheads in terms of overall throughput, use of space, and response time to user queries?arrow_forwardI have created the DDL below: I am getting an error about an existing constraint with the borrower_fkey for the borrower relation. At the same time, I feel like I have not satisfied all the requirements. Could someone show me what I did wrong? The class is being taught using PostgreSQL so the changes have to be applicable to postgreSQL. Thank you! CREATE TABLE branch (branch_name varchar(25) NOT NULL,branch_city varchar(15),assets numeric(15,2),CONSTRAINT branch_pkey PRIMARY KEY (branch_name));CREATE TABLE customer (ID varchar(10),customer_name varchar(25) NOT NULL,customer_street varchar(25) NOT NULL,customer_city varchar(15) NOT NULL,CONSTRAINT customer_pkey PRIMARY KEY (ID));CREATE TABLE loan (loan_number varchar(25) NOT NULL,branch_name varchar(25) NOT NULL,amount numeric(25,2) NOT NULL,CONSTRAINT loan_pkey PRIMARY KEY (loan_number),CONSTRAINT loan_fkey FOREIGN KEY (branch_name) REFERENCES branch (branch_name) ON DELETE CASCADE); CREATE TABLE borrower (ID varchar(25),loan_number…arrow_forwardWrite a SQL trigger to carryout the following action: If an account is deleted, then write a trigger to delete thedependent tuple(s) from the depositor table for every owner of the deleted account. Notethat there may be jointly-owned bank accounts. In other words, you are to write a triggerthat performs the exact action of an ON DELETE CASCADE clause of a FOREIGNKEY CONSTRAINT. You must submit both your trigger function definition, and yourtrigger definitionarrow_forwardtrue/false While creating a CHECK constraint, if there are tuples violating the condition we specify as part of the CHECK constraint, “cascading” specification eliminates these inconsistencies. “cascading” specification causes all “violating tuples” to be deleted. The “*” character used in an SQL SELECT statement means “all the tuples”. UNION and UNION ALL combine two relations. Since UNION implementation/execution does not require “sorting”, and UNION ALL requires “sorting”, UNION performs much better (is much faster) than UNION ALL. In SQL Server, DROP TABLE statement deletes only the definition and tuples of a relation. It does not delete indexes, triggers, constraints, and access right specifications defined on the relation since indexes, triggers, constraints, and access right specifications may still be in use; other users and stored procedures may be using them. INNER JOIN ≡ CROSS JOIN WHERE <condition> is…arrow_forwardCreate a hybrid merge-join version for the situation when both relations are not physically sorted but have a sorted secondary index on the join attributes.arrow_forwardWhat happens if we don’t specify the WHERE clause in an SQL DELETE FROM statement? a) statement compilation causes a “Syntax error”, and the statement is not executed. b) all the tuples of the relaton are deleted. c) none of the tuples of the relation is deleted. d) all the tuples not satisfying the condition are deleted. e) none of the above. Which one(s) of the following is(are) procedural? a) Relational Algebra b) Relational Calculus c) Tuple Relational Calculus d) Domain Relational Calculus e) SQL f) (a) and (e) e) (b) and (e).arrow_forwarddatabase Which of the following Statements stands true for Full outer-join? Select one: a. It pads tuples from the right relation that did not match any from the left relation with nulls and adds them to the result of the natural join. b. It takes all tuples in the right relation that did not match with any tuple in the right relation, pads the tuples with null values for all other attributes from the right relation, and add them to the result of the natural join. c. It takes all tuples in the left relation that did not match with any tuple in the right relation, pads the tuples with null values for all other attributes from the right relation, and add them to the result of the natural join. d. it pads tuples from the left relation that did not match any from the right relation, as well as tuples from the right relation that did not match any from the left relation, and adding them to the result of join.arrow_forwardConsider the library database of Figure 3.20. Write the following queries in SQL.Find the average number of books borrowed per member. Take into account that if a member does not borrow any books, then that member does not appear in the borrowed relation at all, but that member still counts in the average.arrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education