The Student Room Group

Scroll to see replies

There are two possibilities for table structure.
4 table (recommended)
3 table

The 4 table method:
This uses four tables
- tbl_Customer,
- tbl_Turkey,
- tbl_Order,
and
- tbl_OrderLine

You can firgure out the first two tables and the data within them...
but with the tbl_Order and tbl_OrderLine, it may need explaining.
Each customer can have an order, for each order there will be up to 5 turkeys ordered (like as order lines). The ordered weights of the turkeys are placed in records in the tbl_OrderLine table, and will contain the Order_ID from the order in which them came from.
Get It?

The three table method, combines the customer details with the orders table, but this creates duplicate data when a customer cancels an order (not deletes) and places another.

I've almost finished my coursework and i'm writing my documentation, so just ask if you need help.
Although remember, I will NOT be able to give you ACTUAL completed work as this is cheating.

Also, I saw some of the older posts were talking about the discount.
It should be calculated in a query!
Like this:

Discount: IIF( Abs ( [Turkey_Weight]-[Order_Weight] ) >= 1, Yes, No)

The you must apply any discount to the Price Per Kilogram (£4.78)
Therefore you may want a 'Price Per Kilogram' field in your query.

I.e.
Price Per Kilogram: IIF( [Discount] = Yes, 4.78*0.95, 4.78 )

Then use the price per kilogram to calculate the final price of each turkey.

Price: ( [Price Per Kilogram]*[Turkey_Weight] ) + 2.5

I shouldn't really tell you all of that, so make sure you understand it all before using it.
I'm open to suggestions for improvements.

from
David Duke
Reply 61
I am doing 3 tables, but when I saw 4 table (recommended). I dnt quite get the order_line Table though.

David, what did you use Access or V.Basic? I am doing Basic. :frown:

I have to do Form Design Input and Output Forms. How many Input forms and output forms should i have?
Tindo
David, what did you use Access or V.Basic? I am doing Basic. :frown:

I used MS Access.
I assume you mean, your using Visual Basic NOT BASIC.
Tindo
I have to do Form Design Input and Output Forms. How many Input forms and output forms should i have?

You normally need a form input for each table.
Then outputs are anything it asks for in the spec.
Which in Access, are easy. As they are reports based on queries.
In VB, I think you have to make some kind of form which is contains tabular data from your data source.
As I've not done mcuh database work in VB, I can't tell you how to do it.
But! If you can some how use a SQL query to select your data from your tables, it might be good.
If you need help creating the SQL, just use the query builder in Access and then copy the SQL statement.

Sorry for not really helping you, but as I said, I've not much practice in VB using databases.

from
David Duke
Tindo
I am doing 3 tables, but when I saw 4 table (recommended). I dnt quite get the order_line Table though.

Briefly tell me what you have in your 3 tables.
Cuz three tables is ok, but 4 gets rid of repeated data.

Edit: Contact Completed via PMs.
Reply 64
Im really stuck on how to match the weight that the customer has asked for with the turkey weights that are avaliable. Unfortunately i dont know VB and my computing teacher is not very helpful. I am creating it in access. Hope you can help! :frown:

Please someone help me! :smile:
Reply 65
Can you lock a table in Access? because i do not want to exceed the turkey limit so i am going to place 40 turkeys already in the table and i want to make it so no one can edit it, apart from the admin of course. is this possible?
Reply 66
CC22
Can you lock a table in Access? because i do not want to exceed the turkey limit so i am going to place 40 turkeys already in the table and i want to make it so no one can edit it, apart from the admin of course. is this possible?


I have never tried it but perhaps you should explore the tools menu > security.
When exploring security and locking things in Access,
MAKE SURE YOU COPY YOUR UNLOCKED FILE FIRST,
store it in a good place, so if you get locked out of your database, you have a backup of your files.

Its the worst thing you can do after doing all the hard work of making a database.
I know people who have lost all their work, becuase they've locked themselves out.
I know it sounds a stupid thing to do, but, HONESTLY, its easily done!
Reply 68
daviddukeuk
When exploring security and locking things in Access,
MAKE SURE YOU COPY YOUR UNLOCKED FILE FIRST,
store it in a good place, so if you get locked out of your database, you have a backup of your files.

Its the worst thing you can do after doing all the hard work of making a database.
I know people who have lost all their work, becuase they've locked themselves out.
I know it sounds a stupid thing to do, but, HONESTLY, its easily done!


How do I do the security stuff (e.g. passwords) in Access? :redface:
Reply 69
i have made an order form in Access, i have got a combo box showing all the details within my Turkey Table (ID, weight and taken?) i shows the turkey id. i also have a taken? check box, and i want it to become checked if you choose a turkey that has alreayd been ordered, telling the user that that turkey can not be ordered

does any one know how i can do this
You don't need to check if the turkey is already taken until terry is assigning them.
You could make sure that in your documentation you state that Terry is part of the system and will not assign a turkey twice.

NB: There are other ways of stoping terry assigning the same turkey(s) twice.
(*Hint* Use query wizard for 'un-matched' values or something like that :biggrin:)
Reply 71
I'm doing terrys turkeys in access, was just enterting my customers into my customers table (i've started the whole project again after doing it really wrong) i tried pasteing my customers in from old project, but it didnt match and because i have autonumbered my 'Customer ID' column it keeps putting in like '20' instead of what its surposed to be: '6' because i tried entering information their b4, but it wont be changed, is there a way of reseting the autonumber or changing it to start on the next number?
Reply 72
How do i do the form where people can calculate their own turkey requests etc.
Reply 73
Geez
I'm doing terrys turkeys in access, was just enterting my customers into my customers table (i've started the whole project again after doing it really wrong) i tried pasteing my customers in from old project, but it didnt match and because i have autonumbered my 'Customer ID' column it keeps putting in like '20' instead of what its surposed to be: '6' because i tried entering information their b4, but it wont be changed, is there a way of reseting the autonumber or changing it to start on the next number?

dunno mate but someone else might
Reply 74
i also need help with the codeing in visual basic any1 able to offer help?
Reply 75
Weeman
i also need help with the codeing in visual basic any1 able to offer help?

Aye that a bitch, can't get my head around it.

thanks Dave
Hey Ppl Could U Plz Help Me Out Sum1 Jus Started My Coursework Im Having Difficulties Knowing Which Attribute Goes In Which Table. I Pretty Much Worked It Out, But Ive Been Told Dat Der Are Sum Attributes That R Not Needed. My Relationship Doesnt Work For Order And Turkey. I Have A 1 To Many And Apparently It Wrong....plz Help Me Sum1
Reply 77
En1x
apart from loving chris long i also love this terrys turkeys project.

anyone having problem with linking a customer to a turkey ??

nick

p.s lads vb and access suck tbh. pascal!!

u jus need to create a turkey id along with ur custoemr id. then link the 2 togetha wiv a relationship.
Reply 78
i need help with the order line table. daviddukeuk. plz
Weeman
i need help with the order line table. daviddukeuk. plz

OK, i'm suring someone else would be able to answer you... but oh well!

Ok, tell me what you have so far.
(As i can't tell you all of thhings that go in it, only where you may have gone wrong)

Latest

Trending

Trending