Autor Beitrag
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 23.12.06 18:32 
Wir behandeln in Info gerade relationale Datenbanken mit Microsoft Access.
Nun sollen wir anhand von Informationen über eine Softwarefirma ein ERM und daraus dann eine Datenbank dafür entwickeln.
Das ist ja an sich nicht das Problem, nur sind die Vorgaben für den Aufbau der Datenbank IMHO ungünstig.
Es soll u.a. drei Tabellen "Angestellter", "Programmierer" und "IT-Berater" geben.
Die Attribute jeder Tabelle sind:
- Personalnummer
- Vorname
- Nachname
- Geburtsdatum
- Adresse
Weiterhin gibt es die Angaben:
- Ein IT-Berater ist ein Angestellter. Ein Angestellter kann IT-Berater sein, muss aber nicht.
- Ein Programmierer ist ein Angestellter. Ein Angestellter kann Programmierer sein, muss aber nicht.
Die Primärschlüssel sind in allen Tabellen die Personalnummern.

Nun zum Problem:
Warum speichert man die Adresse, Namen und Geburtsdatum von Programmierern und IT-Beratern noch einmal ab. Damit verbraucht man unnötig Speicherplatz und die Aktualität der Daten kann Schaden nehmen. Man könnte doch genauso gut die Adresse eines Programmierers erfahren, indem man diese anhand seiner Personalnummer aus der Angestellten-Tabelle holt.
Habe ich nicht Recht? :flehan:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: Sa 23.12.06 18:37 
user profile iconMarco D. hat folgendes geschrieben:
Man könnte doch genauso gut die Adresse eines Programmierers erfahren, indem man diese anhand seiner Personalnummer aus der Angestellten-Tabelle holt.

Ja. Und das sollte auch so gemacht werden :) Schönen Gruß an deinen Info-Lehrer ;)


MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 23.12.06 18:39 
user profile iconMrSaint hat folgendes geschrieben:
user profile iconMarco D. hat folgendes geschrieben:
Man könnte doch genauso gut die Adresse eines Programmierers erfahren, indem man diese anhand seiner Personalnummer aus der Angestellten-Tabelle holt.

Ja. Und das sollte auch so gemacht werden :)

:zustimm: Ich frage nach, ob das auch so geht. Schließlich halte ich mich damit ja nicht an die Aufgabe, wenn ich es anders mache :!:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Sa 23.12.06 19:11 
user profile iconMarco D. hat folgendes geschrieben:
..
Nun zum Problem:
Warum speichert man die Adresse, Namen und Geburtsdatum von Programmierern und IT-Beratern noch einmal ab. ..


Was wird nochmal abgespeichert ? :shock: Der will auf Master-Detail Relationen raus. Über die ID der Programmierer sollen z.B. aus der Tabelle "Angestellter" alle Daten geliefert werden.

_________________
Gruß
Hansa
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 23.12.06 19:26 
user profile iconhansa hat folgendes geschrieben:
[Was wird nochmal abgespeichert ? :shock: Der will auf Master-Detail Relationen raus. Über die ID der Programmierer sollen z.B. aus der Tabelle "Angestellter" alle Daten geliefert werden.

Kann damit nicht wirklich was anfangen, sry. Kannst du dich bitte anders ausdrücken?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 23.12.06 19:27 
user profile iconhansa hat folgendes geschrieben:
Was wird nochmal abgespeichert ? :shock: Der will auf Master-Detail Relationen raus. Über die ID der Programmierer sollen z.B. aus der Tabelle "Angestellter" alle Daten geliefert werden.

Das denke ich auch. Alles andere wäre ja grob fahrlässig von dem Info Lehrer !!

_________________
In the beginning was the word.
And the word was content-type: text/plain.
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Sa 23.12.06 19:33 
Oh je, wie denn anders ausdrücken bei dem bisschen an Infos ? :shock: Es scheint um die berühmte Employee - Tabelle zu gehen. Die Abteilung ist dann ein Stammdatensatz für die Angestellten - Tabelle.

_________________
Gruß
Hansa
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 23.12.06 19:42 
Also wir sollen ja auch noch "Master- und Detailtabellen" bestimmen. Aber das hatten wir noch nicht im Unterricht.

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Sa 23.12.06 19:48 
Damit sind wir genau bei den von meiner Glaskugel gezeigten Fragestellungen, um das es wohl geht. Und jetzt gilt : Gehirn einschalten. :lol:

_________________
Gruß
Hansa
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 23.12.06 19:52 
user profile iconhansa hat folgendes geschrieben:
Damit sind wir genau bei den von meiner Glaskugel gezeigten Fragestellungen, um das es wohl geht. Und jetzt gilt : Gehirn einschalten. :lol:

Was willst du jetzt von mir :?!?: Also ist das so gewollt und wir sollen die überflüssigen Daten selbst entfernen oder was?

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Sa 23.12.06 19:56 
user profile iconMarco D. hat folgendes geschrieben:
Was willst du jetzt von mir :?!?:


Hä ? :shock: Nichts. :mrgreen:

_________________
Gruß
Hansa
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 23.12.06 20:06 
user profile iconhansa hat folgendes geschrieben:
user profile iconMarco D. hat folgendes geschrieben:
Was willst du jetzt von mir :?!?:


Hä ? :shock: Nichts. :mrgreen:

Was meinst du mit "Gehirn einschalten"? :gruebel:
Kann ich gerne machen, wenn du mir sagst, was genau du meinst...

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Raffo
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 300



BeitragVerfasst: Sa 23.12.06 21:04 
also ich würde ebenfalls alle personen in EiNER datenbank speichern, aber zusätzlich noch dbcheckboxen für jede gruppe definieren - samt index, damit zb sofort alle programmierer angelistet werden.
Matthias-K
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271

Win95, Win98, Win2000, WinXP, Linux
D2, D4 Client/Server, D5 Enterprise, D6 Enterprise, D7 Enterprise, Delphi2005, C/C++ 3.0, C/C ++ 5.0, C/C++ 6.0
BeitragVerfasst: Mo 25.12.06 12:31 
moin,

das ist die günstigste allternative. eine tabelle, wo halt per booleanches feld gesagt wird, welcher gruppe er angehört.

wäre zumindest mein weg der lösung! alles andere wäre relativ sinnlos.

geht natürlich auch, das in 3 tabellen unterzubringen. da aber ohne kopfschmerzen wegzukommen ist unwahrscheinlich.

man muss halt nur dann die sql abfragen entsprechend modifizieren!

geht scho. ist schwachsinnig, aber es geht!

mfg matthias

_________________
Ein Spezialist ist ein Mensch, der immer mehr von immer weniger weis, bis er alles von nichts weis!
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mo 25.12.06 14:36 
Also habe ich Recht, dass das so überflüssig ist. Also wir behandeln im Unterricht erst noch "Master- und Detailtabellen". Mag sein, dass das so gewollt ist, dass wir Schüler die überflüssigen Daten alleine entfernen sollen. Deswegen warte ich erstmal ab und spreche meine Lehrerin zu gegebener Zeit an. ;)

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot