• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

Help designing a simple database

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Databases

View previous topic :: View next topic  
Author Message
nowexam
Just Arrived
Just Arrived


Joined: 11 May 2010
Posts: 0


Offline

PostPosted: Fri May 28, 2010 5:11 am    Post subject: Help designing a simple database Reply with quote

First of all I'm a complete newb and I need help. I don't expect you to solve everything and am willing to make an effort.

I want to create a web page where I would track if a person was on a lecture or not. The HTML/CSS part is done, the PHP part will be, but the database part is what I don't know how to do.

This is what I need to do:

Person P1 attended lecture L1
Person P2 attended lecture L1
Person P3 attended lecture L1

Person P1 attended lecture L2
Person P2 attended lecture L2
...

There are about 20 persons, and exactly 15 lectures (L1-L15)

I created a table Lectures which has 2 fields LectureID (primary key) and LectureName. I also created a table Persons which has 5 fields, Person ID (primary key) and 4 others which describe that person.

I don't know how to "remember" the fact that a person was on a lecture. I definitely need to remember it so I can use it later.

Please help me
Back to top
View user's profile Send private message
AdamV
SF Mod
SF Mod


Joined: 06 Oct 2004
Posts: 24
Location: Leeds, UK

Offline

PostPosted: Fri May 28, 2010 9:57 am    Post subject: Reply with quote

er... how about a table for "attendance" with two fields, person ID and Lecture ID?
Back to top
View user's profile Send private message Visit poster's website
ark@s
Just Arrived
Just Arrived


Joined: 10 Jun 2010
Posts: 0


Offline

PostPosted: Fri Jun 11, 2010 12:31 am    Post subject: Reply with quote

AdamV wrote:
er... how about a table for "attendance" with two fields, person ID and Lecture ID?


I think that is the only way. I don't believe that you can use a sql-query because your tables don't have any common column , so that they can be associated.
Back to top
View user's profile Send private message
capi
SF Senior Mod
SF Senior Mod


Joined: 21 Sep 2003
Posts: 16777097
Location: Portugal

Offline

PostPosted: Fri Jun 11, 2010 2:32 am    Post subject: Reply with quote

AdamV wrote:
er... how about a table for "attendance" with two fields, person ID and Lecture ID?

That would be the obvious answer, indeed. This is the standard way to implement a many-to-many relationship -- which from what I understand, is what nowexam is trying to do.
Back to top
View user's profile Send private message
juliadesusa
Just Arrived
Just Arrived


Joined: 12 Jan 2011
Posts: 0
Location: us

Offline

PostPosted: Wed Jan 12, 2011 1:20 pm    Post subject: Reply with quote

If you want to make any type of the database either its simple or the complicated then the data tables and the queries are the most important thing that you have to make a good command over it.After that you will make all type of complicated database also.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Databases All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Looking for more Windows Networking info?

Sign up to the WindowsNetworking.com Monthly Newsletter, written by Enterprise Security MVP Deb Shinder, containing news, the hottest tips, Networking links of the month and much more. Subscribe today and don't miss a thing!
View a sample newsletter.

Become a WindowsNetworking.com member!

Discuss your Windows Networking issues with thousands of other Windows Newtorking experts. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred data recovery solution?

Follow TechGenix on Twitter