Creating New Types with the Schema Editor
The Schema Editor provides an easy interface for creating and editing the properties, known collectively as the schema, for a type. This topic covers the basic process of creating a new property as well as some of the available options.
Introduction
So as you've been looking around Freebase maybe you've thought "Hey, I would really like to create a personal domain about New York Jewish Comedians of the 1960s, but there's no Jewish Comedian type I can add to topics to bring them into my domain." Or maybe you've thought the same thing about Napa Valley wines, or buildings designed by Frank Gehry, or American science fictors of the 20th Century, or any of a million other possibilities of things that would make an interesting collection of data. The solution to this problem is to create your own types within a personal domain and then apply them to existing Freebase topics, or create new topics of your own. A type can be as simple or complex as you want, with one or a dozen properties, but the Schema Editor provides an easy way to go through the process of creating the set of properties, also known as the schema, that constitute the essential information about a type.Before you start you should make sure that you have read both the Beginner's Guide: Creating Schemas and the Data Modeling Guide and have a solid grasp of data modeling concepts. You should also have a look at the Guide to Freebase Types and Adding Properties to Types to familarize yourself with the options for creating properties and types.
Contents
- Permissions
- Opening Schema Editor and Selecting the Type Display
- Creating Type Properties
- Editing and Deleting Types and Properties
- Adding Incoming Properties and Reciprocal Links Between Properties
Permissions
You must be a domain administrator to create and edit types within a domain. However, Experts can create and edit the type and property descriptions.
Opening Schema Editor and Selecting the Type Display
- If you're using the Schema Editor to create a new type, first navigate to the domain where you want to use the new type. Click edit next to Browse types and enter the name of the new type. If you're editing an existing type, click on the name of the type.
- Click View Properties . This opens the Schema Editor.
- Click Edit next to Display to choose a display option.
- Standard type is the default setting, and is used for types that contain several properties to be entered by the user.
- Enumerated type refers to a type where users can only select from a predetermined list of properties. For example, Gender is an enumerated type where users can only select male or female . After selecting Enumerated type, click Edit list of properties and enter the properties for users to select from.
- Compound Value Type refers to a type that serves as a link between two other types. For example, the Musical Group Membership type is a CVT that links together the Musical Group Member and the Musical Group types.
Creating Type Properties
There are three options for adding properties to a type.
- Delegating properties from another type
- Including properties from another type
- Adding new properties to the type
Delegating Properties from Another Type
Use this method if you only want to include selected properties from another type. If you want to use all the properties of another type, follow the instructions for including another type. You might also want to read the Delegated Properties topic to understand the relationship between types sharing a delegated property.- Click Add New Property .
- Enter a name for the property.
- Begin entering the name of the property you want to delegate in Or use a property from another type , then select it from the autocomplete suggestions.
- Click Save .
Including Existing Properties from Another Type
- Many types include other types as a way of making use of their properties without having to re-create them. For example, all new types include the Topic type by default. If your new type is a way of classifying people, you will probably want to include the Person type. The Film Actor type, for example, includes the Person type. Before creating your new type you should spend a little time researching the types that already exist in Freebase to see if any of them can be included.
- Note that when you include other types in your type, you must include all the properties of the included type, and the names of the properties cannot be edited. In addition, any topics you create with your new type will also be typed under the included type.
- Click Add Types to Include .
- Enter the name of the type to include.
- Click Save .
Creating New Properties
- Click Add New Property
- Enter a name for the new property.
- Note that the Key is generated automatically from the property name. The key is used for referencing the property in the database, and provides a way to create queries for that property in the Metaweb Query Language. The most important thing to know about the key is that even if you change the name of the property, the key will stay the same unless you edit it, as described below.
- Select the Data Type for the property. This specifies the kind of information that should be entered for the property.
- When you select a data type you also need to specify the specific kind of information that should be entered for that type. For example, if you select Date/Time , you need specify whether the information entered should be Date/Time , Day of the Week , Date of Year , or Time Interval .
- If you want the property to be a link to another topic, you need to specify what type of topic should be entered. For example, the Film type includes a property called Directed By . A topic entered in this property field should include the Film Director type.
- You can create new types by entering a name for the type in the data type field, then click Create new type .
- After selecting the type of topic to link to, you can create a reciprocal link from your new property to a corresponding property in the linked type. For example, the Film Director type has a property called Films Directed , which links back to the Film type through the Directed By property. The advantage of creating a reciprocal link is that entering information for that property in one topic will cause the same information to be entered in the linked property in another topic. For example, when a director's name is entered for the Film Director property in a Film topic, the film’s name will automatically be entered in the Films Directed property for that director's topic.
- To easily add a reciprocal link between the properties in two types, Save the new property after entering the type of topic it should link to.
- Click edit next to the new property's name to open it again.
- Click Create a return property .
- Select the Display Preferences for the property.
- Disambiguator will display the value entered for that property next to the topic name as a way of distinguishing it from other topics with the same or similar name. The Film type, for example, has an Initial Release Date property that is set as a disambiguator. This means on any topic that displays films, the film's name will be paired with its Initial Release Date. For example, Loverboy is a film directed by Kevin Bacon. When Loverboy is listed as one of the films directed by Kevin Bacon in his biographical topic, the initial release date is displayed next to it.
- There is also an option to allow only one value to be entered for the property, or, in the case of multiple entries, displaying them as a vertical or horizontal list.
- Select Hide if you don't want your property to display on topic pages. This is useful if you are developing a schema and are unsure if the property works the way you want it to. Hiding a property is also an alternative to deleting it that enables you to preserve any information you've entered for that property in your topics, and enables access to the property from within other applications.
- Click Save to finish creating your new property.
Editing and Deleting Types and Properties
After you've created a type or property, you can easily edit them to change their names, keys, or data types, or delete them entirely.
- To edit a property, click Edit next to the property name. You can now edit the property name, its key, any of its other parameters.
- To edit a type, click the type name in the domain name, then click View Properties to edit the type parameters.
- To delete a property, click Edit next to the property name, then click Delete Property .
- To delete a type, click delete to the right of the type's display name.
Adding Incoming Properties and Reciprocal Links Between Properties
After you've created a new type, other users might link to it as the data type for a property in one of their own types. In that case you will see a header entitled Incoming Properties at the bottom of your type's properties, and under that a list of the properties that make use of your type for their data type. You can set up a reciprocal, or return, link between your type and the type with the incoming property.
- Click Create a Return link .
- Enter the name for the property you are creating in your original type.
- Click Save . You now have a new property in your type that expects a topic of the incoming type.
- Note that to delete the property you've created, the property that uses your type must first be deleted from the incoming, or Master, type.
- Because the links between the properties in the two types are reciprocal, entering a topic name for a reciprocal property in Topic 1 will cause Topic 1's name to be entered for the reciprocal property in the topic that was entered for Topic 1's property. For example, the Films Directed property in the Film Director type has a reciprocal link to the Film Director property in the Film type. Entering a director's name for the Film Director property in a Film topic will cause the film’s name (the topic name) to be entered in the Films Directed property for that director's topic.
Recent Discussions about Creating New Types with the Schema Editor
There are no conversations on this topic. Would you like to start one?
Start the Discussion
