Apply all steps of conceptual and logical database design on the following requirements: 
The system should be able to store a customer’s name, address, and contact information and a book’s ISBN, publisher, authors, and title information. A customer should be able to purchase one or many books at a time. The system should store the purchase record of customers. It should give us the information in which shelf the book is lying by storing the shelf’s number, floor, and category information. Books are supplied by suppliers. They are stored in the stock. Number of books are deducted from the stock quantity as they are sold. Additional books are demanded from suppliers by looking at the stock record.

I know it is a stupidity to put this problem on c++ page but i got help from designer page so ...... i need a little help from programmers who know database.... I am stuck in this erd problem is only of stock , is stock an entity or attribute and if entity then what should i do and if it is an attribute then where should i place it , I guess book but i am not sure, please help me......

If you want help (with what obviously appears to be homework) show us what you have so far. We will usually help you with homework, but we won't do it for you.

I would recommend struct and vector personally. Create a struct for customers, a struct for books, an array of books for stalk, and a double for your money. Store customers into a vector of customers as they come. Customer's struct should include the book they bought(using the struct for the book you made earlier). When a customer comes, get his/her information, store into the vector of customers and take away one value from the stalk of the book he bought (remember, the stalk is stored in an array, so you'll have to search the array for the book then take away one from it). Take the how ever much money the book costed from the customer(add it to you double that you made to store money). When the program detects that the stalk of a book is getting low, it will pay money to the suppliers to get an amount of that book(subtract it from the amount of money you have).

That's how I would go about doing it... If I did it wrong, someone please scold me =).

I have made an erd having book,cutomer and shelf but i am confused in stock , i dont need any one to solve it completly but just tell me about stock , is stock a entity or attribute ?

Stock would normally be the 'on hand quantity' of an item. (In this case a book title.) A related concept is Stocking Level which is the amount of an item that we would like to keep 'on hand'.

Stock could be an attribute of a book title, but not of a particular book. So the answer depends somewhat on your ERD.

If a record in book represents a particular physical book (i.e. if you have 3 copies of 'War and Peace' you have 3 records so that you can represent where each of the copies are) then stock cannot be an attribute of book, and will likely be an entity.

If instead a record in book represents a particular title and the shelf has a record for each book located there, then you can make stock an attribute of book.

If we think that all books are in shelf and we want to keep a stock_record then..... i think it will be an attribute then.