1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dlinn [17]
3 years ago
12

A personal music database stores details of a personal music library, and can be used to manage your MP3, CD, or vinyl collectio

n. Because this database is for a personal collection, it’s relatively simple and stores only the relationships between artists, albums, and tracks.
Key requirements for the database:

The collection consists of albums.

An album is made by one or more artists.

An artist makes one or more albums.

An album contains one or more tracks

Artists, albums, and tracks each have a name.

Each track is on exactly one album.

Each track has a time length, measured in seconds.

When a track is played, the date and time the playback began (to the nearest second) should be recorded; this is used for reporting when a track was last played, as well as the number of times music by an artist, from an album, or a track has been played.

There’s no requirement to capture composers, group members or sidemen, recording date or location, the source media, or any other details of artists, albums, or tracks.

1.a) For the above problem, draw an entity relationship diagram with appropriate cardinalities (including lower and upper bounds) associated with the relationships. (20 points)

1.b) Based on the entity relationship diagram, create a relational model (in 3rd normal form). Identify any needed primary and foreign keys and draw the relationship lines between the specific attributes in each entity that are associated with the relationship.

Computers and Technology
1 answer:
Rudiy273 years ago
7 0

Answer:

Check the explanation

Explanation:

Step 1: identify the entitles

From the statement given, the given entitles are artists, albums, tracks and played.

Step 2: identify the relationships

  1. One artist can make many albums
  2. One album can contain many tracks
  3. One track can be played many times.

Conversely, each play is associated with one track, a track is on one album, and an album is by one artist.

Step 3: identify the key attributes

The only strong entity in the database would be the “artist”, which has an attribute of artist ID so as to uniquely identifies it

Each album entity is uniquely identified by its album combined with the artist ID of the corresponding artist entity.

A track entity is similarly uniquely identified by its track ID combined with the related album ID and artist ID attributes.

The played entity is uniquely identified by a combination of its played time, and the related track ID attributes.

Step 4: identify other relevant attributes:

The attributes are straight forward; artist, albums, and track have names as well as identifiers to uniquely identify each entity. The track entity has a time attribute to solve the duration and the played entity has a timestamp to store when the track was played.

Step 5: Draw a complete ER diagram

The diagram explaining this question can be seen in the attached image below:

You might be interested in
Find every number from 1 to n (inclusive) that is a palindrome which starts with the digit 3. Do not user a helper function.
Mkey [24]

Answer: Following code is in python

n=input()

num='1'

while int(num)<=int(n):    //loop from 1 to n

   flag=1   //if an unequal element will be found it will be 0

   l=len(num)

   if num[0]=='3':

       j=0

       k=l-1

       while j<k:    //loop till middle of number

           if num[j]==num[k]:

               j+=1     //from beginning

               k-=1    //from end

           else:

               flag=0

               break

       if flag==1:

           print(int(num))

   num=str(int(num)+1)    //number will be incremented as integer

INPUT :

1000

OUTPUT :

3

33

303

313

323

333

343

353

363

373

383

393

Explanation:

In the above code, a loop is executed till num is equal to n which is entered by the user. num is treated as a string so that to ease the process of checking first character is 3 or not. If it is 3 then another loop executes which checks if an element from starting is equal to the corresponding element from the end. If an element is not equal then the flag is changed and then we break out of the loop and prints the number if the flag isn't changed.

7 0
3 years ago
Software that instructs the computer how to run applications and controls the display/keyboard is known as the
saw5 [17]
Answer is : operating system
8 0
3 years ago
How has the internet improved business communication worldwide
emmasim [6.3K]

Answer:

One of the biggest changes for businesses is the communication technology enabled by the internet. The way people communicate with one another, share files, make purchases, and collaborate has completely shifted since the internet became widespread.

Explanation:

4 0
2 years ago
Do software engineers save millions of dollars in usa
SCORPION-xisa [38]
Yes. They make a lot of money. So eventually after saving your Money, you will make a least 1 million dollars or more.
4 0
2 years ago
8.11 LAB: Count characters - functions Write a program whose input is a character and a string, and whose output indicates the n
Shkiper50 [21]

Answer:

#include<iostream>

using namespace std;

int CountCharacters(char userChar, const string inputstr){

   int k = 0;

   int iter = 0;

   for (iter = 0; iter < inputstr.size(); iter++){

       if (inputstr[iter] ==  userChar){

           ++k;        }}

   return k;}

int main(){

   string str;

   char userChar[1];

   cout<<"Char: ";    cin>>userChar;

   cin.ignore();

   cout<<"String: ";   getline(cin, str);

   cout<<CountCharacters(userChar[0],str);

   return 0;}

Explanation:

Written in C++:

The function is defined here:

int CountCharacters(char userChar, const string inputstr){

This initializes a count variable k to 0

   int k = 0;

This initializes an iterating variable iter to 0

   int iter = 0;

This iterates through the characters of the string being passed to the function

   for (iter = 0; iter < inputstr.size(); iter++){

This checks for matching characters

       if (inputstr[iter] ==  userChar){

If found,  k is incremented by 1

           ++k;        }}

This returns the total count

   return k;}

The main begins here

int main(){

This declares a string variable

   string str;

This declares a character variable

   char userChar[1];

This gets input for the character variable

   cout<<"Char: ";    cin>>userChar;

This lets the user get another input

   cin.ignore();

This gets input for the string variable

   cout<<"String: ";   getline(cin, str);

This calls the function and return the count of character in the string

   cout<<CountCharacters(userChar[0],str);

6 0
2 years ago
Other questions:
  • PLEASE HELP ASAP!!!!
    14·1 answer
  • during zach's second visit of the year, he incurred a $450 bill. Describe how much is paid by Zach and the insurance carrier
    7·1 answer
  • Based upon what you know
    5·1 answer
  • Which type of optical scanner works in a manner similar to a copy machine?
    15·1 answer
  • There are many apps that help find you cheaper gas. If the cost of a gallon of regular gas is $3 at one station and $3.50 at ano
    15·1 answer
  • Caroline is building an expert system for wartime defense. Which of these is true about the system she is building?
    14·1 answer
  • Which of the following substances increases in quantity during repititive muscle contraction during oxygen deficti ?
    11·1 answer
  • Juan has performed a search on his inbox and would like to ensure the results only include those items with attachments which co
    14·2 answers
  • Kyra is teaching a photography class. She would like her students to share photos. She would also like the students to be able t
    6·1 answer
  • A Chain of dry-cleaning outlets wants to improve its operations by using data from devices at individual locations to make real-
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!