User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 426,174 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,846 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums
Views: 1620 | Replies: 7
Reply
Join Date: Apr 2007
Location: England
Posts: 5
Reputation: claptrap is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
claptrap claptrap is offline Offline
Newbie Poster

Question Total noob question

  #1  
Apr 19th, 2007
I am trying to learn about databases and at the moment starting to read general stuff about multidimensional database design. The trouble is, I don't even know the basics about databases, like what is natural key (same as primary key made of single components?) or surrogate key... Could anyone explain the following paragraph (we are talking about star schema here):

- "Another important feature is that all natural keys are replaced with surrogate keys: this means that every join between the fact & dimension tables is based on surrogate keys, not each surrogate key should have a generalised structure. i.e. based on simple integers. The use of surrogate keys allows the data in the warehouse to have some independence from the data used and produced by OLTP systems. For example, each branch has a natural key, namely the branchID and surrogate key branchID."



I cannot see any difference between this surrogate key and foreign key in fact table....

and I had the impression that the data produced in any data model should be wholly independent from the programing, OLTP etc? So the line about surrogate keys not always based on simple entegers must give a clue?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Location: Warrington, England
Posts: 31
Reputation: SkinHead is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
SkinHead SkinHead is offline Offline
Light Poster

Re: Total noob question

  #2  
May 16th, 2007
If Your Experience With Databases Is As Limited As You Say, It Seems Your Rather Jumping In @ The Deep End.

Maybe Focusing On Some Of The Fundamentals Will Provide A Better Starting Point.

There's Umpteen Books For Database Beginners (Amazon.com)

Google "Database Design" For Lots Of Useful Info & Guidance
Reply With Quote  
Join Date: Apr 2007
Location: England
Posts: 5
Reputation: claptrap is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
claptrap claptrap is offline Offline
Newbie Poster

Re: Total noob question

  #3  
May 16th, 2007
Thanks for the advice, any suggestions of a one that will explain more about creating customised input forms, validation rules, what all those parameters at the bottom of field boxes are in Access etc?

I am reading a book called "Database systems, A practical approach to design, implementation and management" by Thomas Conolly and Carolyn Begg, which is mostly easy to understand, only it doesn't teach so much about actually making one, (especially in Access).

I am hoping to create a relational database for my little customer care business (part-time: not big enough to pay someone else to do it) and which I can query various purposes.

I also want to create one for my "library" so I can search not only by author, title or genre but also by bits of text or keywords. I don't expect to be able to use heuristics, though.
Reply With Quote  
Join Date: May 2007
Location: Warrington, England
Posts: 31
Reputation: SkinHead is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
SkinHead SkinHead is offline Offline
Light Poster

Re: Total noob question

  #4  
May 16th, 2007
Firstly, I'd Suggest Microsoft SQL Server Expess, Rather Than Access. It's Free & Downloadable From http://msdn.microsoft.com/vstudio/express/sql/

It Allows You To Generate Relationships Between Tables & Create Constraints - Built In Mechanisms For Enforcing Data Integrity.

Aside From Anything Else, It's More Robust, Powerful & Easy To Use.

Check Out Amazon.com For Suitable Books For Beginners.

You Mentioned Customised Input Forms. I Assume You Were Thinking About Using VBA Within Access. If You're Feeling Adventurous, Try Visual Basic 2005 Express. Again It's Free & Downloadable From http://msdn.microsoft.com/vstudio/express/vb/
Reply With Quote  
Join Date: May 2007
Posts: 35
Reputation: matale is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
matale matale is offline Offline
Light Poster

Re: Total noob question

  #5  
May 17th, 2007
Originally Posted by claptrap View Post
I am trying to learn about databases and at the moment starting to read general stuff about multidimensional database design. The trouble is, I don't even know the basics about databases, like what is natural key (same as primary key made of single components?) or surrogate key... Could anyone explain the following paragraph (we are talking about star schema here):

- "Another important feature is that all natural keys are replaced with surrogate keys: this means that every join between the fact & dimension tables is based on surrogate keys, not each surrogate key should have a generalised structure. i.e. based on simple integers. The use of surrogate keys allows the data in the warehouse to have some independence from the data used and produced by OLTP systems. For example, each branch has a natural key, namely the branchID and surrogate key branchID."



I cannot see any difference between this surrogate key and foreign key in fact table....

and I had the impression that the data produced in any data model should be wholly independent from the programing, OLTP etc? So the line about surrogate keys not always based on simple entegers must give a clue?


I think you are reading the wrong stuff, star schemas and serrogate keys are used in Data Warehousing which is different from database design.
For your purposes I don't think that will be necessary. Just get yourself a good Access book or visit a few access tutorial websites.
My current Project www.footystat.com
Reply With Quote  
Join Date: Apr 2007
Location: England
Posts: 5
Reputation: claptrap is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
claptrap claptrap is offline Offline
Newbie Poster

Re: Total noob question

  #6  
Jun 13th, 2007
I know reading about multidimensional tables was a bit "jumping the gun, I just wanted to understand the principle...

Well, I have tried to design a simple table for vehicle hire company in Access 2000 (got a copy from a friend). It includes also a table for repairs that are done by garages. But I ran into problems when trying to link the tables together, with "enforce referential integrity" box ticked on.

Could you have a look? I've tried to upload the screendump of relationships into I think this better illustrates what my problem is, that is to say I've found one but don't understand it so don't know how to fix it.
http://www.freewebs.com/claptrpap/relationships.htm

I hope the explanation makes some sense, it seems that whateverI do, the site cuts a certain % out of images regardless of original size.

Also, for customer table, I want to create a list box, with a default value "Mr". I managed to create the box but when I choose one the values in the list (in table view) access complains about it not being valid. What do I do wrong? Also I want to set the default value to "Mr" but don't know how to do it. If I write "mr" into the Default line, Access won't recognise it as valid and won't save the table.

Until I have managed to get the design right I cannot enter any data and start creating queries.
I want this database up and running before I start my second job after next week as then I won't have any spare time.
Last edited by claptrap : Jun 13th, 2007 at 7:06 am.
Reply With Quote  
Join Date: May 2007
Posts: 35
Reputation: matale is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
matale matale is offline Offline
Light Poster

Re: Total noob question

  #7  
Jun 14th, 2007
I think the error is because you are using different data types for the vehicleLicence on different tables, they are supposed to be the same.

Im not sure about the other stuff.
My current Project www.footystat.com
Reply With Quote  
Join Date: Apr 2007
Location: England
Posts: 5
Reputation: claptrap is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
claptrap claptrap is offline Offline
Newbie Poster

Question Re: Total noob question

  #8  
Jun 15th, 2007
Thank you matale! I did go through the data types again and found the non-matching errors as you suggested. I had simply followed the data dictionary I had created earlier, when I didn't quite understand about data types and foreign keys... Basic database structure is now sorted and I can finally start inputting data.

Only now I want help with data validation: How do make sure a start date is earlier than end date, e.g. a kid starts at school when is 5 and copletes A-levels when he is 18 - not the other way round? You'd think it is a basic knowledge but I cannot find any examples from the books I found from my local library.

I have created a customer form with hire sub form: is there a simple way to retrieve details from an existing customer within the input form? I would also like a button on the form that once clicked, a label would appear e.g. in footer, to display a number of days (of hire/booking) and total price of hire.... Displaying price before and after VAT would be fantastic, I would never have to reach for calculator again: no typing mistakes, no embarrasing conversations with customers. But I understand that would be quite complicated. Even with ready made macro or code, you would have to tell me step by step where I should install it...

So far all I have come up with is a calcuation in query (the hire price is stored as a field with Goods table) First I calculated the number of days: NoDays: [HireEndDate]-[HireStartDate] and the next field I calculated the total hire price: HirePrice: [NoDays]*[DailyRate] in the field property query design - I couldn't combine the two expressions to come up with just total, but luckily in this case it didn't matter.

I'm still looking for a book from beginners to advanced Access 2000, although it seems that XP/2002 is very similar. I would have never thought databases are so much fun! The more I leran, the more uses I can think for my own purposes.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Database Design Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Database Design Forum

All times are GMT -4. The time now is 6:19 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC