Jump to content
Server Maintenance This Week. ×

ER diagram and its relations


This topic is 4951 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello,

this is the diagram of an online bookstore I made.

bookstoreEnglishPic.jpg

There are some simple business rules applied:

Customer can order many products(Items).

An Item is considered book, cd, dvd, e-book,...

Customer can have many addresses.

Item can have one author ( for now, i will maybe expand this to many authors, which is logical i think), one publisher and many translators.

Also, the item can be in many categories.

I think it's all in 3NF, maybe there could be problem in the Customer table with the email and username attribute.

The real problem is in the entities and their relations. I have two problems. I dont know if the ordering process is connected right, and the customer's payment methods (consider that there are not all attributes in the payment method table for now).

Any ideas or corrections? Advices?

Thanks, Matic

Link to comment
Share on other sites

The real problem is in the entities and their relations. I have two problems. I dont know if the ordering process is connected right, and the customer's payment methods (consider that there are not all attributes in the payment method table for now).

Your ordering process looks ok, but the payment process isn't clear.

Which table holds the dollar amount a customer pays? Is it Customer Payment Method?

Usually payments are made against invoices, not an entire Customer balance, which it appears you're doing.

Link to comment
Share on other sites

I don't understand why you have a join table btw Orders and Customers. Orders can have many Customers?

Conversely, can an Item have many Authors? Seems to me that they can.

Edited by Guest
Link to comment
Share on other sites

  • Newbies

Hello all, again.

Yes you are rigt, those many to many was the lapsus, i dont know why i made them. i corrected them.

Now i made some modifications.. here is the pic

kepr.JPG

IDbasket is, I think, the same table as was Orders before. I wanted to create a db to support the Basket Cart. I dont know if i need to name it Orders? My philosophy goes like this:

later, the application will get the data to show the customer (who is browsing the page and putting items into basket) from the table Basket_Item, and identify the customer through Basket table. I dont know how software development goes, is there any meaning in my thinking? or better, is it possible to do like that?

thanks for the possible reply. regards

Link to comment
Share on other sites

This topic is 4951 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.