A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Question
Chapter 2, Problem 3CAT
Program Plan Intro
Shorthand representation of the relational
- The shorthand representation is used to represent the database table in an easier and an understandable way by using primary keys.
- The step wise process for representing a shorthand representation of a database structure is as follows:
- First, the Table Name is written down.
- Using paranthesis, list down all the columns or fields in the table within the paranthesis.
- From the shorthand representation, data such as primary keys can be identified.
- In this kind of representation, bold or underline data is used to represent a Primary key.
Entity Relationship Diagram (ERD):
Entity relationship diagram is basically a picture or snapshot about the business system. It means that the information stored and created is represented by this diagram.
- Entities may represent the physical object, event, or concept.
- An attribute is a property of an entity.
- Relationship denotes the link between the entities.
- If an independent child entity is present in a relationship then it is called a non-identifying relationship.
- If a dependent child entity is present in a relationship then it is called a non-identifying relationship.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Considering Vaccination Database, write queries to:
Display the Subject CNIC, Name, Contact, Dose1 Center, and Dose2 Center as shown below:
CNIC
Name
Contact
Dose1 Center
Dose2 Center
22401-6645321-1
Nasir
3409991112
Lachi
Kohat 2
14301-6045321-5
Shahab
3409991112
kohat 3
Dara
The subjects who have been vaccinated different types in Dose1 and Dose2. For instance, subjects who were vaccinated ‘Sinovac’ in the first dose, while Pfizer in the second dose.How many Viles of each type have been consumed so far. How many subjects are vaccinated from expired viles. Suggest the name of Incharge for the best performance award based on the highest number of subjects vaccinated on a single day
Design a survey form of your own. Fill it out as it might have been completed during the database design for Henry Books. For any questions you have too little information to answer, make a reasonable guess.
(Ray Henry, the owner of a bookstore chain named Henry Books, gathers and organizes information about branches, publishers, authors, and books. Each local branch of the bookstore has a number that uniquely identifies the branch. In addition, Ray tracks the branch’s name, location, and number of employees. Each publisher has a code that uniquely identifies the publisher. In addition, Ray tracks the publisher’s name and city. The only user of the Book database is Ray, but you do not want to treat the entire project as a single user view. Ray has provided you with all the reports the system must produce, and you will treat each report as a user view. Ray has given you the following requirements:
User View 1 Requirements: For each publisher, list the publisher code, publisher name, and…
Database Foundations:
Design a database to produce the following reports. Do not use any surrogate keys in your design.
For each guide, list the guide number, guide last name, guide first name, address, city, state, postal code, telephone number, and date hired.
For each trip, list the trip ID number, the trip name, the location from which the trip starts, the state in which the trip originates, the trip distance, the maximum group size, the type of trip (hiking, biking, or paddling), the season in which the trip occurs, and the guide number, first name, and last name of each guide. A guide may lead many trips and a trip may be led by many different guides.
For each client, list the client number, client last name, client first name, address, city, state, postal code, and telephone number
Chapter 2 Solutions
A Guide to SQL
Ch. 2 - Prob. 1RQCh. 2 - What is an attribute?Ch. 2 - What is a relationship? What is a one-to-many...Ch. 2 - Prob. 4RQCh. 2 - What is a relation?Ch. 2 - Prob. 6RQCh. 2 - Prob. 7RQCh. 2 - How do you qualify the name of a field, and when...Ch. 2 - Prob. 9RQCh. 2 - What is a primary key? What is the primary key for...
Ch. 2 - Prob. 11RQCh. 2 - Prob. 12RQCh. 2 - Define second normal form. What types of problems...Ch. 2 - Define third normal form. What types of problems...Ch. 2 - Prob. 15RQCh. 2 - Prob. 16RQCh. 2 - List the changes you would need to make to your...Ch. 2 - Prob. 1TDCh. 2 - Prob. 2TDCh. 2 - Prob. 3TDCh. 2 - Prob. 4TDCh. 2 - Prob. 5TDCh. 2 - Prob. 1CATCh. 2 - Identify the functional dependencies in the...Ch. 2 - Prob. 3CATCh. 2 - Determine the functional dependencies that exist...Ch. 2 - Prob. 2SCGCh. 2 - Prob. 3SCG
Knowledge Booster
Similar questions
- An EMPLOYEES table was added to the JustLee Books database to track employee information. Display a list of each employee’s name, job title, and manager’s name. Use column aliases to clearly identify employee and manager name values. Include all employees in the list and sort by manager name.arrow_forwardThe Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENACNE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys.arrow_forwardThe database should contain the following six tables: Artists (artist_id: char(30), artist_name: char(30), artist_pop: int(5))Tracks (track_id: char(30), track_name: char(30), duration: int(10), tempo:real) Record (artist_id: char(30), track_id: char(30))Users (user_id: char(30), user_name: char(30), age: int(5), nationality: char(30), num_track_listened: int(10))Listen (user_id: char(30), track_id: char(30))Follow (user_id: char(30), artist_id: char(30), follow_date: datetime) Write a single SQL query for each request below. Find the ids of those users who have listened to at least one track but have not followed any artists. Find the ids and names of those users who have listened to some tracks recorded by the artist named 'Adele'. Find the ids and names of those users who have not listened to any track recorded by the artist named 'Adele'. Use ''NOT EXISTS'' to answer this query.arrow_forward
- Colonial Adventure Tours is considering offering outdoor adventure classes. These classes would better prepare people to participate in hiking, biking, and paddling adventures. Only one class is taught on any given day. Participants can enroll in one class or several classes. Classes are taught by the guides that Colonial Adventure employs. Participants do not know who the instructor for a particular class will be until the day of the class. Colonial Adventure Tours needs your help with the database design for this new venture. In each step, represent your answer in DBDL with a diagram. You may use any of the styles presented in this chapter for the diagram. Colonial Adventure Tours needs to produce the following reports: For each participant, list his or her number, last name, first name, address, city, state, postal code, telephone number, and date of birth. For each adventure class, list the class number, class description, maximum number of persons in the class, and class fee. For…arrow_forwardUsing the Henry Books database, add the new title from Stephen King to the wrote table: Book code = 3578 Author number = 6 Edition = 1 You will insert 2 snips for this question. What construct did you use to add a row to the wrote table. Insert the snip of the construct used: Insert the snip of the wrote table. Be sure the new row is displayed:arrow_forwardUsing the Henry Books database,update the paperback field for the book titled Black Houseto Y. You will insert 2 snips for this question. Insert a snip of the construct used to update the table: Insert your screen shot of the Books table here (be certain Black Housedisplays): Using the Henry Books database,add a new row to the AUTHORS table. The new author’s name is John Grisham. You will insert 2 snip s for this question. Insert a snip of the construct used to update the table: Insert your snip of the Authors table here showing the update: Using the Henry Books database,create a view named Paperback. It consists of the book code, book title, publisher name, and book price for every book that is available in paperback. You will insert 2 snips for this question. Insert a snip of the construct used to create this view: Run a query using this view and insert a snip of the resultset: Using the Henry Books database,write a stored procedure that…arrow_forward
- Q2 Create a Database with at least 4 tables, 3 queries, 2 forms, and 1 report. Each table should have at least 10 records. for library designarrow_forwardUsing the Henry Books database,Henry Books no longer carries books written by Barbara Owen. Delete this author from the authors table. You will insert 2 snips for this question. What construct did you use to delete author Barbara Owens? Insert the snip of the construct used: Insert the snip of the authors table. Be sure all rows are displayed:arrow_forwardCourse: Database Given the following schemas for a student record: STUDENTS (student_id, student_name, region)COURSES (course_id, course_name, subject_type, lecturer_name)RESULTS (student_id, course_id, score, result_status) STUDENTS relation shows the information of the students. The COURSE relation specifies the course details. The RESULTS relation lists the scores that students obtain for each course taken. *Please execute this SQL codes for creating the table schemas mentioned above, Then execute the tasks in the table accordingly using proper SQL queries and Write your answer into the Answer Template CREATE TABLE STUDENTS (student_id VARCHAR(10) PRIMARY KEY, student_name VARCHAR(150), region VARCHAR(50)); CREATE TABLE COURSES (course_id VARCHAR(10) PRIMARY KEY, course_name VARCHAR(150), subject_type VARCHAR(50), lecturer_name VARCHAR(150)); CREATE TABLE RESULTS (student_id VARCHAR(10), course_id VARCHAR(10), score NUMBER, result_status VARCHAR(20), CONSTRAINT pk_results PRIMARY…arrow_forward
- Personal Insurance, Inc. is a national company that insures homeowners and renters. It also offers umbrella policies that provide additional coverage. As a regional manager, you need to be able to query the database to help make decisions and to answer questions from other employees. Create a query based on the Customers table in Query Design View with the following options: Add the CustomerID, FirstName, LastName, and DateOfBirth fields to the design grid in that order. Sort the records in ascending order by LastName. Save the query using CustomerLastNameSorted as the name.Open the query in Datasheet View, then close it, saving if necessary. Open the HomeownersPremium query in Design View and make the following changes to the query: Delete the CustomerID column from the design grid. Add criteria to select only those records where the Premium field value is greater than 2,000. Save the changes to the HomeownersPremiumOpen the query in Datasheet View, then close it, saving if…arrow_forwarduse Valentina Studio to build a form that will allow users to enter information into our Sakila database without having to utilize and SQL. For this assignment, we are only implementing single table forms. This assignment will take some time as there are several steps to follow, so please start early to allow for time to complete the activity. To develop a form, we must begin by creating a new “Project” within the database that will allow for us to create the form. The following steps illustrate how to create the Project.arrow_forwardA select procedure in a relational database can shrink a table's size by deleting columns that don't fit a certain set of requirements.Is it good or bad?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr