A Guide to SQL
A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
Question
Book Icon
Chapter 2, Problem 3CAT
Program Plan Intro

Shorthand representation of the relational database structure:

  • 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.

Blurred answer
Students have asked these similar questions
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
The 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.
The 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.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Oracle 12c: SQL
    Computer Science
    ISBN:9781305251038
    Author:Joan Casteel
    Publisher:Cengage Learning
    Text book image
    A Guide to SQL
    Computer Science
    ISBN:9781111527273
    Author:Philip J. Pratt
    Publisher:Course Technology Ptr
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr