Welcome! Log In Create A New Profile

Advanced

Third Table of the portfolio

Posted by BellaMogale 
Announcements Last Post
Announcement : Programming Students at UNISA School of Computing 06/19/2019 02:01PM
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
Third Table of the portfolio
March 19, 2013 03:23PM
Hi

Just wanted to find out about the fields required for the third table of the database, we are given two fields and the third one we have to choose our own, they gave us an example with looks more like the postions field in the player table.... any ideas what is required for the third field?
avatar Re: Third Table of the portfolio
March 19, 2013 09:14PM
I think it depends on the type of sport you chose so ti's all up to you. smile

----------------------------------------------------------------------------------------

int get_random_number() {
return 4;
}
avatar
Mac
Re: Third Table of the portfolio
March 20, 2013 08:05AM
Yes. You can name the table anything you want.

Then you need to add fields (note not necessarily just one field, it can be more) as required by the type of team you have selected.
Re: Third Table of the portfolio
March 20, 2013 03:30PM
Hi fellow students, and great lecture.

On the matter of tables, like the third one as it is, do we have to add fields manually to it, is it an only option? or are we encouraged to join tables if its possible of joining the third table with the first one which has players inserted to it already? and just a WHERE clause to achieve desired queries?
avatar
Mac
Re: Third Table of the portfolio
March 20, 2013 04:14PM
One should always separate information in pursuit of database normalization

http://www.guru99.com/database-normalization.html

It is a bit confusing, and the suggested structure may even be improved (it does not follow all the rules of normalization . I have purposely provide the given structure to force you to learn important PHP skills.

So in short, stay in the suggested structure.

Point is, there is much to learn, and in 4 months (8 months with ICT3612) and a student inclination (not you smiling smiley) to just get the portfolio in at all cost, I have to balance what I want to teach you. The rest, if you are keen, you will pick up yourself.
Re: Third Table of the portfolio
March 25, 2013 02:40PM
Ok thank you guys....
Re: Third Table of the portfolio
April 09, 2013 09:46AM
Ok

So I have tried it again Mac it just doesn't make sense, Team selection, then it depends on the sports you choose? maybe im just slow its not making sense , please advise
avatar
Mac
Re: Third Table of the portfolio
April 09, 2013 10:19AM
Well, you choose netball:

A minimum of 5 and a maximum of 12, with 7 players on a court at each end. Google for such info.

Create a table can take 12 players (selected).
Write code to select a team. Add fields to associate the team selected with a fixture.
Re: Third Table of the portfolio
April 10, 2013 08:55AM
Finally smileys with beer

Thank you so much makes much more sense.... Much appreciated
Re: Third Table of the portfolio
April 11, 2013 07:41PM
Hi Mac

Ok, not regarding the third table but I am wondering and hoping if I can change the data types within the tables...
firstly I would like to use a varchar (10) for my date as I am saving the full year and if using varchar the '/' between the date also counts as characters.
is changing the length of the field allowed?

and with the password... is only 6 characters, can this be increased to allow me to use md5() encryption...
this is less important, but thought it is good idea to encrypt the password in the db?

thank you
avatar
Mac
Re: Third Table of the portfolio
April 12, 2013 10:08AM
You can change it if you want yes, no problem
avatar Re: Third Table of the portfolio
April 15, 2013 07:38PM
mac Wrote:
-------------------------------------------------------
> You can change it if you want yes, no problem

Hi Mac

Quick question, how exactly do you change the datatype or length of a row after creating it i.e. the date question Bella posed?
avatar
Mac
Re: Third Table of the portfolio
April 16, 2013 07:59AM
That is done when you create the db with phpmyAdmin.
avatar Re: Third Table of the portfolio
April 16, 2013 05:34PM
Ok, PHPmyadmin - is it the only way to create a DB? I've installed MySQL, the latest version and have completed my DB with that program. I just got phpmyadmin now. Do I need to recreate the DB with it or can it simply access my already created DB from MySQL?
avatar
Mac
Re: Third Table of the portfolio
April 17, 2013 08:28AM
Creating a db via mysql command line is a bit tedious - phpmyadmin mjust faster. It is irrelevant what you use.
Re: Third Table of the portfolio
May 07, 2013 09:08PM
Good Day, Fellows

Are we limited to the number of table we are allowed to use?
I think I will need more tables for my project, more especially when designing the fixture.php solution.
I need the fixture name/description, opponent name, date, time, venue, selected team for the fixture. I can go on the whole night. Having all this fields on one table will be a mess.

Please help. Are we limited?
avatar Re: Third Table of the portfolio
May 08, 2013 07:15AM
Malaga01 Wrote:
-------------------------------------------------------
> Good Day, Fellows
>
> Are we limited to the number of table we are
> allowed to use?
> I think I will need more tables for my project,
> more especially when designing the fixture.php
> solution.
> I need the fixture name/description, opponent
> name, date, time, venue, selected team for the
> fixture. I can go on the whole night. Having all
> this fields on one table will be a mess.
>
> Please help. Are we limited?


I don't think it will be a mess mate. Rather stick to the requirements. I also don't think Mac will mind if you have more than required though, he might. For the sake of uniformity, let your tables look much the same as well IMO. One table can have fixture attributes without being too long. Aim to keep it simple and look closely at the guidelines in the TUT letter for the fixture table/page...
avatar
Mac
Re: Third Table of the portfolio
May 08, 2013 08:13AM
A table can have as many fields (or columns) as you require. What is important is that the table is "normalized" - i.e. avoid having the same data duplicated in the same table. If so, you have to set them up in different tables and define relationships among these tables.

See this explanation http://stackoverflow.com/questions/246701/what-is-normalisation-or-normalization

The 3rd table will use the fixture id and NOT the rest as you suggested. If the venue/date/opponents is updated in the fixture table, it will be correct in the 3rd table because you only update it in one place (the fixture table), as opposed to having to update these in multiple rows in the 3rd table.

Strictly speaking, the position field should be an INT (you would use the player id), but I suggested TEXT just to make some things easier. But you can change it.
Sorry, only registered users may post in this forum.

Click here to login