Sho372 / pokemon-app

pokemon app
1 stars 0 forks source link

Designing local database table schema #2

Open Sho372 opened 4 years ago

Sho372 commented 4 years ago

Designing local database table schema

Sho372 commented 4 years ago

local database design

https://docs.google.com/spreadsheets/d/1S5U-m__IxEn-c87-e3w4kvBojmUieeaEef5VQ7P4feM/edit?usp=sharing

Sho372 commented 4 years ago

Modify the schema to fit the coredata.

Sho372 commented 4 years ago

https://stackoverflow.com/questions/4084548/can-we-define-auto-increment-attribute-in-core-data/4084635

akaHEPTA commented 4 years ago

Sho would u please implement Team and History as a core data object? The model structures are already committed, so we only need schemas and handlers.

Sho372 commented 4 years ago

I've implemented Team and History core data object. I merged it to dev. I don't think I understand how to use the core data properly, but it's working anyway.

Sho372 commented 4 years ago

Note:

Do not do this. Using foreign keys is something that you do in a database. CoreData is not a database.

https://stackoverflow.com/questions/40083934/coredata-swift-3-how-to-join-two-entities (Never mind this note.)

CoreData isn't a Database. It's an object persistence layer. There is no concept of primary keys or foreign keys in CoreData.

https://stackoverflow.com/questions/4075126/how-to-set-primary-key-and-foreign-key-in-core-data