3.1 Objects and Associations
TAO objects are typed nodes, and TAO associations
are typed directed edges between objects. Objects are
identified by a 64-bit integer (id) that is unique across all
objects, regardless of object type (otype). Associations
are identified by the source object (id1), association
type (atype) and destination object (id2). At most one
association of a given type can exist between any two
objects. Both objects and associations may contain
data as key→value pairs. A per-type schema lists the
possible keys, the value type, and a default value. Each
association has a 32-bit time field, which plays a central
role in queries1.
Object: (id) → (otype, (key _ value)∗)
Assoc.: (id1, atype, id2) → (time, (key _ value)∗)
Figure 1b shows how TAO objects and associations
might encode the example, with some data and times
omitted for clarity. The example’s users are represented
by objects, as are the checkin, the landmark, and Cathy’s
comment. Associations capture the users’ friendships,
authorship of the checkin and comment, and the binding
between the checkin and its location and comments.
Actions may be encoded either as objects or associations.
Both Cathy’s comment and David’s ‘like’ represent
actions taken by a user, but only the comment results
in a new object. Associations naturally model actions
that can happen at most once or record state transitions,
such as the acceptance of an event invitation, while repeatable actions are better represented as objects.
Although associations are directed, it is common for
an association to be tightly coupled with an inverse edge.
In this example all of the associations have an inverse
except for the link of type COMMENT. No inverse
edge is required here since the application does not traverse from the comment to the CHECKIN object. Once
the checkin’s id is known, rendering Figure 1a only requires
traversing outbound associations. Discovering the
checkin object, however, requires the inbound edges or
that an id is stored in another Facebook system.
The schemas for object and association types describe
only the data contained in instances. They do not impose
any restrictions on the edge types that can connect to a
particular node type, or the node types that can terminate
an edge type. The same atype is used to represent authorship of the checkin object and the comment object in
Figure 1, for example. Self-edges are allowed.
3.1 วัตถุและสมาคม
เต๋าวัตถุพิมพ์โหนด และสมาคมเต๋า
พิมพ์ตรงขอบระหว่างวัตถุ วัตถุที่ถูกระบุเป็นจำนวนเต็ม 64 บิต
( ID ) ที่เป็นเอกลักษณ์ในทุก
วัตถุ โดยไม่คำนึงถึงชนิดของวัตถุ ( otype ) สมาคม
ถูกระบุโดยแหล่งวัตถุ ( id1 ) ประเภทสมาคม
( atype ) และวัตถุปลายทาง ( ไอดีทู ) ที่ที่สุด
ความสัมพันธ์ของการได้รับประเภทสามารถอยู่ระหว่างสอง
วัตถุ ทั้งวัตถุและสมาคมอาจมี
ข้อมูลเป็นคู่ค่าคีย์→ keyboard - key - name . ต่อรูปแบบรายการประเภท
คีย์ที่สุด ประเภทค่า และค่าเริ่มต้น . แต่ละสมาคมมีข้อมูลเวลา
32 บิต ซึ่งบทบาทเป็นศูนย์กลางใน queries1
.
วัตถุ ( ID ) → keyboard - key - name ( otype ( ค่า _ คีย์ ) ∗ ) หัวข้อ : (
id1 atype ไอดีทู→ keyboard - key - name ( , , ) เวลา ( ค่า _ คีย์ ) ∗ )
รูป 1B แสดงให้เห็นว่าเต๋าวัตถุและสมาคม
อาจจะเข้ารหัสข้อมูลและตัวอย่าง บางครั้ง
ไว้เพื่อความชัดเจน ผู้ใช้ของตัวอย่างที่เป็นตัวแทน
โดยวัตถุ เป็น เช็คอิน , สถานที่ , และ แคท
แสดงความคิดเห็น สมาคมจับตึงผู้ใช้ '
ผลงานของเช็คอินและแสดงความคิดเห็น และผูก
ระหว่างเช็คอิน สถานที่และความคิดเห็น .
การกระทำอาจจะเข้ารหัสเป็นสมาคมวัตถุหรือ .
ทั้งแคทและความคิดเห็นของเดวิด ' ' เป็นตัวแทน
การกระทำโดยผู้ใช้ แต่ผลความคิดเห็น
ในวัตถุใหม่ สมาคมธรรมชาติที่สามารถเกิดขึ้นในรูปแบบการกระทำ
มากที่สุดเมื่อรัฐหรือบันทึกการเปลี่ยน
เช่นการยอมรับเหตุการณ์เชิญ , ในขณะที่การกระทำซึ่งดีกว่า
แสดงเป็นวัตถุแม้ว่าสมาคมโดยตรง มันเป็นเรื่องปกติสำหรับ
สมาคมจะให้คู่กับขอบผกผัน .
ในตัวอย่างนี้ทั้งหมดของสมาคมมีการผกผัน
ยกเว้นการเชื่อมโยงประเภทแสดงความคิดเห็น ไม่ผกผัน
ขอบจะต้องมาสมัครไม่ทราเวิร์ส จากความเห็นในการเช็คอินวัตถุ เมื่อ
ของเช็คอิน ID เป็นที่รู้จักกัน , การแสดงผลรูปที่ 1A เท่านั้นต้อง
traversing สมาคมโปรแกรม การค้นพบวัตถุ
หล่ะ แต่ต้องขอบขาเข้าหรือ
ที่บัตรจะถูกเก็บไว้ในระบบอื่น Facebook .
ร่างวัตถุประสงค์และประเภทสมาคมอธิบาย
เฉพาะข้อมูลที่มีอยู่ในกรณี พวกเขาไม่ได้ให้
ข้อจำกัดชนิดขอบที่สามารถเชื่อมต่อกับ
ชนิดโหนดเฉพาะ หรือโหนดชนิดที่สามารถยุติ
ขอบพิมพ์เหมือนกัน atype ใช้แทนการประพันธ์ของวัตถุและวัตถุในการเช็คอินความคิดเห็น
รูปที่ 1 ตัวอย่าง ขอบ
ตนเองที่ได้รับอนุญาต
การแปล กรุณารอสักครู่..
