473,804 Members | 2,296 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

best/commont practice orgainzing users. db for each or id in table??

I am not sure what the most effective way to organize a db for users
is.
I have 40 users (teachers) and 20 tables (grades, assignments,
students, etc).
Each needs access to its OWN grades, assignemnts, etc.
NOW I am not sure how to orgainize users in the DB. Right now I have
the code for 1 user and need to adapt it to several users.

1. A user id in each table and the same db for all users.?

OR

2. A different db with its own set of tables (same names) for each
user.?
Option 1. would be easier for me because it would only involve adding
an id to a the connection string in the include. Option 2, would
require modifying query strings throughout the code in the
application.

However I heard that ISPs usually limit the number of dbases per Mysql
server (don't know why).
On the other hand the dbase per user approach seems to me more
efficient since the number of records in a table is greatly reduced
and each user has access only to its own db.

What is best/common practice in this situation having in mind that the
number of users is limited to around 40 if that makes any diffrence at
all.
Thanks
Jul 17 '05 #1
5 2027
I noticed that Message-ID:
<a2************ **************@ posting.google. com> from John Pastrovick
contained the following:
I am not sure what the most effective way to organize a db for users
is.
I have 40 users (teachers) and 20 tables (grades, assignments,
students, etc).
Each needs access to its OWN grades, assignemnts, etc.

NOW I am not sure how to orgainize users in the DB. Right now I have
the code for 1 user and need to adapt it to several users.

1. A user id in each table and the same db for all users.?

OR

2. A different db with its own set of tables (same names) for each
user.?


If you are not sure it suggests to me that your database may not be
properly normalised (ie to 3rd normal form).

Consider.

One teacher can have many students. So the students table can have a
field containing the teacher id. It is easy then to get a list of
students for a particular teacher. However, if one student can have
more than one teacher you cannot use this method. But proper
normalisation is essential to effectively organise your database, reduce
redundancy etc..

This isn't really on topic here and you need to check a database group
or do some research on normalisation.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2
John Pastrovick wrote:
I am not sure what the most effective way to organize a db for users
is.
I have 40 users (teachers) and 20 tables (grades, assignments,
students, etc).
Each needs access to its OWN grades, assignemnts, etc.
NOW I am not sure how to orgainize users in the DB. Right now I have
the code for 1 user and need to adapt it to several users.


The user table should have an id field (unique, index, whatever). Then this
field must map to a corresponding field in each of the other tables. That
way, you know that a particular entry in for instance the grades table,
belongs to a specific entry in the user table. You can then use a JOIN
statement in SQL to quickly amalgamate all the data into a temporary table
that you can iterate over to list all the entries. This is what the term
"relational " refers to in "relational database".

..:Albe

--
http://www.ninja.up.ac.za
Jul 17 '05 #3
"Geoff Berrow" <bl******@ckdog .co.uk> wrote in message
news:dl******** *************** *********@4ax.c om...

One teacher can have many students. So the students table can have a
field containing the teacher id. It is easy then to get a list of
students for a particular teacher. However, if one student can have
more than one teacher you cannot use this method. But proper
normalisation is essential to effectively organise your database, reduce
redundancy etc..


From a data integrity point of view, yes, the schema is flawed. But from a
administrative point of view, I think it's quite reasonable. If we normalize
the database as you said, then who becomes responsible for consolidated
student information? Clearly you would need someone who oversees all the
students. And getting this person to perform this task could be politically
sticky.

I would go with option 2, since it requires the least amount of code change.
Having separate databases also eliminates the possibility of one teacher
modifying the data of another. I don't see the database limit as an issue,
since such a system should never be hosted on a shared server in the first
place. It would be too easy for students to break in and alter their grades.
All they had to do is get an account at the same ISP.
Jul 17 '05 #4
I noticed that Message-ID: <Ct************ ********@comcas t.com> from
Chung Leong contained the following:
"Geoff Berrow" <bl******@ckdog .co.uk> wrote in message
news:dl******* *************** **********@4ax. com...

One teacher can have many students. So the students table can have a
field containing the teacher id. It is easy then to get a list of
students for a particular teacher. However, if one student can have
more than one teacher you cannot use this method. But proper
normalisation is essential to effectively organise your database, reduce
redundancy etc..


From a data integrity point of view, yes, the schema is flawed. But from a
administrati ve point of view, I think it's quite reasonable. If we normalize
the database as you said, then who becomes responsible for consolidated
student information? Clearly you would need someone who oversees all the
students. And getting this person to perform this task could be politically
sticky.

I would go with option 2, since it requires the least amount of code change.
Having separate databases also eliminates the possibility of one teacher
modifying the data of another.


Chung, you normally post a lot of good stuff but I think you are
completely wrong here. Look at the subject line. best/common practice

I'm about to go to work in a large community college. It has many
thousands of students and hundreds of lecturers. Avoiding redundancy
for such a database would be a major consideration.

Student information (such as address, telephone number), in particular
needs to be centrally organised since it can change frequently, even for
a relatively small number of students.

If there is a problem with one teacher modifying the data of another
then suitable privileges will have to be built in.

Finally, how is the college going to amalgamate all the data from all
its students if everything is stored in individual unrelated database?
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #5
"Geoff Berrow" <bl******@ckdog .co.uk> wrote in message
news:ln******** *************** *********@4ax.c om...

Chung, you normally post a lot of good stuff but I think you are
completely wrong here. Look at the subject line. best/common practice

I'm about to go to work in a large community college. It has many
thousands of students and hundreds of lecturers. Avoiding redundancy
for such a database would be a major consideration.


I'm just offering a second opinion, that's all. There are best practices in
theory, and then there is the all important mandate of meeting real life
requirments. If normalization of the database implies the establishment of a
managerial role that you know no one is going to fill, then maybe
normalization no such a good idea.
Jul 17 '05 #6

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

Similar topics

2
1574
by: John Pastrovick | last post by:
I am not sure what the most effective way to organize a db for users is. I have 40 users (teachers) and 20 tables (grades, assignments, students, etc). Each needs access to its OWN grades, assignemnts, etc. NOW I am not sure how to orgainize users in the DB. Right now I have the code for 1 user and need to adapt it to several users.
131
21705
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately get some good real world examples. Fire away! :) Regards, Peter Foti
136
9468
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
1
2102
by: Chris Uwins | last post by:
Hi there, i know theres a number of ways I can achieve this but want to know the best, (but still quite simple). Up until a year ago I never used Access but have designed a few databases for work. I am working on Access 2000. I have basic SQL/VB skills - and am pretty accomplished at putting the databases together. Anyway...I've created a database to keep track of "Dayworks" we are
20
6645
by: Keith G. Murphy | last post by:
I'm trying to get a feel for what most people are doing or consider best practice. Given a mod_perl application talking to a PostgreSQL database on the same host, where different users are logging onto the web server using LDAP for authentication, do most people 1) have the web server connecting to the database using its own user account (possibly through ident), and controlling access to different database entities strictly through...
5
5919
by: Rich | last post by:
Hello, I have a search application to search data in tables in a database (3 sql server tables). I populate 2 comboboxes with with data from each table. One combobox will contain unique CompanyID's. The second combobox will contain unique memberID's. Each of the tables that I have to search contain a CompanyID and a memberID field, and these fields are not unique in the respective tables. Like CompanyID, MemberID
16
2824
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and efficient navigating within Visual Studio 2005. Let's say your project (or solution) has dozens of forms and hundreds or even thousands of routines. Two Questions: 1) BUILT-IN to Visual Studio 2005. What ideas do you have to quickly
7
3585
by: Steve | last post by:
I am building an object library for tables in a database. What is the best practice for creating objects like this? For example, say I have the following tables in my database: User: - Id - FirstName - LastName - CompanyId (many-to-one )
9
6260
by: =?Utf-8?B?QW1tZXI=?= | last post by:
I've read many incomplete opinions about the "Best Practice" for securely accessing SQL but what I really need to find the "Best Practice" that fits my applications needs. Currently (alpha stage) I am Using a .Net DSN-Less SQLConnection method in my client program (vb.net) and sending uid/pwd across the network. The client only calls upon the stored procedures to access the tables in SQL 2005. This is a semi commercial application...
0
9714
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
9594
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
10599
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
10346
jinu1996
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...
1
10347
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7635
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
6863
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();...
1
4308
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 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.