473,657 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DVD Collection Database

418 Contributor
Hi:

I need some help with the ID numbering for a database I am designing for my DVD collection.

I have some general idea of what I would like to accomplish. Here it is in a nutshell.

ENG000.FE000.S. 0000

The first three letters identifies the language followed by three digits that identifies the serial number for that DVD within that language.

Next two letters designates the category (FE for feature film, DO for Documentary etc.) followed by three digits for the serial number within that category in that language.

The next letter designates it to be: S for Single, D for double, M for multiple (more on this later)

The last four digits is the running number in the entire database.

I would like a DVDID field to be automatically populate this info once I enter the Languge, Category, Single/double etc.

Now what I am struggling is with the S / D & M. Some of my DVDs have more than one title. For example, a DVD may contain three different titles of documentary films. Now I would like to assign one ID for this DVD but I would like to list all three or four titles under one single ID?

Should I not need multiple fields for titles? Title1, Title2, Title3? This way I should be able to generate a report that will list all possible titles under one ID number. Am I making sense? Is it possible?

Any help from anyone will be greatly appreciated. I know I will have to provide a detailed data.

Many thanks.
Nov 25 '08 #1
4 3255
mshmyob
904 Recognized Expert Contributor
You need to normalise the database. If you put in multiple titles in a table you have what is known as repeating columns. Identify your business rules such as EACH DVD may have MANY titles. Then decide if EACH title can be on MANY DVD's or is it EACH title can be on ONE DVD. Tell us and we can tell you the table structure.

You should also read about normalization Database Normalization and Table Structures - bytes.

cheers,
Nov 25 '08 #2
MNNovice
418 Contributor
A DVD may have many titles and yes, a title can be on different DVD.

For example: DVD #1 may be one documentary DVD #2 may have more than one documentary with a title that's common in both the DVDs (1 & 2).

Am I explaining my problem? Thanks.





@mshmyob
Nov 25 '08 #3
ChipR
1,287 Recognized Expert Top Contributor
First, identify the primary key to identify a single dvd. Maybe you want to use this 4 digit number and let it autonumber, but I'll call it ID.
Make a table with fields
ID, Language, LSerial, Category, CSerial
or something similar.

Then a table with fields
ID, Title
where there is no primary key because there may be multiple records per ID. Make the ID an index though for faster operation.

Then your data entry is aligned with the table, and you can easily do a query and Join the tables on the ID to get all the data together. The query can also have a field composed of the other fields with "." between them if that's how you want to see it.

Do read about normalization though.
Good luck!
Nov 25 '08 #4
NeoPa
32,568 Recognized Expert Moderator MVP
This is very similar to what was discussed for the CD database M.

Do you have what you need for this now?
Apr 15 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3950
by: Matthew Hood | last post by:
Here's the situation. I am developing an ASP.NET web application. Most of my forms will be accessing a database (MS Access) for either record creation/deletion/updating or for list lookups. The problem I have is my boss constantly wants to revise table and field names and I am the one that has to make sure everthing works after the fact. What I want to do is create 2 classes. The first one is my "Record" wrapper class that will map...
0
1133
by: newbie | last post by:
Hello All, I have a collection of objects that represent entities in a database. The User can modify this collection using a CollectionEditor. Therefore the user can modify the contents of the objects contained within the collections as well as the order they exists within the collection. I am trying to update a database (Access) to reflect the data in the collection of objects. I am having difficulty creating an elegant algorithm for...
10
1702
by: aa7im | last post by:
I have a similiar thread going about this topic but I decided to break it off into a seperate discussion. Question: What is the best way to determine if an object "IsNew" to a collection? Problem: In my application I load a collection of objects from the database and then pass that collection to the user.
5
2687
by: Rogerio Jun | last post by:
I create a custom control with a collection property. My question is : Can I override the method add of Collection ?
1
2157
by: Josema | last post by:
Hi, My problem is the next one (in a windows application): - I have a class derived from collectionbase to fill with persons object (id, name) from database. - I have a ListBox wich datasource its the collectionbase above. I want to do: - I would like that when i click in a item of the listbox, deletes from database the values of this item, and from collection too. Then refresh the listbox with the collection modified.
9
5483
by: Alfred Taylor | last post by:
I'm testing the waters of n-tier development and I ran into a scenario that I'm not sure what the best solution would be. I have a Company object which contains a collection of contacts retrieved from a database. In the presentation layer, the user will be able to add/delete/modify this collection in which case it needs to be synced with the database. The question is basically how best to do this? Aside from overriding the add/remove...
1
1407
by: Jeff S | last post by:
I'm storing a list of widgets in a database. The list changes infrequently (twice per week at most), and is relatively short (200 items at most, with very little detail per item). A small subset of all possible widgets will be displayed on a page (using VB.NET/code behind). I plan to populate a custom collection/class with a list of all possible widgets. The class will include a method that returns the required subset. Of course the logic...
2
3299
by: S. Justin Gengo | last post by:
Hi, I've created a component that allows me to store database information for various types of databases my company uses. It uses a collection for each type of database. Everything is working perfectly except when the component is deleted from the page. Here are the details. I add the component to the page from the toolbox and then add items using the collection editor. I can delete those items from the collection using the collection...
6
1518
by: Jan Krouwer | last post by:
I have a treeview which is populated from a relational database. In order to copy part of the tree, I need to add to the database the relationship of the part of the tree to be copied but with new ids. I have built a collection of the right number of ids. I am using the following code to recursively go through the tree (some code left out). Pos is the position in the collection of ids - I need to select the correct ids (need to use previous...
11
3055
by: GG | last post by:
Anybody knows of any collection where is not stored in memory but using hard disk instead? Thanks *** Sent via Developersdex http://www.developersdex.com ***
0
8392
marktang
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...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
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...
0
7324
agi2029
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...
1
6163
isladogs
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...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1611
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.