Thanks For Using The Performance of a Lifetime!



Chatroom Auctions & Paid Classifides DDDPL's Additional Job Search










FAQ
Last visit was: Sat Dec 16, 2017 7:16 am
It is currently Sat Dec 16, 2017 7:16 am



 [ 1 post ] 
 Computer Mice : Their Telephone Origins 
Author Message
User avatar

Joined: Mon Sep 13, 2010 1:47 pm
Posts: 45372
Post Computer Mice : Their Telephone Origins
Computer Mice : Their Telephone Origins
by: Maxwell Rubins



Like so many developments that we take for common on our computers the humble mouse had its origins in the innovative work done for more than two decades at the Xerox Palo Alto Research Center (PARC). The PARC mouse had two rollers for horizontal and vertical motion and a single button. The deucedly boxy shape was favored by many of developers at PARC and remarkably has persisted through many mouse (or mice) incarnations.

Firstly the Microsoft mouse design has had major impacts in the mice industry. Microsoft mice always had ergonomic design. The © 2001-Present ArticleCity.com

This article was posted by permission. ü
f5535d3079)Many-to-Many Relationships in O/R MappingÏMany-to-Many Relationships in O/R Mapping
by: Iqbal M. Khan



If you are developing an object oriented .NET application that has to talk to a database, you'll inevitably map objects to a relational model. And, most likely you'll face situations where many-to-many relationships exist in your database. This article describes how you can handle many-to-many relationships in O/R mapping.

Most .NET applications are object oriented and at the same time they have to deal with relational databases. This creates a difficulty for the developers because they have to figure out how to map their objects to the tables in the database. Sometime, there is a one to one mapping between an object and a table and at other times, one object may consist of data from multiple tables or subset of data from one table.

The most important thing one can achieve in O/R Mapping is to capture the logical data model design in the object model of the application. This makes it really easy to design, develop, and later maintain this object model. We'll try to follow this rule when mapping many-to-many relationships to objects.

Data Model

So, what does a many-to-many relationship look like in the database. Here is an example:

Here you can see a many-to-many relationship between t_course and t_student tables via a bridge table called t_course_taken. The bridge table's primary key consists of two foreign keys coming from each of the corresponding tables. Additionally, the bridge table has additional attributes for the many-to-many relationship itself.

Domain Object Model

First of all, let's see how this would be captured in the object model in C#.

public class Course {
// Some of the private data members
// ...
public Course() {}

// Properties for Course object
public String CourseId { get {return _courseId;} set {_courseId = value;}}
public String Name { get {return _name;} set {_name = value;}}
public int CreditHours { get {return _creditHours;} set {_creditHours = value;}}

// 1-n relationship properties
public ArrayList CourseTakenList { get {return _courseTakenList;} set {_courseTakenList = value;}}
}
public class CourseTaken {
// Some of the private data members
// ...
public CourseTaken() {}

// Properties for CourseTaken object
public String CourseId { get {return _courseId;} set {_courseId = value;}}
public long StudentId { get {return _studentId;} set {_studentId = value;}}

public int Semester { get {return _semester;} set {_semester = value;}}
public int AcademicYear { get {return _academicYear;} set {_academicYear = value;}}
public float Grade { get {return _grade;} set {_grade = value;}}

// n-1 relationship properties
public Student Student { get {return _student;} set {_student = value;}}
public Course Course { get {return _course;} set {_course = value;}}
}

public class Student {
// Some of the private data members
// ...
public Student() {}

// Properties for Course object
public long StudentId { get {return _studentId;} set {_studentId = value;}}
public String Name { get {return _name;} set {_name = value;}}
public DateTime BirthDate { get {return _birthDate;} set {_birthDate = value;}}

// 1-1 relationship properties
public ArrayList CourseTakenList { get {return _courseTakenList;} set {_courseT


Fri Aug 03, 2007 5:43 pm
 [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.