Find the album title, band name, format, and total length of all albums released since January 1, 2000. Order from longest to shortest. Try to return the format as the word "single" or "double" rather than just the store value "s" or "d". Try to get the total length to look like a reasonable time value rather than just a big number. Please use the same table names as below in the image.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Find the album title, band name, format, and total length of all albums released since January 1, 2000.

Order from longest to shortest.

Try to return the format as the word "single" or "double" rather than just the store value "s" or "d".

Try to get the total length to look like a reasonable time value rather than just a big number.

Please use the same table names as below in the image.

The image displays SQL code for creating tables in a database, organized to handle data related to artists, bands, members, albums, and songs. Here’s an overview:

1. **Comments**:
   - The code begins with a comment: `/* Create all tables. Order matters due to foreign keys. */` indicating that the sequence of table creation is important because of the relationships between them.

2. **Table `p_artist`**:
   - **Columns**:
     - `id`: An integer that auto-increments and serves as the primary key.
     - `fname`: A VARCHAR(30) for the artist's first name, not null.
     - `lname`: A VARCHAR(30) for the artist's last name, not null.
     - `dob`: A DATE for the artist's date of birth.
     - `hometown`: A VARCHAR(40) for the artist's hometown.
     - `gender`: A CHAR(1) representing gender.
   - **Primary Key**: `id`
   - **Engine**: `innodb`

3. **Table `p_band`**:
   - **Columns**:
     - `id`: An integer that auto-increments and serves as the primary key.
     - `title`: A VARCHAR(50) for the band's title, not null.
     - `year_formed`: A YEAR indicating when the band was formed.
   - **Primary Key**: `id`
   - **Engine**: `innodb`

4. **Table `p_member`**:
   - **Columns**:
     - `artist_id`: An integer referencing `p_artist(id)`, not null.
     - `band_id`: An integer referencing `p_band(id)`, not null.
     - `joined_date`: A DATE indicating when the member joined the band.
     - `leave_date`: A DATE for when the member left the band.
   - **Foreign Keys**: References `artist_id` to `p_artist(id)` and `band_id` to `p_band(id)`.
   - **Engine**: `innodb`

5. **Table `p_album`**:
   - **Columns**:
     - `id`: An integer that serves as the primary key.
     - `pub_year`: A YEAR for the album's publication year.
     - `title`: A VARCHAR(50) for the album title.
     - `publisher`: A VARCHAR(50
Transcribed Image Text:The image displays SQL code for creating tables in a database, organized to handle data related to artists, bands, members, albums, and songs. Here’s an overview: 1. **Comments**: - The code begins with a comment: `/* Create all tables. Order matters due to foreign keys. */` indicating that the sequence of table creation is important because of the relationships between them. 2. **Table `p_artist`**: - **Columns**: - `id`: An integer that auto-increments and serves as the primary key. - `fname`: A VARCHAR(30) for the artist's first name, not null. - `lname`: A VARCHAR(30) for the artist's last name, not null. - `dob`: A DATE for the artist's date of birth. - `hometown`: A VARCHAR(40) for the artist's hometown. - `gender`: A CHAR(1) representing gender. - **Primary Key**: `id` - **Engine**: `innodb` 3. **Table `p_band`**: - **Columns**: - `id`: An integer that auto-increments and serves as the primary key. - `title`: A VARCHAR(50) for the band's title, not null. - `year_formed`: A YEAR indicating when the band was formed. - **Primary Key**: `id` - **Engine**: `innodb` 4. **Table `p_member`**: - **Columns**: - `artist_id`: An integer referencing `p_artist(id)`, not null. - `band_id`: An integer referencing `p_band(id)`, not null. - `joined_date`: A DATE indicating when the member joined the band. - `leave_date`: A DATE for when the member left the band. - **Foreign Keys**: References `artist_id` to `p_artist(id)` and `band_id` to `p_band(id)`. - **Engine**: `innodb` 5. **Table `p_album`**: - **Columns**: - `id`: An integer that serves as the primary key. - `pub_year`: A YEAR for the album's publication year. - `title`: A VARCHAR(50) for the album title. - `publisher`: A VARCHAR(50
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education