-
Relationships and Design
This is a very basic question (Low Level Techie)
I understand the design of all the tables and PK/FK relationships etc.
The problem Iam having is when I setup a database on paper, then commit the
design exactly using Access or SQL, the realtionships PK--->FK will not
work because I hav not inputed any data yet..
When designing a database, do I need to enter in basic table data before
setting up the relationships, this seems very wrong because its against the
point of a relational database but I am unable to enforce referencial integrity
when setting up basic relationships without first entering data? Does this
make sense. Sorry if Iam confusing the situation.
Every single hands on tutorial builds the tables, enters raw data then sets
up relationships. What happens if Iam designing a database from the bottom
for a client. I dont enter the data but setup a basic design to let them
enter the data with the realtionships already set from the design process.
Thanks for any help you can give.
-
Re: Relationships and Design
EWC,
In Access (or any other DBMS for that matter), you should be able to define
the RELATIONSHIPS between Tables (in Access, use the Tools/Relationships
menu item), before ANY data is actually entered into the tables.
What do you mean when you say "the relationships PK--->FK will not
work because I hav not inputed any data yet"...How do you know that the relationships
DO NOT work...??? They can be defined, but until you HAVE some data, there
is nothing to actually relate together. The realtionships are bewteen fields,
but the results of those relationships requires actual data to tie together.
What is it that you are expecting to see, when the realtioships ARE defined,
but there is no data in the actual tables?
Arthur Wood
"EWC" <langer@adiglobal.com> wrote:
>
>This is a very basic question (Low Level Techie)
>I understand the design of all the tables and PK/FK relationships etc.
>
>The problem Iam having is when I setup a database on paper, then commit
the
>design exactly using Access or SQL, the realtionships PK--->FK will not
>work because I hav not inputed any data yet..
>
>When designing a database, do I need to enter in basic table data before
>setting up the relationships, this seems very wrong because its against
the
>point of a relational database but I am unable to enforce referencial integrity
>when setting up basic relationships without first entering data? Does this
>make sense. Sorry if Iam confusing the situation.
>
>Every single hands on tutorial builds the tables, enters raw data then sets
>up relationships. What happens if Iam designing a database from the bottom
>for a client. I dont enter the data but setup a basic design to let them
>enter the data with the realtionships already set from the design process.
>Thanks for any help you can give.
>
-
Re: Relationships and Design
You are right, you don't need to enter any raw data into the database, before
setting the relationships. What I would do is check the meta-data of your
primary and foreign keys.
For example in Access, the Indexing option of your primary keys. If you set
it to Yes, but No duplicates allowed, what this will do, is only allow a
1 to 1 relationship, so you might want to set the indexing to yes, but allow
duplicates. So, you got to be sure that you have set all the meta-data corretly
as well.
Also to enforce referential integrity, you just need to click on that button,
but if doesn't allow you to click it unless you have data in the database
then that is wierd.
Hope this helps you a little bit.
"EWC" <langer@adiglobal.com> wrote:
>
>This is a very basic question (Low Level Techie)
>I understand the design of all the tables and PK/FK relationships etc.
>
>The problem Iam having is when I setup a database on paper, then commit
the
>design exactly using Access or SQL, the realtionships PK--->FK will not
>work because I hav not inputed any data yet..
>
>When designing a database, do I need to enter in basic table data before
>setting up the relationships, this seems very wrong because its against
the
>point of a relational database but I am unable to enforce referencial integrity
>when setting up basic relationships without first entering data? Does this
>make sense. Sorry if Iam confusing the situation.
>
>Every single hands on tutorial builds the tables, enters raw data then sets
>up relationships. What happens if Iam designing a database from the bottom
>for a client. I dont enter the data but setup a basic design to let them
>enter the data with the realtionships already set from the design process.
>Thanks for any help you can give.
>
-
Re: Relationships and Design
Also make sure you are entering the data in the correct order. You must start
with index tables first, and work your way through the relationships.
IE-- you must enter a product before you can sell it
"Waleed Al-Baloushi" <wal999@hotmail.com> wrote:
>
>You are right, you don't need to enter any raw data into the database, before
>setting the relationships. What I would do is check the meta-data of your
>primary and foreign keys.
>
>For example in Access, the Indexing option of your primary keys. If you
set
>it to Yes, but No duplicates allowed, what this will do, is only allow a
>1 to 1 relationship, so you might want to set the indexing to yes, but allow
>duplicates. So, you got to be sure that you have set all the meta-data corretly
>as well.
>
>Also to enforce referential integrity, you just need to click on that button,
>but if doesn't allow you to click it unless you have data in the database
>then that is wierd.
>
>Hope this helps you a little bit.
>
>
>"EWC" <langer@adiglobal.com> wrote:
>>
>>This is a very basic question (Low Level Techie)
>>I understand the design of all the tables and PK/FK relationships etc.
>>
>>The problem Iam having is when I setup a database on paper, then commit
>the
>>design exactly using Access or SQL, the realtionships PK--->FK will not
>>work because I hav not inputed any data yet..
>>
>>When designing a database, do I need to enter in basic table data before
>>setting up the relationships, this seems very wrong because its against
>the
>>point of a relational database but I am unable to enforce referencial
integrity
>>when setting up basic relationships without first entering data? Does
this
>>make sense. Sorry if Iam confusing the situation.
>>
>>Every single hands on tutorial builds the tables, enters raw data then
sets
>>up relationships. What happens if Iam designing a database from the bottom
>>for a client. I dont enter the data but setup a basic design to let them
>>enter the data with the realtionships already set from the design process.
>>Thanks for any help you can give.
>>
>
-
Re: Relationships and Design
Thanks much. I appreciate your help.
"EWC" <langer@adiglobal.com> wrote:
>
>This is a very basic question (Low Level Techie)
>I understand the design of all the tables and PK/FK relationships etc.
>
>The problem Iam having is when I setup a database on paper, then commit
the
>design exactly using Access or SQL, the realtionships PK--->FK will not
>work because I hav not inputed any data yet..
>
>When designing a database, do I need to enter in basic table data before
>setting up the relationships, this seems very wrong because its against
the
>point of a relational database but I am unable to enforce referencial integrity
>when setting up basic relationships without first entering data? Does this
>make sense. Sorry if Iam confusing the situation.
>
>Every single hands on tutorial builds the tables, enters raw data then sets
>up relationships. What happens if Iam designing a database from the bottom
>for a client. I dont enter the data but setup a basic design to let them
>enter the data with the realtionships already set from the design process.
>Thanks for any help you can give.
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|