Referential Integrity Database HELP! (1 Viewer)

tooheyz

- kmart supervisor -
Joined
Jan 6, 2003
Messages
3,072
Location
eBay.com
Gender
Female
HSC
2003
hey everyone... i'm reduing my databse coz the whole class failed :mad:

well anyway, i know what referential integrity is, but how do i enforce it into my database?

for thos who dont know, referential integrity is a set of rules to keep relationships valid... e.g. you cant enter a value in the foreign key is it doesnt exist in the primary key in the primary table...

or if u didnt undestand that...

you cant change the value of a primary key if that record has related records.
 

del

Member
Joined
Jul 8, 2002
Messages
412
Gender
Undisclosed
HSC
N/A
are you doing your database in Access?
'cos if you are when you do your relationships, make sure referential integrity is ticked and it'll make sure you can't delete a record if a related record exists in another table etc etc........
 

tooheyz

- kmart supervisor -
Joined
Jan 6, 2003
Messages
3,072
Location
eBay.com
Gender
Female
HSC
2003
ah got it... haha thanks man! it was alittle box - i couldnt see it
LOL
 

tooheyz

- kmart supervisor -
Joined
Jan 6, 2003
Messages
3,072
Location
eBay.com
Gender
Female
HSC
2003
nah its like... when you change something in one table, the details in the other changes accordingly as well...
 

del

Member
Joined
Jul 8, 2002
Messages
412
Gender
Undisclosed
HSC
N/A
which in turn somewhat helps reduce data redundancy
 

del

Member
Joined
Jul 8, 2002
Messages
412
Gender
Undisclosed
HSC
N/A
yeah

by having referential integrity, it ensures that your relationships are valid... ie if you have 2 tables that are meant to have a 1 : 1 relationship, it ensures that only that can occur....

whereas if you didn't have it, then you could literally 1 : n relationship (which would be data redundancy as some of the links wouldn't be valid) as theres nothing ensuring the integrity of the relationships....
 

Taz

ThankGodItsNotStill2003
Joined
Feb 28, 2003
Messages
57
Location
In front of my computer!
How did u r whole class manage to fail? What did u have to do 4 ur assessment task. I have mine for databases coming up soon and we have to do a practical where we have to normalise a flat file database and link the tables, we have to do a few queries, a form and maybe a report. Then we have a small written test.
:cool:
 

tooheyz

- kmart supervisor -
Joined
Jan 6, 2003
Messages
3,072
Location
eBay.com
Gender
Female
HSC
2003
well you see, out teacher is an idiot. he gave us the assignment and we didnt know ANYTHING. he didnt even teach us ANY about DATABASES, and he just gave us the assignment and said .. DO IT .

i do IT, so i have some stuff behind me... but the whole class didnt too good... we went into class the day after it was due.. and he said "YOU ALL FAILED" :chainsaw:

yeah but i know my mistake... i didnt enforce that referential intergrity stuff... i got 4/10. the highest being 5/10. what does that say about the teacher man?
:mad:
 

Taz

ThankGodItsNotStill2003
Joined
Feb 28, 2003
Messages
57
Location
In front of my computer!
What a bastard!!! I would hate to have your teacher.

Didnt you do databases in the prelim course though. We did a huge topic and an even bigger assessment task on them in yr 11 and now we r doing em again in yr 12.
 

tooheyz

- kmart supervisor -
Joined
Jan 6, 2003
Messages
3,072
Location
eBay.com
Gender
Female
HSC
2003
nah we didnt do databses in year 11... were we meant to? yeah the teacher really is a d**khead... we've lodged in a complaint letter just the other day.. and he's gonna get interviewed by the coordinator and the principal... this is the 4th complaint against his name... apparently the year 12s of 2002 complained heaps as well

but nah we didnt do databases in year 11... our skool is really REALLY behind LOL
 

Taz

ThankGodItsNotStill2003
Joined
Feb 28, 2003
Messages
57
Location
In front of my computer!
Yeah u should have done databases.
This is a list of all the topics you were supposed to do... or the ones that were in our textbook anyway (we did all of em except desktop publishing coz its vertially self explanitory):

Information prosesses and technology
1 Introduction to information skills and systems
2 tools for infomation processes
3 planning design and implementation
4 personal and group systems and projects

Application software
5 work processing
6 databases
7 spreadsheets
8 graphics
9 desktop publishing
10 multimedia
11 the internet

I dropped biology for yr12 coz my teacher was like ur ipt teacher. He put a sheet in front of us then pissed off for the lesson. :mad: It really sukd. It seems that theres at least one of these kind of teachers at every school... lol. :argue: :chainsaw:
 

tooheyz

- kmart supervisor -
Joined
Jan 6, 2003
Messages
3,072
Location
eBay.com
Gender
Female
HSC
2003
Originally posted by big_will08
:( so i guess i wasnt much help then tooheys!??

ahahah hey dude! thanks for your help, its just i havent been doing my database! its due in 2 days time and i havent touched it since mid last week... i think i'll do it tonight - if any problems should pop up in my face again, you will be the first person i will go to :D
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top