SlideShare une entreprise Scribd logo
1  sur  24
A Database Project By -
CHERRY KEDIACHERRY KEDIA
NILESH PADWALNILESH PADWAL
INDEX
• Introduction
• Applications supported
• Overview Of Project
• Application Screenshot
• Data Management
• Technical Glossary
• Tables In ER- Diagram
• ER- Diagram
• Application Logic And Reports
• Future Scope
• Lessons Learned…
• What is it about?
The Music Database project is to categorize and catalog
every single piece of music for music info and reviews,
Rate and review albums, internet music service, listing
record collections, music downloading and sharing, etc.
• Why we chose it?
The idea of music database arose out of common
interest of project members in Music (Sangeet). The
concept seemed different and very interesting right in
the first go.
Applications Supported…
• Online music listening
• On demand music for streaming media
• Music guide
• Music quizzes
• Karaoke (sing-along) players
• Film and music studios i.e. music retailers
• Music library
•Music stores and internet radio
Overview of Project
• Concentration on online music streaming
• Songs added by admin, accessed by registered users.
• Search a song as per its album, genre, lyrics, artist
• Can create playlists
• Can download and share songs
• Select and maintain favorite songs
• Users can contribute by uploading the lyrics
• Users can maintain their music files on their account
Application Screenshots- Raaga.com
Application Screenshots- Gaana.com
Other Schema
Labels Data
Genre Data
Files and Images Data
Human Resources Schema
Users Data
Admin Data
Artist Data
Music Schema
Playlist Data
Lyrics Data
Albums
Songs Data
Data Management
Technical Glossary
TOOLS & IDE USED :
1.pgAdmin III
2. SQL DEVELOPER
3. NOTEPAD++
4.MySQLWorkbench
DATABASE USED :
1.ORACLE 11g (PL/SQL)
2.MICROSOFT EXCEL 2010
Tables In ER- Diagram
The Most Important Tables in our project:
•Songs (Title, Length, Album, Genre, Download
Permit, Share Link)
•Albums (Name, Release Date, Length, Total
Tracks, Genre, Label,
Image)
•Playlists (User Id, Name, Favorite Flag)
•Artist (Name, Total Songs, Total Albums, Image)
Few Other tables are:
• Users (Name Details, Authentication, Last Login,
Active Status)
• FrequencyHeard (User, Song, Album, Count, Week
No)
• SungBy (Song, Artist, Album)
• Includes (Playlist, Song, Album)
• Images (Name, Location Address)
• Genre (Name)
• Usertype (User position)
• UserFiles (Name, User, File size)
Table Description (contd..)
ER- Diagram (First Draft)
ER Diagram (Final Draft)
--------||
• Most common song searches according to various
factors.
• Most Selling Label i.e. label producing max music
albums which make it to users' playlists or favorite
list.
• Recommend albums to the user based on his favorite
genre
• Check if a new file can be uploaded based on the
storage space allotted to him as per the user type
and if it can then insert the file in his storage space
• Find the artist with max songs for a user/ Find an
artist the user is the biggest fan of as per his favorite
playlist
Application Logic And Reports
Reports Example
Recommend albums to the user based on his favorite genre
OUTPUT
Create or Replace Procedure Fav_Album
(P_ID IN NUMBER G_name OUT VARCHAR2) AS
V_Album_ID Number;
V_Playlist_ID Number;
Out_Album_Name Varchar2(20);
Begin
Select playList_Id INTO V_Playlist_ID from PlayList
Where user_Id = P_ID AND FavFlag=TRUE;
Select Count(Album_Id ) , Album_ID INTO V_Album_ID
From Includes
Where PlayList_Id = V_Playlist_Id AND ROWNUM=1
Group by Album_id
Order by Count( Album_id) DESC
Select Genre_Id INTO V_GId from Albums
Where Album_Id = V_Album_ID
Select AlbumName INTO Out_Album_Name from Albums
where Genre_Id = V_GId
AND Album_Id NOT IN (Select Distinct(Album_Id)
From Includes Where Playlist_Id = V_Playlist_Id
Order by ReleasedDtDesc;
G_name := Out_Album_Name ;
END Fav_Album;
Application Logic And Reports
create view New_Release as
select * from
(select * from Albums
Order by ReleasedDtdesc) as
desc
Where rownum< = 25;
Create a VIEW that lists 25 newly released albums
Reports Example
Create Or Replace Procedure FILE_INSERT ( ID IN NUMBER ,
V_Filename In VARCHAR2 , FILE_SZ IN NUMBER) Return Integer
IS
Count_SizeNumber(20);
BEGIN
Select Sum(FileSize) INTO Count_Size From UserFiles
Where User_Id = ID;
IF UserType_Id = 'Admin' Then
If Count_Size< 1000 AND (1000 - Count_size) >= FILE_SZ
Then
Insert Into UserFiles (Filename, User_id, FileSize)
Values (V_Filename, ID, FILE_SZ);
End If;
Else
If count_Size< 250 AND (250 - Count_size) >= FILE_SZ
Then
Insert Into UserFiles (Filename, User_id, FileSize)
Values (V_Filename, ID , FILE_SZ);
End If;
End If;
End FILE_INSERT ;
Check if a new file can be uploaded based on the storage space
allotted to him as per the user type and if it can then insert the file
in his storage space
OUTPUT
Reports Example
Create Or Replace Procedure Artist_Max_song (ID IN
NUMBER)IS
A_NameVARCHAR2(50);
Begin
Select Name INTO A_Name From Artists
Where Artist_id in
(Select Artist_id from Artists
Where Artist_id in
( SelectArtist_id From SungBy
Where Song_id in
( SelectSong_id From Includes
Where PlayList_id =
(Select PlayList_id From PlayList
Where User Id = ID AND FavFlag= TRUE)))
Group ByArtist_id
Order By Count(Artist_id))
Where RowNum<=1
END Artist_Max_song;
Find the artist with max songs for a user/ Find an artist the user is
the biggest fan for every particular user as per his favorite playlist
OUTPUT
Application Logic And Reports
select name artistName from (select *
from
(select a.name, sum(sf.songFreq)
artistFreq from
(selectf.Song_id, sum(f.count) songFreq
from FrequencyHeard f where
weekno =
to_number(to_char(sysdate,'WWYYYY'))
group by f.Song_id) sf
joinsungBysb on sb.song_id = sf.song_id
join artists a on a.artist_id =
sb.artist_id
group by a.name) af
order by af.artistFreqdesc)
whererownum = 1;
Billboard’s (likewise) Most Heard Artist of the week
OUTPUT
Application Logic And Reports
CREATE OR REPLACE FUNCTION
DEACTIVATE_USERS RETURN INTEGER AS
BEGIN
UPDATE USERS U
SET U.ACTIVESTATUS = 'N'
WHERE SYSDATE - U.LASTLOGINDT >
365 * 5; -- Deactivate users who have
not logged in for 5 years.
EXCEPTION WHEN OTHERS THEN
null; -- Do Nothing
END;
RETURN NULL;
END DEACTIVATE_USERS;
Function to deactivate a user id if he has not used the website
for a long time
Application Logic And Reports
CREATE OR REPLACE PROCEDURE
UPDATE_LAST_LOGIN (USER_ID NUMBER)
AS
v_userId USERS.USERS_ID%TYPE;
BEGIN
v_userId := USER_ID;
UPDATE USERS U
SET U.LASTLOGINDT = sysdate
WHERE U.USERS_ID = v_userId
AND U.ACTIVESTATUS = 'Y';
EXCEPTION WHEN OTHERS THEN
null ;
END;
END UPDATE_LAST_LOGIN ;
Update the last account status after every login by a user
Application Logic And Reports
CREATE OR REPLACE FUNCTION AUTHENTICATE
(VAR_EMAIL VARCHAR2, VAR_PASSWORD VARCHAR2)
RETURN NUMBER AS
v_user_pwd USERS.PASSWORD%TYPE;
result number;
BEGIN
SELECT U.PASSWORD INTO v_user_pwd
FROM USERS U
WHERE U.EMAIL = VAR_EMAIL
AND U.ACTIVESTATUS = 'Y';
IF v_user_pwd= VAR_PASSWORD THEN
result := 1;
ELSE
result := 0;
END IF;
EXCEPTION WHEN OTHERS THEN
-- If the email Id is invalid then the select
query will throw no data found exception
result := 0;
END;
END AUTHENTICATE;
Function to authenticate user details while log in
Future Scope
• Search a song by melody (entering notes, whistling,
tapping rhythm)
• Making music buddies on the basis of similar music
interests
• Commenting the playlists, rating and reviewing the
albums
• Creating chat rooms to discuss about upcoming or
newly released albums/records
• Providing licensed music streaming and downloads
by admin
Lessons Learned
• Application of the knowledge of database design.
• Intelligent database design to serve the purpose of the
applications that depend on it.
• Generation of data – Arrays used to create random data
for
• Applying knowledge of writing SQL queries and functions
– using joins to combine data from multiple tables
• Functions – Generic reports that take input parameters
to produce corresponding results

Contenu connexe

Tendances

library management system in SQL
library management system in SQLlibrary management system in SQL
library management system in SQL
farouq umar
 
Online Examination System Report
Online Examination System ReportOnline Examination System Report
Online Examination System Report
Ankan Banerjee
 
Learning Management System-SRS Modified(Semi-Final)
Learning Management System-SRS Modified(Semi-Final)Learning Management System-SRS Modified(Semi-Final)
Learning Management System-SRS Modified(Semi-Final)
Sharon Varghese
 

Tendances (20)

FYP 1
FYP 1FYP 1
FYP 1
 
Web app presentation
Web app presentationWeb app presentation
Web app presentation
 
library management system in SQL
library management system in SQLlibrary management system in SQL
library management system in SQL
 
University/College Transport management system Documentation
University/College Transport management system DocumentationUniversity/College Transport management system Documentation
University/College Transport management system Documentation
 
Library management
Library managementLibrary management
Library management
 
Chat Application
Chat ApplicationChat Application
Chat Application
 
Online Examination System Report
Online Examination System ReportOnline Examination System Report
Online Examination System Report
 
Student management system
Student management systemStudent management system
Student management system
 
Airline reservation system documentation
Airline reservation system documentationAirline reservation system documentation
Airline reservation system documentation
 
Online railway reservation system
Online railway reservation systemOnline railway reservation system
Online railway reservation system
 
Use case of hospital managment system
Use case of hospital managment systemUse case of hospital managment system
Use case of hospital managment system
 
School Management System
School Management SystemSchool Management System
School Management System
 
Software Requirements Specification for restaurant management system
Software Requirements Specification for restaurant management systemSoftware Requirements Specification for restaurant management system
Software Requirements Specification for restaurant management system
 
Learning Management System-SRS Modified(Semi-Final)
Learning Management System-SRS Modified(Semi-Final)Learning Management System-SRS Modified(Semi-Final)
Learning Management System-SRS Modified(Semi-Final)
 
srs for railway reservation system
 srs for railway reservation system srs for railway reservation system
srs for railway reservation system
 
Online Food Ordering System
Online Food Ordering SystemOnline Food Ordering System
Online Food Ordering System
 
Online Voting System - Project
Online Voting System - ProjectOnline Voting System - Project
Online Voting System - Project
 
Railway Reservation system Case study of oracle db by cj date
Railway Reservation system Case study of oracle db by cj dateRailway Reservation system Case study of oracle db by cj date
Railway Reservation system Case study of oracle db by cj date
 
Event managementsystem
Event managementsystemEvent managementsystem
Event managementsystem
 
Hotel reservation system
Hotel reservation systemHotel reservation system
Hotel reservation system
 

En vedette

Tanchaurchuanait201011f
Tanchaurchuanait201011fTanchaurchuanait201011f
Tanchaurchuanait201011f
Le Anh
 
imageprocessing-abstract
imageprocessing-abstractimageprocessing-abstract
imageprocessing-abstract
Jagadeesh Kumar
 

En vedette (14)

Music store
Music storeMusic store
Music store
 
Music project powerpoint
Music project powerpointMusic project powerpoint
Music project powerpoint
 
Ucn
UcnUcn
Ucn
 
Designing a Better Online Music Store (by:Larm 2008)
Designing a Better Online Music Store (by:Larm 2008)Designing a Better Online Music Store (by:Larm 2008)
Designing a Better Online Music Store (by:Larm 2008)
 
Tanchaurchuanait201011f
Tanchaurchuanait201011fTanchaurchuanait201011f
Tanchaurchuanait201011f
 
Library management
Library managementLibrary management
Library management
 
imageprocessing-abstract
imageprocessing-abstractimageprocessing-abstract
imageprocessing-abstract
 
Major Project: Image editor (1.2)
Major Project: Image editor (1.2)Major Project: Image editor (1.2)
Major Project: Image editor (1.2)
 
College Stationery Management System
College Stationery Management SystemCollege Stationery Management System
College Stationery Management System
 
Project Report
Project ReportProject Report
Project Report
 
College Stationery Management System VB 6.0 and Microsoft Access Project
College Stationery Management System VB 6.0  and Microsoft Access ProjectCollege Stationery Management System VB 6.0  and Microsoft Access Project
College Stationery Management System VB 6.0 and Microsoft Access Project
 
Canteen Management System
Canteen Management SystemCanteen Management System
Canteen Management System
 
Library Management System PPT
Library Management System PPTLibrary Management System PPT
Library Management System PPT
 
MARKETING MANAGEMENT - JEANS
MARKETING MANAGEMENT - JEANSMARKETING MANAGEMENT - JEANS
MARKETING MANAGEMENT - JEANS
 

Similaire à Music management system

Administration and Management of Users in Oracle / Oracle Database Storage st...
Administration and Management of Users in Oracle / Oracle Database Storage st...Administration and Management of Users in Oracle / Oracle Database Storage st...
Administration and Management of Users in Oracle / Oracle Database Storage st...
rajeshkumarcse2001
 
Oracle forensics 101
Oracle forensics 101Oracle forensics 101
Oracle forensics 101
fangjiafu
 
Hw09 Analytics And Reporting
Hw09   Analytics And ReportingHw09   Analytics And Reporting
Hw09 Analytics And Reporting
Cloudera, Inc.
 

Similaire à Music management system (20)

Administration and Management of Users in Oracle / Oracle Database Storage st...
Administration and Management of Users in Oracle / Oracle Database Storage st...Administration and Management of Users in Oracle / Oracle Database Storage st...
Administration and Management of Users in Oracle / Oracle Database Storage st...
 
Tibco-Patterns
Tibco-Patterns Tibco-Patterns
Tibco-Patterns
 
Demystifying PostgreSQL (Zendcon 2010)
Demystifying PostgreSQL (Zendcon 2010)Demystifying PostgreSQL (Zendcon 2010)
Demystifying PostgreSQL (Zendcon 2010)
 
Demystifying PostgreSQL
Demystifying PostgreSQLDemystifying PostgreSQL
Demystifying PostgreSQL
 
Feeney "Working with Scholarly APIs: A NISO Training Series, Session Three: C...
Feeney "Working with Scholarly APIs: A NISO Training Series, Session Three: C...Feeney "Working with Scholarly APIs: A NISO Training Series, Session Three: C...
Feeney "Working with Scholarly APIs: A NISO Training Series, Session Three: C...
 
The perfect index
The perfect indexThe perfect index
The perfect index
 
Session #5 content providers
Session #5  content providersSession #5  content providers
Session #5 content providers
 
An Introduction to Working With the Activity Stream
An Introduction to Working With the Activity StreamAn Introduction to Working With the Activity Stream
An Introduction to Working With the Activity Stream
 
La big datacamp-2014-aws-dynamodb-overview-michael_limcaco
La big datacamp-2014-aws-dynamodb-overview-michael_limcacoLa big datacamp-2014-aws-dynamodb-overview-michael_limcaco
La big datacamp-2014-aws-dynamodb-overview-michael_limcaco
 
Data Discovery at Databricks with Amundsen
Data Discovery at Databricks with AmundsenData Discovery at Databricks with Amundsen
Data Discovery at Databricks with Amundsen
 
Sound cloud - User & Partner Conference - AT Internet
Sound cloud - User & Partner Conference - AT InternetSound cloud - User & Partner Conference - AT Internet
Sound cloud - User & Partner Conference - AT Internet
 
Mikkel Heisterberg - An introduction to developing for the Activity Stream
Mikkel Heisterberg - An introduction to developing for the Activity StreamMikkel Heisterberg - An introduction to developing for the Activity Stream
Mikkel Heisterberg - An introduction to developing for the Activity Stream
 
PEGA Naming standards for pega rules | PEGA PRPC Training
PEGA Naming standards for pega rules | PEGA PRPC TrainingPEGA Naming standards for pega rules | PEGA PRPC Training
PEGA Naming standards for pega rules | PEGA PRPC Training
 
Audio Analysis with Spotify's Web API
Audio Analysis with Spotify's Web APIAudio Analysis with Spotify's Web API
Audio Analysis with Spotify's Web API
 
REST to GraphQL
REST to GraphQLREST to GraphQL
REST to GraphQL
 
Oracle forensics 101
Oracle forensics 101Oracle forensics 101
Oracle forensics 101
 
Hw09 Analytics And Reporting
Hw09   Analytics And ReportingHw09   Analytics And Reporting
Hw09 Analytics And Reporting
 
What is a Database?
What is a Database?What is a Database?
What is a Database?
 
Webinar 2017. Supercharge your analytics with ClickHouse. Alexander Zaitsev
Webinar 2017. Supercharge your analytics with ClickHouse. Alexander ZaitsevWebinar 2017. Supercharge your analytics with ClickHouse. Alexander Zaitsev
Webinar 2017. Supercharge your analytics with ClickHouse. Alexander Zaitsev
 
MBLTDev15: Kyle Fuller, Apairy
MBLTDev15: Kyle Fuller, ApairyMBLTDev15: Kyle Fuller, Apairy
MBLTDev15: Kyle Fuller, Apairy
 

Plus de Nilesh Padwal (6)

U.S Air Flight On-Time Performance with Data Mining & Analytics
U.S Air Flight On-Time Performance with Data Mining & AnalyticsU.S Air Flight On-Time Performance with Data Mining & Analytics
U.S Air Flight On-Time Performance with Data Mining & Analytics
 
Budget Planning
Budget Planning Budget Planning
Budget Planning
 
Residential safety office_business analysis_project
Residential safety office_business analysis_projectResidential safety office_business analysis_project
Residential safety office_business analysis_project
 
Voice enable smtp client
Voice enable smtp clientVoice enable smtp client
Voice enable smtp client
 
Advance database management project
Advance database management projectAdvance database management project
Advance database management project
 
Html5 &&& css3
Html5 &&& css3 Html5 &&& css3
Html5 &&& css3
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Dernier (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 

Music management system

  • 1. A Database Project By - CHERRY KEDIACHERRY KEDIA NILESH PADWALNILESH PADWAL
  • 2. INDEX • Introduction • Applications supported • Overview Of Project • Application Screenshot • Data Management • Technical Glossary • Tables In ER- Diagram • ER- Diagram • Application Logic And Reports • Future Scope • Lessons Learned…
  • 3. • What is it about? The Music Database project is to categorize and catalog every single piece of music for music info and reviews, Rate and review albums, internet music service, listing record collections, music downloading and sharing, etc. • Why we chose it? The idea of music database arose out of common interest of project members in Music (Sangeet). The concept seemed different and very interesting right in the first go.
  • 4. Applications Supported… • Online music listening • On demand music for streaming media • Music guide • Music quizzes • Karaoke (sing-along) players • Film and music studios i.e. music retailers • Music library •Music stores and internet radio
  • 5. Overview of Project • Concentration on online music streaming • Songs added by admin, accessed by registered users. • Search a song as per its album, genre, lyrics, artist • Can create playlists • Can download and share songs • Select and maintain favorite songs • Users can contribute by uploading the lyrics • Users can maintain their music files on their account
  • 8. Other Schema Labels Data Genre Data Files and Images Data Human Resources Schema Users Data Admin Data Artist Data Music Schema Playlist Data Lyrics Data Albums Songs Data Data Management
  • 9. Technical Glossary TOOLS & IDE USED : 1.pgAdmin III 2. SQL DEVELOPER 3. NOTEPAD++ 4.MySQLWorkbench DATABASE USED : 1.ORACLE 11g (PL/SQL) 2.MICROSOFT EXCEL 2010
  • 10. Tables In ER- Diagram The Most Important Tables in our project: •Songs (Title, Length, Album, Genre, Download Permit, Share Link) •Albums (Name, Release Date, Length, Total Tracks, Genre, Label, Image) •Playlists (User Id, Name, Favorite Flag) •Artist (Name, Total Songs, Total Albums, Image)
  • 11. Few Other tables are: • Users (Name Details, Authentication, Last Login, Active Status) • FrequencyHeard (User, Song, Album, Count, Week No) • SungBy (Song, Artist, Album) • Includes (Playlist, Song, Album) • Images (Name, Location Address) • Genre (Name) • Usertype (User position) • UserFiles (Name, User, File size) Table Description (contd..)
  • 13. ER Diagram (Final Draft) --------||
  • 14. • Most common song searches according to various factors. • Most Selling Label i.e. label producing max music albums which make it to users' playlists or favorite list. • Recommend albums to the user based on his favorite genre • Check if a new file can be uploaded based on the storage space allotted to him as per the user type and if it can then insert the file in his storage space • Find the artist with max songs for a user/ Find an artist the user is the biggest fan of as per his favorite playlist Application Logic And Reports
  • 15. Reports Example Recommend albums to the user based on his favorite genre OUTPUT Create or Replace Procedure Fav_Album (P_ID IN NUMBER G_name OUT VARCHAR2) AS V_Album_ID Number; V_Playlist_ID Number; Out_Album_Name Varchar2(20); Begin Select playList_Id INTO V_Playlist_ID from PlayList Where user_Id = P_ID AND FavFlag=TRUE; Select Count(Album_Id ) , Album_ID INTO V_Album_ID From Includes Where PlayList_Id = V_Playlist_Id AND ROWNUM=1 Group by Album_id Order by Count( Album_id) DESC Select Genre_Id INTO V_GId from Albums Where Album_Id = V_Album_ID Select AlbumName INTO Out_Album_Name from Albums where Genre_Id = V_GId AND Album_Id NOT IN (Select Distinct(Album_Id) From Includes Where Playlist_Id = V_Playlist_Id Order by ReleasedDtDesc; G_name := Out_Album_Name ; END Fav_Album;
  • 16. Application Logic And Reports create view New_Release as select * from (select * from Albums Order by ReleasedDtdesc) as desc Where rownum< = 25; Create a VIEW that lists 25 newly released albums
  • 17. Reports Example Create Or Replace Procedure FILE_INSERT ( ID IN NUMBER , V_Filename In VARCHAR2 , FILE_SZ IN NUMBER) Return Integer IS Count_SizeNumber(20); BEGIN Select Sum(FileSize) INTO Count_Size From UserFiles Where User_Id = ID; IF UserType_Id = 'Admin' Then If Count_Size< 1000 AND (1000 - Count_size) >= FILE_SZ Then Insert Into UserFiles (Filename, User_id, FileSize) Values (V_Filename, ID, FILE_SZ); End If; Else If count_Size< 250 AND (250 - Count_size) >= FILE_SZ Then Insert Into UserFiles (Filename, User_id, FileSize) Values (V_Filename, ID , FILE_SZ); End If; End If; End FILE_INSERT ; Check if a new file can be uploaded based on the storage space allotted to him as per the user type and if it can then insert the file in his storage space OUTPUT
  • 18. Reports Example Create Or Replace Procedure Artist_Max_song (ID IN NUMBER)IS A_NameVARCHAR2(50); Begin Select Name INTO A_Name From Artists Where Artist_id in (Select Artist_id from Artists Where Artist_id in ( SelectArtist_id From SungBy Where Song_id in ( SelectSong_id From Includes Where PlayList_id = (Select PlayList_id From PlayList Where User Id = ID AND FavFlag= TRUE))) Group ByArtist_id Order By Count(Artist_id)) Where RowNum<=1 END Artist_Max_song; Find the artist with max songs for a user/ Find an artist the user is the biggest fan for every particular user as per his favorite playlist OUTPUT
  • 19. Application Logic And Reports select name artistName from (select * from (select a.name, sum(sf.songFreq) artistFreq from (selectf.Song_id, sum(f.count) songFreq from FrequencyHeard f where weekno = to_number(to_char(sysdate,'WWYYYY')) group by f.Song_id) sf joinsungBysb on sb.song_id = sf.song_id join artists a on a.artist_id = sb.artist_id group by a.name) af order by af.artistFreqdesc) whererownum = 1; Billboard’s (likewise) Most Heard Artist of the week OUTPUT
  • 20. Application Logic And Reports CREATE OR REPLACE FUNCTION DEACTIVATE_USERS RETURN INTEGER AS BEGIN UPDATE USERS U SET U.ACTIVESTATUS = 'N' WHERE SYSDATE - U.LASTLOGINDT > 365 * 5; -- Deactivate users who have not logged in for 5 years. EXCEPTION WHEN OTHERS THEN null; -- Do Nothing END; RETURN NULL; END DEACTIVATE_USERS; Function to deactivate a user id if he has not used the website for a long time
  • 21. Application Logic And Reports CREATE OR REPLACE PROCEDURE UPDATE_LAST_LOGIN (USER_ID NUMBER) AS v_userId USERS.USERS_ID%TYPE; BEGIN v_userId := USER_ID; UPDATE USERS U SET U.LASTLOGINDT = sysdate WHERE U.USERS_ID = v_userId AND U.ACTIVESTATUS = 'Y'; EXCEPTION WHEN OTHERS THEN null ; END; END UPDATE_LAST_LOGIN ; Update the last account status after every login by a user
  • 22. Application Logic And Reports CREATE OR REPLACE FUNCTION AUTHENTICATE (VAR_EMAIL VARCHAR2, VAR_PASSWORD VARCHAR2) RETURN NUMBER AS v_user_pwd USERS.PASSWORD%TYPE; result number; BEGIN SELECT U.PASSWORD INTO v_user_pwd FROM USERS U WHERE U.EMAIL = VAR_EMAIL AND U.ACTIVESTATUS = 'Y'; IF v_user_pwd= VAR_PASSWORD THEN result := 1; ELSE result := 0; END IF; EXCEPTION WHEN OTHERS THEN -- If the email Id is invalid then the select query will throw no data found exception result := 0; END; END AUTHENTICATE; Function to authenticate user details while log in
  • 23. Future Scope • Search a song by melody (entering notes, whistling, tapping rhythm) • Making music buddies on the basis of similar music interests • Commenting the playlists, rating and reviewing the albums • Creating chat rooms to discuss about upcoming or newly released albums/records • Providing licensed music streaming and downloads by admin
  • 24. Lessons Learned • Application of the knowledge of database design. • Intelligent database design to serve the purpose of the applications that depend on it. • Generation of data – Arrays used to create random data for • Applying knowledge of writing SQL queries and functions – using joins to combine data from multiple tables • Functions – Generic reports that take input parameters to produce corresponding results