Jump to content

tabellen normalisatie


paulus4605

Recommended Posts

Ik zou een database moeten maken die de reserveringen van een hondenpension voor zijn rekening neemt.

 

tot op dit moment heb ik dit uitgedokterd mijn vraag is of ik hier op de juiste weg zit,

 

tabel eigenaar

 

Owner_id

Owner_Firstname

Owner_lastname

Owner_phone

 

tabel Hond

Dog_id

Dog_name

Dog_gender

Dog_pregnant

Dog_chip

Dog_vacination

Dog_antiFlea

Dog_caracter

Dog_request

 

tabel reservation

 

res_id

Owner_id

dog_id

Res_start_date

res_end_date

 

 

alvast bedankt voor jullie hulp

Link to comment
Share on other sites

Your design is fine.  However, dogs, are owned by an owner, so it would be useful for you to have Owner_id as a foreign key in Hond.  If you did that, you would not need the owner_id in the reservation table, as it would already be available in the hond table. 

 

You would also need to determine whether or not an owner with multiple dogs should have multiiple reservations.  If you don't want that then your structure would need to be modified.

Link to comment
Share on other sites

I mocked this up quickly for you.  See attachment for diagram and sql file.  You probably want to look at the datatypes of attributes in hond.  A lot of those columns look like they need to be normalized out -- for example, vaccination or flea.  Not sure what those are supposed to represent or what the datatype is suppossed to be, but you can edit the sql file appropriately.

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

Hi Gizmola

 

thanks for the great help in this I really apreciate it.

 

do you know by any chance a site or an howto that I can use to create a booking system where you can see if there is still room to vacant the dog and update outlook through ics?

 

thanks again for your help

Link to comment
Share on other sites

paulus,

  Sorry don't know about any sites that describe something like that. I have done a lot of db design in my career, so I know the rules and techniques for approaching design.  There are some good books you can get to help you.  I've heard good things about these books, although I realize that they are in english, and I don't know if that's a major impediment for you or not:  http://www.amazon.com/Modeling-Essentials-Third-Graeme-Simsion/dp/0126445516/ref=ntt_at_ep_dpt_1 or http://www.amazon.com/exec/obidos/tg/detail/-/0932633188/qid=1070731645/sr=1-1/ref=sr_1_1/002-0849587-1157654?v=glance&s=books

 

Unfortunately books like this tend to be costly, due to the limited market for them.  Once you have a solid understanding of the basic rules, you can create a data model to handle any requirement, however there is an art to it, and no shortcut other than experience.  I designed lots of systems and worked other developers who understand data modeling, and could challenge my designs.   

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.