473,387 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

relationships between tables

Hi there,

this one has been annoying me and i know it *should* be simple, im
creating a database that has users, and every user will have an
administrator in charge of them, so one user will have one
administrator and an administrator will have many users. The
administrators will also be a user but will not have an administrator
as that is themselves. User table is as follows

USER TABLE
uun (pkey), lastname, firstname, phoneno, email...... etc

what im having trouble with is replicating the data, i dont
particularly want the admin users email addresses phone numbers
replicated, therefore i would like a relationship and tables that link
a user to an admin user then admin user details can be grabed from user
table, I did have three tables the USER table, a JOINADMINUSER join
table then a seperate ADMINUSER table.

Any ideas?

Cheers :)

Mar 29 '06 #1
1 1297
In message <11**********************@g10g2000cwb.googlegroups .com>,
missboom <sa********@hotmail.com> writes
Hi there,

this one has been annoying me and i know it *should* be simple, im
creating a database that has users, and every user will have an
administrator in charge of them, so one user will have one
administrator and an administrator will have many users. The
administrators will also be a user but will not have an administrator
as that is themselves. User table is as follows

USER TABLE
uun (pkey), lastname, firstname, phoneno, email...... etc

what im having trouble with is replicating the data, i dont
particularly want the admin users email addresses phone numbers
replicated, therefore i would like a relationship and tables that link
a user to an admin user then admin user details can be grabed from user
table, I did have three tables the USER table, a JOINADMINUSER join
table then a seperate ADMINUSER table.

Any ideas?


That's one way of doing it. Because everyone is a user you might prefer
to put everyone's details in one table. Add a field called "Admin" and
put the ID of a person's administrator in there, and leave it blank for
administrators. You can then create queries that use two copies of the
same table with a relationship between the uun and Admin fields.

That way you can choose whether to select only administrators with
IsNull([Admin]) or all users.

--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author.

Mar 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Megan | last post by:
hello everybody, i know this is a very long post, but i wanted to provide as much detail as possible. quick overview- i want to create a couple of many to many relationships and am wondering...
0
by: Megan | last post by:
Hi Everybody- I know that this is a really, really long post, but I wanted to try to give you as much background as possible. So here's a quick overview of the issues I'm asking for help with:...
2
by: Max | last post by:
Hi. I really hope someone can help me. Going slowly insane with this problem. I have a two Access 2000 databases. One is the backend containing tables and some admin queries. The other is the...
5
by: Mike Turco | last post by:
What is the difference between creating relationships in the front-end vs. the back-end database? I was trying to create a relationship in a database front-end and noticed that I could not check...
7
by: davegb | last post by:
I'm totally new to relational database design. My boss has asked me to create a database of information on the employees in our group. Seemed to me like a simple application to learn the ropes. A...
45
by: salad | last post by:
I'm curious about your opinion on setting relationships. When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. Over time I'd go into the window and see...
1
by: Ron | last post by:
Hi All, I have relationships on a database built in the back end, but I'm wondering if that's where they should be. Can they be built in the front end but apply to all the back end tables? Can...
13
by: ARC | last post by:
Hello all, Prior to going live with my app, I have questions on relationships theory. My prior app was done in Access 97, and I did NOT use relationships at all. I have 65 tables in my...
2
by: Roger | last post by:
I've moved all my tables to sql server2005 and I've created the appropriate relationships now I create links to two such tables that have a relationship into ms- acess97 but when I add the two...
8
by: Phil Stanton | last post by:
I have a FE, BE database on my home computer and a duplicate on the office computer. Both use Ak2 on Windows XP. The one at home appears normal. The BE consists of about 50 tables with numerous...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...

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.