آموزش دات نت, بانک های اطلاعاتی

آموزش برنامه نویسی دات نت

آموزش دات نت, بانک های اطلاعاتی

آموزش برنامه نویسی دات نت

One To One - Relationship

One-to-One Relationships

In a one-to-one relationship, a row in table A can have no more than one matching row in table B, and vice versa. A one-to-one relationship is created if both of the related columns are primary keys or have unique constraints.

This type of relationship is not common because most information related in this way would be all in one table. You might use a one-to-one relationship to:

  • Divide a table with many columns.

  • Isolate part of a table for security reasons.

  • Store data that is short-lived and could be easily deleted by simply deleting the table.

  • Store information that applies only to a subset of the main table.

The primary key side of a one-to-one relationship is denoted by a key symbol. The foreign key side is also denoted by a key symbol.

در رابطه یک به یک یا One to One-ستون های ارتباطی یا Relation Columns هر دو Primary Key کلید اصلی یا Uniqe Constraint هستند

در این Relation جدول A بیشتر از یک سطر متناسب Match Row نمیتواند در جدول B داشته باشد.

 این نوع Relation عمومی نیست و به دلایلی استفاده میشود.

۱- ۱ جدول با ستون های بسیار زیاد برای سهولت کار و دید بهتر آن جدول را به دو جدول تقسیم میکنیم.

۲-Isolateکردن جدول به دلایل امنیتی.

۳- اطلاعات که ارزش کمتری دارند و عمر کوتاهی دارند را به راحتی میتوان با Delete کردن جدول فرعی پاک کرد

اطلاعات مهم را میتوان در Main Table یا جدول اصلی نگه داشت.

نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد