Welcome! Log In Create A New Profile

Advanced

Database Creation

Posted by Kayc78145228 
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
Database Creation
September 06, 2013 11:59AM
Hi All

Are we allowed to use Web Editor phpMyAdmin to create our own database..?
avatar Re: Database Creation
September 06, 2013 12:21PM
That is the fastest and easiest way to create your database. You can use a script also, but it is far easier with phpMyadmin.
Re: Database Creation
September 06, 2013 12:30PM
I am very familiar with databases and running sql scripts, just want to know if I can use phpMyAdmin.
The thing is I don't need to test my self on using scripts
avatar Re: Database Creation
September 06, 2013 12:32PM
Yes you can. You will only submit your php files, not your database files.
Re: Database Creation
September 09, 2013 01:58PM
Thanx AlexB
Re: Database Creation
September 17, 2013 01:11PM
Hi there,

The course_student table seems to be a major key as to whether the " The Portfolio " functions properly or not.
I have a little database experience, but the correct use of the table with the Many to Many relationship as well as
maintaining Referential Integrity I'm finding difficulty with. Would it be out of place to open a discussion on this rather
than ask a specific question?

CharlesU
avatar
Mac
Re: Database Creation
September 17, 2013 04:15PM
smiling smiley

As its stands, and I am not implying that wrong approaches are taught, the db has been set up to force you to learn certain coding skills (e.g. using joins - but I will not penalize you for not using joins in an introductory course).There are many outstanding issues which we cannot possibly hope to cover in a short course (let alone a full course - which is why my diploma courses stretches over 2 semesters). Referential integrity and db normalization are just two issues - but they are not easy to teach nor learn. This course therefore focuses on basic coding skills (and logic). That said, you are required to state "improvements" in a document - whether it be code or db related. This counts 20% of the mark.

You are most welcome to open a discussion! But first - what is wrong in this db schema below - primary key first column in every table smiling smiley

Language: PHP
CREATE TABLE categories ( categoryID categoryName );   CREATE TABLE products ( productID categoryID productCode productName listPrice );   CREATE TABLE orders ( orderID customerID orderDate );   CREATE TABLE categories ( categoryID categoryName );   CREATE TABLE products ( productID categoryID productCode productName listPrice );   CREATE TABLE orders ( orderID customerID orderDate );   CREATE TABLE customers ( customerID emailAddress password firstName lastName shipAddressID billingAddressID );   CREATE TABLE addresses ( addressID customerID line1 line2 city state zipCode phone disabled );   CREATE TABLE orders ( orderID customerID orderDate shipAmount taxAmount shipDate shipAddressID cardType cardNumber cardExpires billingAddressID );   CREATE TABLE orderItems ( itemID orderID productID itemPrice discountAmount quantity );   CREATE TABLE products ( productID categoryID productCode productName description listPrice discountPercent dateAdded );   CREATE TABLE categories ( categoryID categoryName );   CREATE TABLE administrators ( adminID , emailAddress password firstName lastName );
Re: Database Creation
September 17, 2013 05:05PM
Hi Prof mac,

When you lay it out like that, things do look a lot simpler. Happy you picked up what was really worrying me!
Anyway the tut letter states: First priority is that it must work, I'm sure I can get that right. Then I'll go for detail.
Look forward to taking the next course, which will be over at least a year.

Thanks,

CharlesU
Re: Database Creation
September 27, 2013 10:09AM
Hi ,

This JOIN produces this: "Surname_ ". Is the JOIN incomplete or is another JOIN required to display the courses?
I've used full table names to keep track of what I'm doing!

Language: PHP
$query =
Language: SQL
"SELECT student.sname,course_student.cid " . "FROM student LEFT JOIN course_student " . "ON course_student.cid=student.sname ";


Language: PHP
$result = mysql_query($query) or die(mysql_error());   while ($row = mysql_fetch_array($result)) { print $row['sname']."_".$row['cid']; print"<br/>"; }
avatar
Mac
Re: Database Creation
September 27, 2013 10:25AM
A course id can never be equal to a surname ...
Re: Database Creation
October 08, 2013 08:16PM
Hi.

Just one Question regarding the Course_man is the database.

The course_man should also be updated when a new student registers for a course.

the fields sno= the students AUTO_INCREMENT number cid= Course AUTO_INCREMENT number, year= the day the user registered?
avatar Re: Database Creation
October 09, 2013 09:15AM
The course_man page is just for keeping details of all your courses. So when you add and delete courses this happens on this page and this will also affect the database connected to the fields that you need to provide.

The course_student table holds all your registration information.






78185106 Wrote:
-------------------------------------------------------
> Hi.
>
> Just one Question regarding the Course_man is the
> database.
>
> The course_man should also be updated when a new
> student registers for a course.
>
> the fields sno= the students AUTO_INCREMENT number
> cid= Course AUTO_INCREMENT number, year= the day
> the user registered?

___________________________________________________________________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning...
Re: Database Creation
October 09, 2013 09:34AM
Hi Thanks

sorry I meant the course_student
avatar
Mac
Re: Database Creation
October 10, 2013 09:06AM
The year the student does the course (we assume it is year courses)
Sorry, only registered users may post in this forum.

Click here to login