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.
"Where's the Jewish Comedian Type?"
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 fiction author 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.
Permissions
You must be a base administrator to create and edit types within a base. However, Experts can create and edit the type and property descriptions. For more information see the Understanding User Groups and Roles topic.
You can always create new types in your personal base (the one that's created by default when you register with Freebase) and then move them into other bases you administer.
Opening Schema Editor
There are three ways to open the Schema Editor to create or edit a type.
From Your Homepage
Types created from your homepage are automatically created as Draft Types in your personal base. To use them in other bases you have to use the move link in the Your Types tab on your homepage. Draft types will not show up in search results or autocomplete.
- Click Your Types.
- Click create.
- Enter the name for your new type and click Save.
- Click the name of the new type to open Schema Editor.
From Within a Base
- Navigate to the base where you want to add or edit a type.
- Click the schema tab.
- For an existing type, click the type name to open Schema Editor.
- To create a new type, click edit next to Types created for this base.
- Enter the name for your new type and click Save.
- Click the name of the new type to open Schema Editor.
From the Filter View of Topics
- When looking at a Filter View of topics, click the name of the type the view is based on next to the add more button at the top of the view. For example, if you were looking at the view of LA Bands, you would click on Musical Artist in the heading about 259 Musical Artist topics
- Click type schema to open the schema editor.
- Note that even if you've created the view, you can only edit types that are in a base you administrate.
Selecting the Type Display
- 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. See the Enumerated Types topic in the Guide to Freebase Types for more information.
- 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. For more information see the Compound Value Type topic in the Guide to Freebase Types.
Adding Properties to Types
There are four options for adding properties to a type.
- Add new properties to the type
- Include properties from another type (aka Delegated Properties)
- Include other types within your type
Before adding any new properties to your type, you should first familiarize yourself with the topics listed under Adding Properties to Types.
Adding New Properties to a Type
- 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 and Display Options for the property. This specifies the kind of information that should be entered for the property.
- Click Save when you're done creating your property.
- If you want the property value to be a link to another topic, you need to specify the type of topic that should be entered. This is referred to as the expected type or ECT for that property. 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. For more information see Incoming and Reciprocal Properties under Adding Properties to Types. Instructions on how to create reciprocal and incoming properties are described in the Creating Reciprocal Properties section below.
- 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. For Compound Value Types you must select Disambiguator for each property.
- 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.
Including Properties from Other Types
Properties from other types can be included in your type. This is known as a delegated property. There are limitations on your editing rights over delegated properties, and information entered for the property in the source type will be shared with the delegated property in your type. For more information, see Delegated Properties under Adding Properties to Types.
- Click Add New.
- Click use property from another type.
- Begin entering the name of the property you want to include, and autocomplete will suggest matches.
- Select the property you want to include.
- Click Save.
Note that you can also delegate properties from other types by using the Filter View. This is handy if you want to add multiple properties from another type and also add a list of topics to your new type. See the section on Advanced: Exporting Results, Viewing the MQL Query, and Adding Properties to Another Type in the Using the Filter View topic.
Including Existing Types in Your 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 Reciprocal Links Between Properties
Reciprocal properties are ones that share information, as explained in the topic Incoming and Reciprocal Properties. You can create a reciprocal relationship between properties within your own types, or between one of yours and someone else's (with their permission).
There are two ways to create reciprocal links between properties.
- By directly creating the link between the two properties when you create one or the other.
- By looking at the Incoming Properties section for your type and selecting the properties where you want to create a return link from the current type and property.
Creating Reciprocal Links When You Create a New Property
This method allows you to establish the relationship between two properties in different types at the same times, provided that you have administration rights over both types.
- Create your new property and enter the expected type as you normally would.
- Click Save.
- Click edit next to the new property's name to open it again.
- Click Create a return property.
- Schema Editor will now open the other type where you want to create a reciprocal link. Name the new property you want to create, and it will automatically have a link to the original type as the expected type for that property.
Creating Reciprocal Links with Incoming Properties
If you or another user has linked to your type as an expected type for one of their properties, you will see that property listed under the header Incoming Properties at the bottom of your type's properties. You can set up a reciprocal link with any of these properties.
- Click Create a Return link next to the name of the property that you want to create the link with.
- 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.
