comp.lang.ada
 help / color / mirror / Atom feed
From: "ramesh" <ramesh.mudedla@gmail.com>
Subject: Re: need help with errors im getting
Date: 4 Jul 2005 14:16:13 -0700
Date: 2005-07-04T14:16:13-07:00	[thread overview]
Message-ID: <1120511773.743468.134910@g47g2000cwa.googlegroups.com> (raw)
In-Reply-To: <aofhc1p0gvdcpmfsocp3bvet3qm8uaq9ss@4ax.com>

Hi can anybody help me with the linked attributes part, I have to
create a link attribute between Department and Faculty which has
Faculty's Title and salary.

Titles: Chair, Professor, Assistant Professor, Lecturer.

A department can have atmost 10 Faculty. A Faculty can work for no more
than 2 departments.

The Faculty has one more linked attribute of Faculty's Rating. The
chair is responsible for the rating.
chair(0..1) and Prof(0..9)

According to me the relation between Department and Faculty is m:n,
and relation between chair and prof is 1:m, i have no idea how to
acheive this.
i wrote a code right now for 1:1 relation ship

specification:

type Hire_data_type;
type Hire_Data_pointer is access Hire_Data_type;

type Hire_data_Type is record
JOb_title : JOb_Title_Type := none;
Salary : Money := 0.00;
Faculty_p : Faculty_ptr;
end record;

Body:

procedure Hire(aDepartment : in out Dept_ptr; aFaculty : in out
Faculty_ptr; aHire : in out Hire_Data_pointer; aTitle : in
Job_Title_Type;aSalary: Money) is
Hire_Data_Pt: Hire_Data_Pointer;
begin
Hire_Data_Pt := new Hire_Data_Type;
aDepartment.Faculty_pt := Hire_Data_pt;
Hire_Data_pt.Faculty_p := aFaculty;
Hire_Data_pt.Job_Title := aTitle;
Hire_Data_pt.salary := aSalary;
end Hire;

Can anybody help me how to proceed with this.

Thanks.




      reply	other threads:[~2005-07-04 21:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-24 21:59 need help with errors im getting ramesh
2005-06-24 22:42 ` Ed Falis
2005-06-25  1:43   ` ramesh
2005-06-25  6:17 ` Jeffrey Carter
2005-06-25 18:38   ` ramesh
     [not found]     ` <fovrb1t2l3nvsq6qden8vf2fkmgvg3614h@4ax.com>
     [not found]       ` <6g5sb1ptj1611oq6vbiirutlj9gv5lv39m@4ax.com>
2005-06-26  8:12         ` ramesh
2005-06-26  9:23           ` ramesh
     [not found]           ` <fu9ub1la6ofoc361j6pec48je2efh0b9e9@4ax.com>
     [not found]             ` <l3eub1l2ru5pguun3kitesfmgnfngur7vp@4ax.com>
2005-07-02  8:14               ` ramesh
2005-07-04  5:38               ` Dave Thompson
2005-07-04 21:16                 ` ramesh [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox