hi,
i'm designing a video and games rental database.
i've got the customer table, with all the correct and relavant details.
i've got a films, and games table.
But i'm confused which way to link them.
e.g.
a custoemr can rent a video and a game, but do i have to have a seperate
'rental' table for each category, or 1 table, for both fo the rents?
or
do i have a rental table, (with just the id, and due dates,)
and have seperate video rental and game rental tables?
i've created an erd diagram, which one should i use? i have not attached it,
but i could if somone is willing to help me slove this little problem.
thanx
devin 18 1613
Use a Title table that contains all the titles you hire out (both games and
videos). Include a TitleType field, to distinguish which it is.
Of course, you might have multiple copies of one title. You don't hire
Titles to your customers, but instances (a particular disk, that probably
has a unique barcode on it.) You will therefore have a Product table which
contains everything you have for hire. It will have fields such as:
ProductID AutoNumber Primary key
TitleID relates to the Title table's primary key (what title
this is.)
PurchDate Date/Time When you bought this instance.
Inactive Yes/No Mark inactive if this copy is lost or
damaged.
You will then need the Hire table:
HireID AutoNumber Primary key
ClientID Relates to Client table's primary key (Who hired this.)
HireDate Date/Time When this hire was taken out.
and a HireDetail table (for all the items in this hiring):
HireDetailID AutoNumber primary key
HireID Number. Relates to primary key of Hire table.
ProductID Number What item was hired.
DueDate Date/Time When this item is due back.
Charge Currency How much the client is charged for hiring
this item.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"DP" <DP@hotmail.com > wrote in message
news:Se******** **********@news fe2-win.ntli.net... i'm designing a video and games rental database.
i've got the customer table, with all the correct and relavant details. i've got a films, and games table.
But i'm confused which way to link them.
e.g. a custoemr can rent a video and a game, but do i have to have a seperate 'rental' table for each category, or 1 table, for both fo the rents?
or
do i have a rental table, (with just the id, and due dates,) and have seperate video rental and game rental tables?
i've created an erd diagram, which one should i use? i have not attached it, but i could if somone is willing to help me slove this little problem.
Per DP: hi,
i'm designing a video and games rental database.
Have you looked into what's available off-the-shelf?
Sounds like one of those bread-and-butter applications where you can get
something ready-made that does 90% of what you want for 10% of the cost of doing
it yourself.
--
PeteCresswell
Per DP: i'm designing a video and games rental database.
One of the WROC How-To books for object-oriented programming uses video rental
as the subject of one of their examples.
My recollection is that the author's last name had an American Indian sound to
it - something like Lahota.
Maybe somebody else can recall the title.
--
PeteCresswell
Have a look at Access 2000 Power Programming by Scott Barker if you can
find it... he has one in his book.
hi,
thanx for yor reply. i understand the tables you have described, but just
need a few things clearing up.
your suggesting that there only needs to be 1 table, for the videos and
games. , but a new table to distinguesh between the titles. because there
are 5 copies of each video and game.
now that i have read your reply, i am thinking of keeping my 2 tables for
video and games, but to create another 2 tables to link them as products.
and each rpoduct will be given an individual ID.
and the customer rents a product, not a title.
Why have you created a hire and a hiredetail table? why cant u just have the
one? .
the customer table relates to the hire table, the hire table relates to the
hiredetail table. the hiredetail table relates to the product table. the
product table relates to the title table. ??
thanx
devin
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:43******** *************** @per-qv1-newsreader-01.iinet.net.au ... Use a Title table that contains all the titles you hire out (both games
and videos). Include a TitleType field, to distinguish which it is.
Of course, you might have multiple copies of one title. You don't hire Titles to your customers, but instances (a particular disk, that probably has a unique barcode on it.) You will therefore have a Product table which contains everything you have for hire. It will have fields such as: ProductID AutoNumber Primary key TitleID relates to the Title table's primary key (what title this is.) PurchDate Date/Time When you bought this instance. Inactive Yes/No Mark inactive if this copy is lost or damaged.
You will then need the Hire table: HireID AutoNumber Primary key ClientID Relates to Client table's primary key (Who hired this.) HireDate Date/Time When this hire was taken out. and a HireDetail table (for all the items in this hiring): HireDetailID AutoNumber primary key HireID Number. Relates to primary key of Hire table. ProductID Number What item was hired. DueDate Date/Time When this item is due back. Charge Currency How much the client is charged for
hiring this item.
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"DP" <DP@hotmail.com > wrote in message news:Se******** **********@news fe2-win.ntli.net... i'm designing a video and games rental database.
i've got the customer table, with all the correct and relavant details. i've got a films, and games table.
But i'm confused which way to link them.
e.g. a custoemr can rent a video and a game, but do i have to have a seperate 'rental' table for each category, or 1 table, for both fo the rents?
or
do i have a rental table, (with just the id, and due dates,) and have seperate video rental and game rental tables?
i've created an erd diagram, which one should i use? i have not attached it, but i could if somone is willing to help me slove this little problem.
i found it, but its $22, i dont want to pay that, just to know what tables i
need. i'm just a little confused. i want to create it effeciently, so i'm
not wasting processing power.
r there any examples on the net anywhere?
thanx
devin
<pi********@hot mail.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. . Have a look at Access 2000 Power Programming by Scott Barker if you can find it... he has one in his book.
(PeteCresswell) wrote: Per DP:
i'm designing a video and games rental database.
One of the WROC How-To books for object-oriented programming uses video rental as the subject of one of their examples.
My recollection is that the author's last name had an American Indian sound to it - something like Lahota.
Professional Visual Basic 6 Business Objects is the title, but it's
probably way more than the op is looking for.
Per rkc: Professional Visual Basic 6 Business Objects is the title, but it's probably way more than the op is looking for.
Thanks. Also I fat-fingered the publisher's name.
WROC sb WROX.
--
PeteCresswell
The HireDetail table exists in the hope that sometimes customers will rent
more than one DVD/game at a time. I would consider that to be a single
transaction, with a total amount that they pay at the time. You could treat
them as separate hirings I suppose, and handle each transaction separtely,
so the staff takes $2 for the first one and gives change, and then accepts
$2.95 for the next game the customer wants and gives change, and then ...
For an example of that concept, open the Northwind sample database. Open the
Orders form, and see how the order header can have many detail lines. To see
how these table fit together, choose Relationships on the Tools menu.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"DP" <DP@hotmail.com > wrote in message
news:xX******** **********@news fe5-win.ntli.net... hi,
thanx for yor reply. i understand the tables you have described, but just need a few things clearing up.
your suggesting that there only needs to be 1 table, for the videos and games. , but a new table to distinguesh between the titles. because there are 5 copies of each video and game.
now that i have read your reply, i am thinking of keeping my 2 tables for video and games, but to create another 2 tables to link them as products. and each rpoduct will be given an individual ID.
and the customer rents a product, not a title.
Why have you created a hire and a hiredetail table? why cant u just have the one? .
the customer table relates to the hire table, the hire table relates to the hiredetail table. the hiredetail table relates to the product table. the product table relates to the title table. ??
thanx
devin
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message news:43******** *************** @per-qv1-newsreader-01.iinet.net.au ... Use a Title table that contains all the titles you hire out (both games and videos). Include a TitleType field, to distinguish which it is.
Of course, you might have multiple copies of one title. You don't hire Titles to your customers, but instances (a particular disk, that probably has a unique barcode on it.) You will therefore have a Product table which contains everything you have for hire. It will have fields such as: ProductID AutoNumber Primary key TitleID relates to the Title table's primary key (what title this is.) PurchDate Date/Time When you bought this instance. Inactive Yes/No Mark inactive if this copy is lost or damaged.
You will then need the Hire table: HireID AutoNumber Primary key ClientID Relates to Client table's primary key (Who hired this.) HireDate Date/Time When this hire was taken out. and a HireDetail table (for all the items in this hiring): HireDetailID AutoNumber primary key HireID Number. Relates to primary key of Hire table. ProductID Number What item was hired. DueDate Date/Time When this item is due back. Charge Currency How much the client is charged for hiring this item.
"DP" <DP@hotmail.com > wrote in message news:Se******** **********@news fe2-win.ntli.net... > > i'm designing a video and games rental database. > > i've got the customer table, with all the correct and relavant details. > i've got a films, and games table. > > But i'm confused which way to link them. > > e.g. > a custoemr can rent a video and a game, but do i have to have a > seperate > 'rental' table for each category, or 1 table, for both fo the rents? > > or > > do i have a rental table, (with just the id, and due dates,) > and have seperate video rental and game rental tables? > > i've created an erd diagram, which one should i use? i have not > attached > it, > but i could if somone is willing to help me slove this little problem. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Martin Euredjian |
last post by:
I could use a shove in the right direction...
I'm using the Dreamweaver MX suite to build a website for my business. At
first I threw
something together quickly just to get going. I now need to replace that
with something more refined. It seems that using PHP would be a part of
that.
I quickly learned that frames are problematic. I'm also reading that using
tables (for layout) isn't the best idea either. And, then, PHP and DHTML
|
by: Edward |
last post by:
ASP.NET / VB.NET
SQL Server 7.0
Our client has insisted that we change our established practice of
building SQL in-line and move it all to SPROCs. Not a problem for 80%
of the app. However, we have a number of Search/Filter forms that
contain a number of controls to allow more or less focused search
criteria to be built up.
I have a class that does this quite nicely, examining all controls for
|
by: heromull |
last post by:
We have an asp.net app with about 200 data entry forms. Customers may
enter data into any number of forms. Each form's data is persisted in
a corresponding sql table. When data entry is complete, it needs to be
processed. Here's where the questions start.
How can we easily determine in which tables a customer has data and how
best to select that data?
We're not opposed to putting all the data in a single table. This
table would...
|
by: Randy |
last post by:
I am trying to make the move from Approach to Microsoft Access and am
having real problems with developing forms? Would someone please
describe the Access concept of developing forms using different tables.
Whenever I try to set up a subform it puts it in a dataview form and I
can't seem to be able to move the fields around. In Approach you can
add and move fields around from all the different db's you have
created. Access uses tables...
|
by: Jeff |
last post by:
For years I have been using VBA extensively for updating data to tables
after processing. By this I mean if I had to do some intensive processing
that resulted in data in temp tables, I would have VBA code that wrote the
results of that away to the db, either creating new records or updating
existing records, whichever was relevant. This may also include deleting
records.
Now I generally do this by opening a recordset on the source data...
| |
by: Rob Meade |
last post by:
Hi all,
I have a databse which I'm pulling the data from for my ASP page.
I have 4 tables, Course, Feature, Objective, and PreRequisite. The last
three all contain a course product code and a text column - the course
product code links the row(s) to the Course table.
So, I might have 1 entry in Course, but perhaps 3 in Feature, 5 in Objective
and 2 in PreRequisite.
|
by: kutty |
last post by:
Hi All,
I am loading data to a child table from a text file. the text files
also contains data not referenced by parent key. while loading the data
if one row fails to satisfies the constraint everything is getting
rollback..
plz suggest me something.. which will help me to discard the
unsatisfied rows and continue with the rest..
|
by: The Frog |
last post by:
Hello everyone,
I am working on an application that can build database objects in MS
Access from text files. I suppose you could call it a backup and
restore type routine.
Accessing the fields, tables, relationships, and indexes is no issue
for me via DAO code. The issue I have is that I am not sure which
properties are actually necessary / available to set from code for each
possible type of field. I have looked fo´r a reference on...
|
by: rn5a |
last post by:
A Form has a select list which is populated from a MS-Access database
table. The DB table from where the select list is populated has 2
columns - CountryID & CountryName. When the Form is posted, the option
selected in the select list is inserted in another DB table wherein
the column in which the value of the selected option will be populated
accepts only integers. Actually there are 7-8 select lists & the
values of all the selected...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |