jimmyoneshot Posted May 13, 2010 Share Posted May 13, 2010 Hi I'm pretty new to database design but I was wondering if you guys could help me out with this by telling me if I've done this correctly. Basically I've produced my ERD of my final database showing all of the primary and foreign keys and the relationships, both in a graphical format and in text, in the upper right hand corner, where I've basically explained each relationship. Basically my application, which utitlises this database contains links, which have been created by the client/administrator via a seperate application. These links are held within categories. Users can log on and view all of the client-added links but they can also create their own links which only they will be able to see. Each user can also add comments to each of the client-created links but obviously not the user created links as they can only see their own. Judging by all this have I made the following erd correctly or are there any mistakes in the design in the opinion of you guys? Also the userlinks table is a join table by the way. Have I shown this correctly? I'm not totally sure on how to post images here so heres a link to my photobucket image of the erd.:- http://i223.photobucket.com/albums/dd147/jimmyoneshot/erdpic.jpg [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/201635-entity-relationship-diagram-help/ Share on other sites More sharing options...
jimmyoneshot Posted May 17, 2010 Author Share Posted May 17, 2010 Can anybody give me a hint? It doesn't seem like anything really complex I'm just trying to see if I'm on the right lines. Quote Link to comment https://forums.phpfreaks.com/topic/201635-entity-relationship-diagram-help/#findComment-1059714 Share on other sites More sharing options...
Mchl Posted May 17, 2010 Share Posted May 17, 2010 I don't like the smell of users.detailsviewableto and users.linksviewableto. It look like something that should be moved to separate tables. Other than that looks fine. Quote Link to comment https://forums.phpfreaks.com/topic/201635-entity-relationship-diagram-help/#findComment-1059722 Share on other sites More sharing options...
jimmyoneshot Posted May 18, 2010 Author Share Posted May 18, 2010 Cheers mchl. Actually those fields were named incorrectly really. I've since renamed them to 'detailspublic' and 'linkspublic'. They are basically boolean/tinyint fields which decide whether that specific user's details or links are private and only viewable to themselves or public and viewable to all users of the system i.e. 0 = private and 1 = public. Quote Link to comment https://forums.phpfreaks.com/topic/201635-entity-relationship-diagram-help/#findComment-1059998 Share on other sites More sharing options...
Mchl Posted May 18, 2010 Share Posted May 18, 2010 That makes more sense then. Quote Link to comment https://forums.phpfreaks.com/topic/201635-entity-relationship-diagram-help/#findComment-1060016 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.