CRUD

Figure 851. Adding an entry Slide presentation
dn: uid=smith ❶,dc=betrayer,dc=com ❷
changetype: add ❸
objectClass: inetOrgPerson ❹
objectClass: organizationalPerson ❹
objectClass: Person ❹
objectClass: top ❹
uid: smith ❺
cn: Jill Smith ❻
sn: Smith ❻

❶

Adding an entry having the primary key value ("uid", "smith"). This combination is guaranteed to be unique within the set of all siblings having the common parent node dc=betrayer,dc=com.

❷

To be appended to. In this case its simply the DIT's root.

❸

The operation creates an adds a new node to the tree. This line may be omitted since adding a node is the default.

❹

Object classes represent a schema describing the structure of instances. The inetOrgPerson object class is part of an inheritance hierarchy starting from the abstract structural class top.

❺

The uid value being defined in object class inetOrgPerson must be repeated here irrespective of the unique key definition provided by ❶.

❻

cn alias commonName and sn alias surname are mandatory attributes being defined in object class Person.


Figure 852. Adding a new attribute Slide presentation
Operation Result
dn: uid=smith,dc=betrayer,dc=com ❶
changetype: modify ❷
add: description ❸
description: New employee ❹
dn: uid=smith,dc=betrayer,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: Jill Smith
sn: Smith
uid: smith
description: New employee

❶

Addressing an existing inetOrgPerson entry.

❷

Operation: Modify entry.

❸

Add a description attribute.

❹

The value to be set.


Figure 853. Replacing an attribute value Slide presentation
Operation Result
dn: uid=smith,dc=betrayer,dc=com ❶
changetype: modify ❷
replace: description ❸
description: Long term employee ❹

dn: uid=smith,dc=betrayer,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: Jill Smith
sn: Smith
uid: smith
description: Long term employee

❶

Addressing an existing inetOrgPerson entry.

❷

Operation: Modify entry.

❸

Replace the description attribute.

❹

The replacement value to be set.


Figure 854. Deleting an attribute entirely Slide presentation
Base state Operation Result
dn: uid=smith,dc=betrayer,dc=com
...
uid: smith
commonName: Jill Smith
surname: Smith
description: Long term employee
dn: uid=smith,dc=...
changetype: modify
delete: description
dn: uid=smith,dc=betrayer,dc=com
...
uid: smith
commonName: Jill Smith
surname: Smith

Figure 855. Multi valued attributes Slide presentation
Operation Result
dn: uid=smith,dc=betrayer,dc=com 
changetype: modify 
add: mail ❶
mail: smith@company.com ❷
mail: jsmith@privateaccount.org ❸
dn: uid=smith,dc=betrayer,dc=com
...
sn: Smith
mail: jsmith@privateaccount.org ❷
mail: smith@company.com ❸

❶

Add a multivalued mail attribute.

❷

First value.

❸

Second Value.


Figure 856. Set semantics of multivalued attributes Slide presentation
Base state Operation
dn: uid=smith,dc=betrayer,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
uid: smith
commonName: Jill Smith
surname: Smith
dn: uid=smith,dc=betrayer,dc=com 
changetype: modify 
add: mail ❶
mail: smith@company.com ❷
mail: jsmith@privateaccount.org ❸
mail: smith@company.com ❹

ERR_13207_VALUE_ALREADY_EXISTS ❹
 The value 'smith@company.com' already
 exists in the attribute (mail)

❶

Add a multivalued mail attribute.

❷

First email value.

❸

Second email value.

❹

Duplicate email value being rejected.


Figure 857. Deleting selected attribute values Slide presentation
Base state Operation Result
dn: uid=smith,dc=betrayer,dc=com
...
cn: Jill Smith
mail: jsmith@privateaccount.org
mail: smith@company.com
mail: anonymous@keeput.org
dn: uid=smith,dc=...
changetype: modify
delete: mail
mail: smith@company.com
mail: anonymous@keeput.org
dn: uid=smith,dc=betrayer,dc=com
...
cn: Jill Smith
mail: jsmith@privateaccount.org