CRUD

Figure 792. 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 793. 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 794. 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 795. 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 796. 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 797. 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 798. 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