Welcome! Log In Create A New Profile

Advanced

Project

Posted by Anonymous User 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Anonymous User
Project
October 08, 2008 04:28PM
hi,

could anyone explain to me what will the field year hold in the Table course_student for the final project. Because it shows that it must be a primary key, According to my understanding it can't be the year which the student is registering for cause that won;t work as a primary key. (It won't be unique.)

Mamog
avatar
Mac
Re: Project
October 08, 2008 05:11PM
Just use the dump below that table in the tut letter to create your db.

But it is a good question which requires a longer answer....

It simply means that the field cid, as used in the course_student table, refers to cid in the course table (WHERE IT IS a primary key). So, as you correctly point out, it cannot be a primary key here alone - we just refer to its original implementation as a primary key in the course table.

Confusing? You bet it is.... but you better get used to it. Our aim is to "gently" confuse you to the extent where you Google until you learn the truth....

I wish we could spend more time on mysql - but then this will have to be a 2-year course. So we just provide you with the very basics to pull the information out of the db to manipulate with PHP. SQL (as in mysql) is a course on its own - you can code less if you understand SQL more, but then coding more (initially, at least) has other benefits.

Sooner or later you will find this out yourself - you will code stuff, and as you become used to it, you will ask yourself - hey, SURELY there is an easier way (in terms of coding OR SQL quries) of doing this???? We merely provide you with the foundation so that you are in a position to start asking those questions.

Your question here above tells me you are starting to ask those questions smiling smiley
Anonymous User
Re: Project
October 09, 2008 09:30AM
hi,

Mac, thanx for your explanation. One other thing would you correct me if i am wrong, in the table student, i think it is miss one field that will hold the courseNameID which will be linking to the table course to get the name of the course the student applied for.
Just like you have stated that the student registration page should have a form with course name field.
avatar
Mac
Re: Project
October 09, 2008 12:03PM
No.the student table only holds information about the student, as the course table only holds information about the course. the course_student table links a course to a student.
Re: Project
October 09, 2008 07:11PM
have started working on the layout for the assignment & i have a question about the way the site is to be used; is the site primarily intended for the use of an administrator or is it a site open to both students registering as well as administrators making amendments?
1)- i'm wondering about the fact that the database is to be accessed by various persons with varying degrees of priviledges. presumably, if administrators are to edit course/student data, it is necessary to have them logon so as to prevent unauthorised persons making changes to the database. however, it will then be necessary for students to logon also in order to register data into the database? how do you still provide access to the db (for reg purposes) if you limit access by means of logon?

2)- somewhat relating to the question from Mamog at the top of this thread - at what point does the student data link to the course data? (i can register new students & see them in 'student' table; i can add/delete courses & see them in 'course' table, but no data in 'course_student' table). do i understand correctly that you're mainly interested in seeing that we can link to the various tables successfully?

tristan
Re: Project
October 09, 2008 09:50PM
The way I see it is as follows.
When you register as a student you select a course from the course table to register for.
You then complete the rest of the form with the details for the student table.
When you save your registration form you must insert the student info in the student table as well as the link between the student and the course tables in the course_student table.
avatar
Mac
Re: Project
October 10, 2008 07:04AM
A logon just prevents access to a page - not to a datbase. You don't have to add a logons since we did not cover it, but of course, from an administrator viewpoint there would need to be some form af access control otherwise anyone can do what they want.

Also, strictly speaking, if I regsiter as a student I would need to enter my information (normally a student number but it could be my id and surname) to access my information so I can make cnages.

No need for all of that here.

When a student registers, he enters his personal information which is saved in the students table. He also registers for a course. Admin can add and delete courses. So the choices of course he is presented for is pulled from the courses table. His choices are saved in the course_student table. You need to write all that allows that.
Re: Project
October 10, 2008 01:07PM
Apologies! on re-reading i realised that there is a field on the registration form for selecting a course. now i just have to figure out how to insert the course data into the dropdown list; this has me stumped for the moment. anyone have any helpful hints?
also, in order to edit student data, i'm trying to make an edit form which is like the registration form, but with all the data in the fields so that changes can be made to whichever of the fields need changing (in other words, you're presented with a registration form where all the fields have been filled, but can be changed). how do i pull the data off the database and into the reg form? or is this not a viable way to edit the data? any suggestions here?
same goes for the course data; there's not much to edit here though, seeing as there are only 2 fields & the one is the auto increment cid, which i assume is not editable anyway. so all you can really change is the cname?

tristan
Anonymous User
Re: Project
October 16, 2008 04:19PM
Hi Mac,

Just want to be sure when is the due date for the final project, i am done just busy with the styling.

Mamog
Sorry, only registered users may post in this forum.

Click here to login