Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Iron Speed
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 1st, 2003, 05:14 PM
zadifriedrich zadifriedrich is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 zadifriedrich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
a college datastructure problem

I am in the design phase right now of a college datastructure that will manage the overall college information. Everything in the future application will be managed by departement. An instance of the application will manage one department at a time. For example, if for an instance of this application, Computer Science is chosen, within the Computer Science department, the following entities will be managed:Students,Courses,Teachers,Assignements... Other Students,Courses,Teachers,Assignments from the Engineering Department won't be visible within that same instance of the application.The future system will also manage Payroll for the Teachers. Since a Teacher will teach in different departments, how can I make sure that when they will enter a new teacher named Arnold Smith in the instance of the application that will manage the Computer Science Department, it is not duplicating the same Arnold Smith that also teaches in the Engineering Department?

Reply With Quote
  #2  
Old September 1st, 2003, 07:58 PM
mitakeet's Avatar
mitakeet mitakeet is offline
Last Day: May 28, 2005
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2003
Location: Maryland
Posts: 4,575 mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 8 h 5 m 34 sec
Reputation Power: 20
If this a for-real application, you have a host of security issues (particularly if you are going to have salary info)! It is very difficult to provide good security for a database, and a reasonably secure version is usually a pain in the *** to administer and maintain. At a minimum, you would want to have a separate table for teachers and students, then refer to them by some unique identifier (the whole point to a relational database, after all) in the associations for each department. You can keep the rest of the data (one table for courses, another for assignmenets, etc.) in a single table, but then you must rely on application level security to protect the data (not a very good solution if you don't have control of the application (meaning each user has a local copy they can hack)). If you put the dept data in individual dept tables, you have messy code managing all the different departments and have to constantly update your code. There is no clean and easy solution even with a minimum of three tiers, one for the client (which has little or no security beyond authorizing and tracking individual users), a second tier on the server, then the database that can only be accessed through the server. You would then have to ensure that no one can get their hands on the server code (source or exe) and have a robust way of tracking individual logons. The least of your problems, it seems to me, is the actual database structure, but obviously your choices now will have a big impact on the overall application.
__________________

Left DevShed May 28, 2005. Reason: Unresponsive administrators.
Free code: http://sol-biotech.com/code/.
Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html.
Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html.

It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
--Me, I just made it up

The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
--George Bernard Shaw

Reply With Quote
  #3  
Old September 2nd, 2003, 11:51 AM
crimson117 crimson117 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: New York
Posts: 19 crimson117 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to crimson117 Send a message via AIM to crimson117 Send a message via Yahoo to crimson117
have a Person table, and have a DepartmentStaff table that links a person to a department. There can be multiple DepartmentStaff records that point to a person, each with a different department. Now, the interface is key. When they enter a person named "Arnold Smith", you have to know whether he's already in there, or whether it's just another person with the same name. You can do this by a FacultyIDNumber which is issued to every current and new employee, or by Social Security Number. That way when they try to enter Arnold Smith with ssn 123-45-6789 and he's already in there, it can stop them from doing so.

Unless the instances can talk to each other, such as by sharing a common master Person table, there's no way to make sure a person isn't duplicated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > a college datastructure problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway