SlideShare une entreprise Scribd logo
1  sur  16
Core Data – I
• History
• Fundamentals
• Under the Hood
• Demo
Enterprise Object
Framework
History -wiki
• Early 1990, NeXT created an Abstraction above
databases (DBKit-92)
• DBKit failed, in 94 a complete rewrite came as
form of EOF (4 people team!) – read only
• EOF2.0 in 95 – Context Editing
• EOF was useful for WWW and web apps
• In 96 first OO webserver WebObjects launched
with EOF at its heart
• 2005, EOF returns to OSX Tiger as Core Data
• June 2009 Released for iPhone OS 3.0
EOF -wiki
• Database tables are mapped to classes.
• Database columns are mapped to class
attributes.
• Database rows are mapped to objects (or class
instances)
• Can leverage inheritance
• EO is a class which models a physical or
conceptual object in the business domain.
Fundamentals
What is Core Data –Apple Doc.
• Core Data is a schema-driven object graph
management and persistence framework.
Fundamentally, Core Data helps you to save
model objects (in the sense of the model-view-
controller design pattern) to a file and get
them back again. This is similar to archiving,
but Core Data offers much more than that.
What is Core Data –Apple Doc.
• Provides an infrastructure for managing all the
changes to your model objects. This gives you
automatic support for undo and redo, and for
maintaining reciprocal relationships between
objects.
What is Core Data –Apple Doc.
• Allows you to keep just a subset of your model
objects in memory at any given time. This is
especially important on iOS where conserving
memory is critical.
• Allows you to maintain disjoint sets of edits of
your objects. This is useful if you want to, for
example, allow the user to make edits in one
view that may be discarded without affecting
data displayed in another view.
What is Core Data –Apple Doc.
• Uses a schema to describe the model objects.
You define the principal features of your model
classes—including the relationships between
them—in a GUI-based editor. This provides a
wealth of basic functionality “for free,”
including setting of default values and attribute
value validation.
What is Core Data –Apple Doc.
• Has an infrastructure for data store versioning
and migration. This lets you easily upgrade an
old version of the user’s file to the current
version.
Core Data Components
User
Managed Object Context
(managed object) (managed
object)
Persistent Store
Coordinator
Storage Storage Storage
Initialization
Data
Model
(.momd)
Persistent Sore
(sqlite/xml...)
Managed
Object
Context
In Action
User
Code
NSFetchRequest
MOMOC
Persistent Sore
Coordinator
n1
Persistent Sore momd
Under the Hood
• Core Data applications requires an Object
Model (NSManagedObjectModel)
– Model defines entities (NSEntityDescription)
Entities have three kind of Properties
(NSPropertyDescription):
• Attributes (NSAttributeDescription)
• Relationships (NSRelationshipDescription)
• Fetched Properties (NSFetchedPropertyDescription)
Demo

Contenu connexe

Tendances

Interface database metadata
Interface database metadataInterface database metadata
Interface database metadata
myrajendra
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code first
Confiz
 

Tendances (19)

Using entity framework core in .net
Using entity framework core in .netUsing entity framework core in .net
Using entity framework core in .net
 
Splitgraph: AHL talk
Splitgraph: AHL talkSplitgraph: AHL talk
Splitgraph: AHL talk
 
Interface database metadata
Interface database metadataInterface database metadata
Interface database metadata
 
Sqlite
SqliteSqlite
Sqlite
 
A brief introduction to SQLite PPT
A brief introduction to SQLite PPTA brief introduction to SQLite PPT
A brief introduction to SQLite PPT
 
Entity Framework Database and Code First
Entity Framework Database and Code FirstEntity Framework Database and Code First
Entity Framework Database and Code First
 
Hsqldb tutorial
Hsqldb tutorialHsqldb tutorial
Hsqldb tutorial
 
Data servers
Data serversData servers
Data servers
 
Database system
Database systemDatabase system
Database system
 
Hsqldb tutorial
Hsqldb tutorialHsqldb tutorial
Hsqldb tutorial
 
Php connectivitywithmysql
Php connectivitywithmysqlPhp connectivitywithmysql
Php connectivitywithmysql
 
Persitance Data with sqlite
Persitance Data with sqlitePersitance Data with sqlite
Persitance Data with sqlite
 
Mysql
MysqlMysql
Mysql
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code first
 
Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.
 
MySQL Cluster Schema management (2014)
MySQL Cluster Schema management (2014)MySQL Cluster Schema management (2014)
MySQL Cluster Schema management (2014)
 
MySQL Cluster page management (2014)
MySQL Cluster page management (2014)MySQL Cluster page management (2014)
MySQL Cluster page management (2014)
 
U-SQL Intro (SQLBits 2016)
U-SQL Intro (SQLBits 2016)U-SQL Intro (SQLBits 2016)
U-SQL Intro (SQLBits 2016)
 
Learn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database FirstLearn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database First
 

Similaire à Pune-Cocoa: Core data - I

Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
Toby Samples
 

Similaire à Pune-Cocoa: Core data - I (20)

Iphone programming: Core Data Tutorial for iOS
Iphone programming: Core Data Tutorial for iOSIphone programming: Core Data Tutorial for iOS
Iphone programming: Core Data Tutorial for iOS
 
Entity framework introduction sesion-1
Entity framework introduction   sesion-1Entity framework introduction   sesion-1
Entity framework introduction sesion-1
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
An Introduction To Oracle Database
An Introduction To Oracle DatabaseAn Introduction To Oracle Database
An Introduction To Oracle Database
 
The oracle database architecture
The oracle database architectureThe oracle database architecture
The oracle database architecture
 
IBM File Net P8
IBM File Net P8IBM File Net P8
IBM File Net P8
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
 
12_Data_Storage_Part_2.pptx
12_Data_Storage_Part_2.pptx12_Data_Storage_Part_2.pptx
12_Data_Storage_Part_2.pptx
 
UNIT 5- Other Databases.pdf
UNIT 5- Other Databases.pdfUNIT 5- Other Databases.pdf
UNIT 5- Other Databases.pdf
 
BackboneJS
BackboneJSBackboneJS
BackboneJS
 
04 integrate entityframework
04 integrate entityframework04 integrate entityframework
04 integrate entityframework
 
The CoFX Data Model
The CoFX Data ModelThe CoFX Data Model
The CoFX Data Model
 
Entity framework
Entity frameworkEntity framework
Entity framework
 
Ef overview
Ef overviewEf overview
Ef overview
 
Hibernate
HibernateHibernate
Hibernate
 
In Memory Database Essay
In Memory Database EssayIn Memory Database Essay
In Memory Database Essay
 
Database systems introduction
Database systems introductionDatabase systems introduction
Database systems introduction
 
Less 01 introduction
Less 01   introductionLess 01   introduction
Less 01 introduction
 
Handy annotations-within-oracle-10g
Handy annotations-within-oracle-10gHandy annotations-within-oracle-10g
Handy annotations-within-oracle-10g
 

Dernier

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Pune-Cocoa: Core data - I

  • 2. • History • Fundamentals • Under the Hood • Demo
  • 4. History -wiki • Early 1990, NeXT created an Abstraction above databases (DBKit-92) • DBKit failed, in 94 a complete rewrite came as form of EOF (4 people team!) – read only • EOF2.0 in 95 – Context Editing • EOF was useful for WWW and web apps • In 96 first OO webserver WebObjects launched with EOF at its heart • 2005, EOF returns to OSX Tiger as Core Data • June 2009 Released for iPhone OS 3.0
  • 5. EOF -wiki • Database tables are mapped to classes. • Database columns are mapped to class attributes. • Database rows are mapped to objects (or class instances) • Can leverage inheritance • EO is a class which models a physical or conceptual object in the business domain.
  • 7. What is Core Data –Apple Doc. • Core Data is a schema-driven object graph management and persistence framework. Fundamentally, Core Data helps you to save model objects (in the sense of the model-view- controller design pattern) to a file and get them back again. This is similar to archiving, but Core Data offers much more than that.
  • 8. What is Core Data –Apple Doc. • Provides an infrastructure for managing all the changes to your model objects. This gives you automatic support for undo and redo, and for maintaining reciprocal relationships between objects.
  • 9. What is Core Data –Apple Doc. • Allows you to keep just a subset of your model objects in memory at any given time. This is especially important on iOS where conserving memory is critical. • Allows you to maintain disjoint sets of edits of your objects. This is useful if you want to, for example, allow the user to make edits in one view that may be discarded without affecting data displayed in another view.
  • 10. What is Core Data –Apple Doc. • Uses a schema to describe the model objects. You define the principal features of your model classes—including the relationships between them—in a GUI-based editor. This provides a wealth of basic functionality “for free,” including setting of default values and attribute value validation.
  • 11. What is Core Data –Apple Doc. • Has an infrastructure for data store versioning and migration. This lets you easily upgrade an old version of the user’s file to the current version.
  • 12. Core Data Components User Managed Object Context (managed object) (managed object) Persistent Store Coordinator Storage Storage Storage
  • 15. Under the Hood • Core Data applications requires an Object Model (NSManagedObjectModel) – Model defines entities (NSEntityDescription) Entities have three kind of Properties (NSPropertyDescription): • Attributes (NSAttributeDescription) • Relationships (NSRelationshipDescription) • Fetched Properties (NSFetchedPropertyDescription)
  • 16. Demo

Notes de l'éditeur

  1. Legacy databases can be easily wrapped in EOF
  2. Legacy databases can be easily wrapped in EOF
  3. NSManagedObjectModel has references to zero or more NSEntityDescription objects. Each NSEntityDescription has references to zero or more NSPropertyDescription objects. NSPropertyDescription is an abstract class with three concrete implementations This small set of classes is enough to define any object model you will use when working on your Core Data projects.