ER diagram help, - entity-relationship

If I have an entity such as "Job" that has an attribute called "type" that specifies what type of job it would be, How would I add a relationship from it, to an entity such as "Recipient List" where the "Recipient List" is only applicable when "type" equals "delivery". What would this look like?

Related

Does Core Data take advantage of "Fetch Index(es)" containing a relationship when JOIN-ing behind the scenes?

Let's say I have a two Entity kinds in Core Data:
Pet
Owner
Assuming there's a one-to-many relationship between Owner and Pet (since each owner could have multiple pets)...
Is it better practice to define a Fetch Index on both the "name" and "owner" properties of the Pet Entity, or just the "name" property, if I wanted to fetch all Owners(s) with an Pet named "Charlie" for example?
This is assuming an Owner predicate like: pet.name == "Charlie"
(... I know the answer for SQLite, but since it's an abstraction on that, I wasn't clear on the expectation.)

Does "Consolidated Financial Data" and "Form 8-K" and similar legal terms count as named entities (for Named Entity Recognition)?

Thanks for helping. I am doing some named entity tagging and came across a few ambiguous terms.
I follow mostly the CoNLL2003 annotation guidelines and MUC-7 named entity definition (other annotation guidelines mostly share the same idea with these guidelines)
https://www.clips.uantwerpen.be/conll2003/ner/
https://www-nlpir.nist.gov/related_projects/muc/proceedings/ne_task.html
For the example sentence "I do business in North and South America", how should I tag "North and South America"? The whole phrase as one "Location" entity, or "North" and "South America" as two "Location" entities?
I am tagging some legal reports (EDGAR dataset from US Securities and Exchange Commission), so I encounter phrases like "Form 10", "Form 8-K", which are types of legal forms for US companies. Should these be treated as "Miscellaneous" named entities?
In these forms there are chapter names such as "Consolidated Financial Statements", "Management's Discussion and Analysis", should these be tagged as "Miscellaneous"?
If yes then phrases like "Annual Report", "Annual Meeting for Shareholders", "Common Stock", "Restricted Stock Unit" becomes quite ambiguous. It can be argued that they are the name of a type of "legal documents", or the name of type of "Financial Instruments". But these phrases are generic somehow and do not pinpoint one specific entity. Should they be "Miscellaneous" or "Outside of a named entity" (Not a Named entity)?

When to assert a 'Same Individual As' property to an individual in Protege?

I am new to Ontologies, so I apologize if seems like a very naive question.
For example, I have a class named 'PersonalInformation' and a subClass within it called 'Name'. PersonalInformation as an individual named 'Name' and Name (class) has individuals: 'FirstName', 'MiddleName', and 'LastName'. Do I set the 'Same Indidividual As' property as for Name (individual) as FirstName, MiddleName, and LastName, since they are all in essence names?
How do I set this up, and when is it appropriate to use the 'Same Individual As' property?
It is appropriate to assign the 'Same Individual As' axiom, when two individuals are named differently, but refer to one and the same instance. You could for example have one individual named after your real name and one named after your nickname. Both individuals describe the same person (and they would probably be an instance of a class called 'Person').
Now concerning your question, I wouldn't even use individuals, but model everything as classes, because they all describe a set of potential individuals. For example FirstName is a class that could contain individuals like 'Peter', 'George', 'Anna', etc.

Entity Relationship diagram: composite attributes vs entity

So I have this small problem, I am trying to make an ER Diagram and I have a student. For the student entity it says:
Record which school a student is in. A student must be attending one school. All schools contain at least one student.
You are to record the following information schools: their names(must be unique), # of students attending, and the principal name.
When I read this, it seems like "school" is a composite attribute or an entirely separate entity. Since it says "A student must be attending one school. All schools contain at least one student" should I make it an entity because I can't think of how to show this relationship via a composite attribute.
As I see it, school is a separate entity. A composite attribute would be something like a 'name' which consists of a 'first name' and a 'last name'. The school only consists of school and student only consists of student in your example.

UISearchDisplayController/NSFetchedResultsController with custom sort order

I'm implementing a search feature in my app. I would like the user to look up a word simultaneously in multiple attributes of a given Entity.
Here is an example for an Entity with 3 String attributes: Person
(firstName, lastName, notes)
Let's use a mock dataset with 3 people:
"Emily", "Bridges", "She will be in town real soon."
"Johnny", "Williams", "This dude is really cool."
"Will", "Smith", "He does not remember anything for some reason."
Now, let's assume the user is looking up the occurence "will" and that we run a case insensitive search. All three previously described people will match the word "will" thanks to the use of an orPredicateWithSubpredicates
Ideally I would like the results to be displayed in this order for relevancy purposes:
"Will", "Smith", "He does not remember anything for some reason."
"Johnny", "Williams", "This dude is really cool."
"Emily", "Bridges", "She will be in town real soon."
For this search feature "firstName" is more relevant than "lastName" which are both more relevant than the "notes" attribute.
Since I'm using a UISearchDisplayController, I also use an NSFetchedResultsController which requires an NSSortDescriptor. The problem for me now is what attribute/key I am going to use to init the NSSortDescriptor?
I've been through many posts already and thought a transient property could help me with this issue, but I can't figure out how/when to set up this transient property which could be named something like "sortKey" and be set to these values:
1: For a match on "firstName"
2: For a match on "lastName"
3: For a match on "notes"
Eventually I guess I could try to run three different requests but then I'd have to give up using NSFetchedResultsController and all its magic...
I don't know whether I'm hitting the limits of NSFetchedResultsController or something but any pointer would be great, thanks!
Joss.

Resources