Why do Core Data sqlite table columns start with 'Z'?

Posted by Dia on Programmers See other posts from Programmers or by Dia
Published on 2012-12-11T06:01:56Z Indexed on 2012/12/11 11:16 UTC
Read the original article Hit count: 279

Filed under:

I was looking at the sqlite table that Core Data generates and noticed that all table columns start with 'Z'. I realize this is an implementation detail, but I was curious as to why that's the case and if there was a design decision involved in this. Anyone happen to know or guess why?

Here's a sample schema output of Core Data sqlite database:

sqlite> .schema
CREATE TABLE ZPOST ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZPOSTID INTEGER, ZUSER INTEGER, ZCREATEDAT TIMESTAMP, ZTEXT VARCHAR );
CREATE TABLE ZUSER ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZUSERID INTEGER, ZAVATARIMAGEURLSTRING VARCHAR, ZUSERNAME VARCHAR );
CREATE TABLE Z_METADATA (Z_VERSION INTEGER PRIMARY KEY, Z_UUID VARCHAR(255), Z_PLIST BLOB);
CREATE TABLE Z_PRIMARYKEY (Z_ENT INTEGER PRIMARY KEY, Z_NAME VARCHAR, Z_SUPER INTEGER, Z_MAX INTEGER);

© Programmers or respective owner

Related posts about ios