This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Which database server are you using? In oracle, unlike cascade delete, there is no straight forward way for cascade update. You may have to write trigger to overcome this issue if you want to handle this in database level for cascade update.
If you have a unique number for each student, you don't need the surname in both places. Keeping it in the student table and using the id in the attendance table means that data is only in one place. And on ly needs to be changed in one place.
For more information on this topic, search for "normalization."
Joined: Apr 11, 2005
Thanks, thats quite a good idea, I'll see if it works.
Hello, few suggestions here, hope this could help:
1. If you're using the attendance table to monitor student's attendance in a given time, i suggest that you just add another column inside your students table( for e.g. attendance) having a data type of boolean. By doing this, you can just set it to true or false without worrying updated fields when an update occurs.
2. On the other hand you can also use a foreign key inside the attendance table which must be referenced to the student table's primary id. This will allow you to get the fields from the child table which is the student table. Here's a good link that teaches database design tutorial hope this could help you as well: http://www.visualcase.com/tutorials/database-design-tutorial.htm