Hi, I have created database using the joins method. My database caontains 4 tables with the Artist(1),Album(2),Genre(or) BGM(3),Combination of all these and Track names in one table. I am having 4 tables as follows.
* "create table ALBUM(AlbumId integer primary key,Album text);" 21 Album1 22 Album2 23 Album3 * "create table ARTIST(ArtistId integer primary key,Artist text);" 10 Madonna 11 Artist1 * "create table BGM(BgmId integer primary key,Bgm text);" 31 rock 32 pop * "create table MUSIC(Id integer primary key,AlbumName text,Album_TypeId integer,ArtistName text,Artist_TypeId integer,BgmName text,Bgm_TypeId integer);" 1 Album1 21 Madonna 10 rock 31 2 Album2 22 Madonna 10 pop 32 If we want to delete a particular Artist from ARTIST table. I need to delete all the records corresponding with that artist name in MUSIC table also and we need to check for the albums and Genre(BGM) in Music are not present after deleting that particular Artist and delete the records in ALBUM and BGM Table . Consider I have an Artist Madonna in ARTIST table. the user wants to delete Madonna artist. Currently, 1.We are deleting Madonna in ARTIST table. 2.Weare first reading the album ids of Madonna and Bgm id's of Madonna in one buffer and then we are deleting that Artist Madonna in the MUSIC table. 3.Now we will check wheather that Album ids and BGM ids in buffer is still present in MUSIC table.If it does not present we will delete it in the ALBUM and BGM table.If it still exists we wont delete it in ALBUM and BGM table. But if we do like this we got the desired result but buffer size is incresing if records are increasing. Is there any other method to solve deletion in multiple table. Can anyone of you suggest how i can do the deletion. Best Regards, A.Sreedhar.