Jump to content

Database? GAAAAH HALP PL0x

TechSage

So, a guy asked to me to computerize (code it myself)  a chess tournament he runs (1700 kids). Now, in order for this to work. All the data, needs to be stored in a server, my question is, where do I start coding? I need to design the different pages (list of students, attendance, win/loss, score). I'm so confused as to where I code and I was going to do this in Python but I think PHP is a better idea since it's a server based language (I don't know PHP). He's getting the server and everything.

There are 10 types of people in this world, those who understand binary, and those who don't.

Link to comment
Share on other sites

Link to post
Share on other sites

If you wanted to be simple you could just set up a spreadsheet showing it.

Diamond 5 in League :)

Link to comment
Share on other sites

Link to post
Share on other sites

If you wanted to be simple you could just set up a spreadsheet showing it.

It needs to be accessed by multiple people, and the server will be doing all the pairing of the kids (picking by calculating win/loss and stuff) his I.T friend is making the algorithm since it's very complex, but I'm doing the rest. 

There are 10 types of people in this world, those who understand binary, and those who don't.

Link to comment
Share on other sites

Link to post
Share on other sites

It needs to be accessed by multiple people, and the server will be doing all the pairing of the kids (picking by calculating win/loss and stuff) his I.T friend is making the algorithm since it's very complex, but I'm doing the rest. 

mmm.

Diamond 5 in League :)

Link to comment
Share on other sites

Link to post
Share on other sites

Make an access database. Create the tables and insert known information. If it's a web based application, then have it link to the access database. It seems pretty simple, besides the pairing algorithm, which you insert in and probably do with c#

CPU Intel Core i7-4790K Motherboard ASUS Saberthooth Z97 Mark1 RAM Corsair Dominator Platinum 16GB @ 2133MHZ GPU 2 X MSI GeForce GTX GTX 980TI GAMING 6G SLI Case Phantex Enthoo Evolv ATX Storage Samsung 840 Pro Series 256GB / Western Digital Caviar Black 2TB PSU Corsair RM1000i Display Asus 4K PB287Q Cooling Noctua NF-A14 FLX & NF-F12 PWM /Thermaltake Water 3.0 Ultimate 360mm Keyboard Corsair K70 Mouse ROCCAT Kone XTD Sound Card Asus Xonar STX

Link to comment
Share on other sites

Link to post
Share on other sites

As usual in coding, many roads lead to Rome.

PHP and a database (e.g. MySQL) is actually not a bad instinct, I've done

that myself. The handy thing about that combo is that there are a ton of

tutorials and info about it out there, shouldn't be a problem to get a hold

of the required knowledge (and it's pretty easy to learn, although obviously

depending on what capabilities your application needs to have, it can still

end up being arbitrarily complex).

From what you're saying, it sounds like you'd also need to create a web

interface? That would be the domain of HTML and CSS. Getting the basic

functionality on that end shouldn't be too much of a problem, but depending

on how pretty and feature-rich it needs to be, you can spend an endless

amount of hours doing that (could even throw in some Javascript, although

I'd recommend using a library such as JQuery).

Can't say much about Python, never done any backend stuff with it, but

it should be feasible as well seeing as there are some large websites

running on it. Tutorials for PHP are more numerous though.

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

As usual in coding, many roads lead to Rome.

PHP and a database (e.g. MySQL) is actually not a bad instinct, I've done

that myself. The handy thing about that combo is that there are a ton of

tutorials and info about it out there, shouldn't be a problem to get a hold

of the required knowledge (and it's pretty easy to learn, although obviously

depending on what capabilities your application needs to have, it can still

end up being arbitrarily complex).

From what you're saying, it sounds like you'd also need to create a web

interface? That would be the domain of HTML and CSS. Getting the basic

functionality on that end shouldn't be too much of a problem, but depending

on how pretty and feature-rich it needs to be, you can spend an endless

amount of hours doing that (could even throw in some Javascript, although

I'd recommend using a library such as JQuery).

Can't say much about Python, never done any backend stuff with it, but

it should be feasible as well seeing as there are some large websites

running on it. Tutorials for PHP are more numerous though.

Okay, I'm not sure as to which language to learn next. I already know HTML and Python. This project needs to look good aswell as have login and passwords. As far as I can tell, Javascript is the cherry on top to HTML? And, are Javascript and JQuery the same concept but different? 

You listed many routes, even though it's up to me, I would like to know to what would YOU do in this scenario (I'm 17)

There are 10 types of people in this world, those who understand binary, and those who don't.

Link to comment
Share on other sites

Link to post
Share on other sites

Okay, I'm not sure as to which language to learn next. I already know HTML and Python. This project needs to look good aswell as have login and passwords. As far as I can tell, Javascript is the cherry on top to HTML? And, are Javascript and JQuery the same concept but different? 

You listed many routes, even though it's up to me, I would like to know to what would YOU do in this scenario (I'm 17)

From what you have described, I would go with PHP + MySQL as the backend,

and HTML + CSS (+ optionally javascript) for the interface.

Javascript is the language, JQuery is a library written in Javascript.

Basically it provides you with prewritten functions that make Javascript

more friendly to write (which, considering it's an utterly horrible

language from a syntactic POV, is very valuable indeed).

However: Caveat! Depending on your existing skillset and what the

end result needs to be, this could take a lot of time to implement,

especially if it needs to be secure and look nice. Those are two areas

where you can loose a lot of time with polishing small, but important

details.

As a reference, I made a website for my dad's small business last year,

based on PHP, MySQL, HTML, CSS and JS. I was a beginner at the project's

start, and overall it took me several hundred hours over the course

of a few months to implement. Not that this needs necessarily to happen

in your case, but just as a frame of reference from somebody who once

was in a similar position.

Be realistic about your goals and deadlines, that is very important.

I would still recommend my approach, but I also recommend setting

your priorities right to make sure it gets done on time. Don't be

afraid to cut features if you must, or seek help. Better to implement

fewer features well than to implement many features buggily.

If you feel that you don't have the time to do it like this, then

don't, choose an alternative. My way is not the only way, but as

you asked, it is what -I- would do.

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

One more tip if you decide to start with PHP and a SQL database: check

out PDO (PHP Data Objects). It's an OO database interface included in

PHP 5+ that is very powerful and should be able to simplify your database

access.

 

Seeing that you are used to writing Python, I take it you know a thing or two

about OOP. If so, using PDO will be a breeze. I only heard about it half a

year ago (after 2+ years of webdev classes in different languages), because

it's relatively new. Make sure you at least check it out ;)

Link to comment
Share on other sites

Link to post
Share on other sites

One more tip if you decide to start with PHP and a SQL database: check

out PDO (PHP Data Objects). It's an OO database interface included in

PHP 5+ that is very powerful and should be able to simplify your database

access.

 

Seeing that you are used to writing Python, I take it you know a thing or two

about OOP. If so, using PDO will be a breeze. I only heard about it half a

year ago (after 2+ years of webdev classes in different languages), because

it's relatively new. Make sure you at least check it out ;)

 

Hmm... I looked into it myself since I haven't heard about it that much but what's so different about it compared to regular mysql(i)_* ? To me it just seems like another protocol for dbs. Correct me if I'm wrong since I just quickly zoomed through the docs 

Link to comment
Share on other sites

Link to post
Share on other sites

Hmm... I looked into it myself since I haven't heard about it that much but what's so different about it compared to regular mysql_* ? To me it just seems like another protocol for dbs. Correct me if I wrong since I just quickly zoomed through the docs

Firstly, and most importantly: mysql_* is deprecated, insecure and should

no longer be used in production. For all intents and purposes, consider it

malware, or at least a very serious bug in PHP.

There are two alternatives to mysql_ these days in PHP: PDO and mysqli_*

If you're familiar with mysql_*, then mysqli_* might be easier to use,

since you can use it practically in the same manner (meaning, procedurally).

PDO is object-oriented, exclusively IIRC. But, if you wish, mysqli_*

can also be used in OOP-mode, it has a dual interface.

I'm not familiar enough with PDO and mysqli_* to really know the inner

differences between the two and why one might use one over the other.

PDO has the advantage that it's database-driver independent, meaning

you can use different database types with the same interface. mysqli_*

is MySQL-specific.

As said, both of these add some security to interfacing with databases

(for example, prepared statements), so use one or the other, but definitely

not mysql_*.

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

Firstly, and most importantly: mysql_* is deprecated, insecure and should

no longer be used in production. For all intents and purposes, consider it

malware, or at least a very serious bug in PHP.

There are two alternatives to mysql_ these days in PHP: PDO and mysqli_*

If you're familiar with mysql_*, then mysqli_* might be easier to use,

since you can use it practically in the same manner (meaning, procedurally).

PDO is object-oriented, exclusively IIRC. But, if you wish, mysqli_*

can also be used in OOP-mode, it has a dual interface.

I'm not familiar enough with PDO and mysqli_* to really know the inner

differences between the two and why one might use one over the other.

PDO has the advantage that it's database-driver independent, meaning

you can use different database types with the same interface. mysqli_*

is MySQL-specific.

As said, both of these add some security to interfacing with databases

(for example, prepared statements), so use one or the other, but definitely

not mysql_*.

 

When I said mysql_* I meant mysql_* and mysqli_*. I myself use mysqli_* for the reason you mentioned and ofcourse I've been using it for years now and PDO sort of reminds of me of laraval. Doesn't seem complicated at all to me I mean I had a quick look through the docs like I mentioned and the samples are pretty straight forward.

Link to comment
Share on other sites

Link to post
Share on other sites

When I said mysql_* I meant mysql_* and mysqli_*. I myself use mysqli_* for the reason you mentioned and ofcourse I've been using it for years now and PDO sort of reminds of me of laraval. Doesn't seem complicated at all to me I mean I had a quick look through the docs like I mentioned and the samples are pretty straight forward.

Ah, sorry about that, all is good then. For the project I did, I mostly

used PDO, but some parts were easier in mysqli (well, they just plain

didn't work in PDO due to a bug, at least it was a bug according to

Google IIRC), so for those I used mysqli.

And yeah, PDO isnt' that complicated, and there are some pretty decent

tutorials out there, shouldn't be too hard to learn.

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

Ah, sorry about that, all is good then. For the project I did, I mostly

used PDO, but some parts were easier in mysqli (well, they just plain

didn't work in PDO due to a bug, at least it was a bug according to

Google IIRC), so for those I used mysqli.

And yeah, PDO isnt' that complicated, and there are some pretty decent

tutorials out there, shouldn't be too hard to learn.

tutorials?? bleh!!! I'd rather use the docs

Link to comment
Share on other sites

Link to post
Share on other sites

tutorials?? bleh!!! I'd rather use the docs

When I got into PHP as a beginner, I found tutorials to be quite

useful and a bit more easily digestible than the docs (although I'd

still consult the docs for more info after reading/watching any tut),

but as I have become more experienced, I have found myself relying on

the docs more and more. I suppose it's a good sign. :D

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

When I got into PHP as a beginner, I found tutorials to be quite

useful and a bit more easily digestible than the docs (although I'd

still consult the docs for more info after reading/watching any tut),

but as I have become more experienced, I have found myself relying on

the docs more and more. I suppose it's a good sign. :D

especially when most tutorials take you from the beginning when you just want to find out how to do 1 single thing

Link to comment
Share on other sites

Link to post
Share on other sites

especially when most tutorials take you from the beginning when you just want to find out how to do 1 single thing

Yeah, that can get old after a (short) while (once you're past

being a complete noob). :lol:

Plus, IMHO, the PHP docs are pretty easy to understand once you

have the basics down, as opposed to some of the more cryptic docs

I've come across in my time.

BUILD LOGS: HELIOS - Latest Update: 2015-SEP-06 ::: ZEUS - BOTW 2013-JUN-28 ::: APOLLO - Complete: 2014-MAY-10
OTHER STUFF: Cable Lacing Tutorial ::: What Is ZFS? ::: mincss Primer ::: LSI RAID Card Flashing Tutorial
FORUM INFO: Community Standards ::: The Moderating Team ::: 10TB+ Storage Showoff Topic

Link to comment
Share on other sites

Link to post
Share on other sites

Yeah, that can get old after a (short) while (once you're past

being a complete noob). :lol:

Plus, IMHO, the PHP docs are pretty easy to understand once you

have the basics down, as opposed to some of the more cryptic docs

I've come across in my time.

Well the first doc I started of using was the Java doc so from then onwards it was quiet easy to understand pretty much any docs since they are all sorta in the same format

Link to comment
Share on other sites

Link to post
Share on other sites

OK, don't want to start multiquoting and most has been said already, but I see the biggest advantages of PDO as

  1. New, won't deprecate quickly
  2. DBMS independant
  3. Extremely flexible and powerfull ways of fetching data
  4. Simple to use

The biggest drawback in my eyes is that saving stuff in the DB isn't as powerfull as fetching stuff. It's possible to work around this with a self-written "extension", though.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×