{{adMap.article_top.title}}
{{adMap.article_top.cta}}

#教學 Relational model
程式設計板

|

{{ articleMoment(createdAt) }}

Relational model: There are four basic constraint in relational model. These constraints will be explained respectively. 1. domain constraint : Each set of attributes has an atomic value, which is in the domain. 2. key constraint : All tuple in a relation must be distinct. In other words, you can find a column which does not have the same elements in it. 3. Entity Integrity constraint : The column which is be regard as a key can not have an element that is 'Null'. 4. Referential Integrity constraint : Suppose that we have a set of attributes FK in relation schema R1 which is a foreign key of R1 that references R2. D(FK) = D(PK) PK is the primary key of R2 ( Both domain must be the same. In other words, it should be the same set) t1[FK]=t2[PK] or t1[FK] is NULL , The value R1 wants to reference must exist in R2 There are some other constraints established by future generations. Semantic integrity constraint : ( 語意限制 ) The constraint established by the developer when making the database. For example, every students' class is between 1 to 10. If the number in the column of class No. was bigger than 10 or smaller than 1, the semantic integrity constraint has been violated. When you are designing a database, you have to give a condition to the computer to let it know when to detect whether the constraint has been violated or not. This kind of constraint can be static or dynamic. The example mentioned above is static. The following example is a dynamic constraint. The grade of the student can not be smaller than before. Maybe someone will be confused about why it is a dynamic constraint. It is because the base will be changed by the year you're in school. The picture below is an example relational model. https://i.imgur.com/3ZIUPMd.png My English is really poor. If there is any mistake about the grammar, please accept my apology. If you want the process of changing ER model to relational model, please PM me. I'll find a way to give it to you.


  回文

你可能有興趣的文章...

{{adMap.article_bottom.cta}}
{{adMap.article_bottom.title}}
{{adMap.article_bottom.content}}

全部留言

目前沒有留言,快來搶頭香!


登入後發表留言






確定要刪除此文章?
#教學 Relational model

Relational model: There are four basic constraint

檢舉{{reportFloor? '留言B'+reportFloor: '文章'}}
檢舉{{'原po回覆B'+reportFloor+'留言'}}
請選擇刪除文章原因
請選擇刪除留言原因
附件說明
插入圖片

請點文字方塊右下角的 插入圖片,或直接插入 imgur 圖片網址。

https://i.imgur.com/8wlRxfM.png
輸入
顯示

插入 Youtube 影片

直接將影片網址貼上。

https://www.youtube.com/watch?v=wvzfOyW0ZMo
輸入
顯示

分享 Meteor 文章

直接將文章網址貼上。

https://meteor.today/article/8ZgvtS
輸入
您即將進入之文章內容需滿十八歲方可瀏覽

根據「電腦網路內容分級處理辦法」修正條文第六條第三款規定,已於網站首頁或各該限制級網頁,依台灣網站分級推廣基金會規定作標示。若您尚未年滿十八歲,麻煩點選離開。若您已滿十八歲,一樣不可將本區之內容派發、傳閱、出售、出租、交給或借予年齡未滿18歲的人士瀏覽閱讀,或將本網站內容向該人士出示、播放或放映。

離開
回覆 B{{reply.floor}}