# Schema & Data

**URL:** https://community.dreamfactory.com/c/schema-data/18.md

[Latest](https://community.dreamfactory.com/latest.md) · [Categories](https://community.dreamfactory.com/categories.md) · [Tags](https://community.dreamfactory.com/tags.md)

---

## [About the Schema & Data category](https://community.dreamfactory.com/t/about-the-schema-data-category/25)

<div class="topic-metadata">

**Author:** [@benbusse](https://community.dreamfactory.com/u/benbusse)\
**Replies:** 0

</div>

Info about managing schema and data for DreamFactory's built-in MySQL database in the DreamFactory Admin Console.

---

## [Is there a way to configure a service to accept multiple schemas? We can either give numerous schema's or use the wildcard "\*" to obtain every schema](https://community.dreamfactory.com/t/is-there-a-way-to-configure-a-service-to-accept-multiple-schemas-we-can-either-give-numerous-schemas-or-use-the-wildcard-to-obtain-every-schema/5437)

<div class="topic-metadata">

**Author:** [@saira](https://community.dreamfactory.com/u/saira)\
**Replies:** 0\
**Last updated:** [December 29, 2022, 2:09pm UTC](https://community.dreamfactory.com/t/is-there-a-way-to-configure-a-service-to-accept-multiple-schemas-we-can-either-give-numerous-schemas-or-use-the-wildcard-to-obtain-every-schema/5437 "2022-12-29T14:09:39Z")

</div>

According to the information given, dream factory will retrieve all of the schemas if you leave the field empty. That didn’t work when I attempted it to establish the connection.

---

## ["Cannot add or update child row" error when creating role](https://community.dreamfactory.com/t/cannot-add-or-update-child-row-error-when-creating-role/5258)

<div class="topic-metadata">

**Author:** [@akaHeimdall](https://community.dreamfactory.com/u/akaHeimdall)\
**Replies:** 1\
**Last updated:** [December 23, 2020, 4:19am UTC](https://community.dreamfactory.com/t/cannot-add-or-update-child-row-error-when-creating-role/5258 "2020-12-23T04:19:39Z")

</div>

My service is created however, I am now trying to create a role to use the service. I am receiving the error: Api Error SQLSTATE\[23000\]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreig…

---

## [Can't save object with nil foreign keys](https://community.dreamfactory.com/t/cant-save-object-with-nil-foreign-keys/299)

<div class="topic-metadata">

**Author:** [@Objective\_neo](https://community.dreamfactory.com/u/Objective_neo)\
**Replies:** 10\
**Last updated:** [December 16, 2020, 3:47am UTC](https://community.dreamfactory.com/t/cant-save-object-with-nil-foreign-keys/299 "2020-12-16T03:47:14Z")

</div>

This bug have been persistent now for a couple of releases of DF and it have been driving me crazy. I have a foreign that CAN BE nil. When I try to edit any other field and save I get that error DreamFactory Table …

---

## [Add unique columns in database schema](https://community.dreamfactory.com/t/add-unique-columns-in-database-schema/624)

<div class="topic-metadata">

**Author:** [@AliLubnani](https://community.dreamfactory.com/u/AliLubnani)\
**Replies:** 1\
**Last updated:** [December 9, 2014, 2:48pm UTC](https://community.dreamfactory.com/t/add-unique-columns-in-database-schema/624 "2014-12-09T14:48:24Z")

</div>

I am using dreamfactory's Mysql integration and the schema provided by them. I am trying to emulate the something like this: CREATE TABLE Persons{ ... LastName varchar(255) NOT NULL, UNIQUE (LastName) ... } I couldn'…

---

## [Understanding the Difference Between Schema and Data](https://community.dreamfactory.com/t/understanding-the-difference-between-schema-and-data/69)

<div class="topic-metadata">

**Author:** [@Mark](https://community.dreamfactory.com/u/Mark)\
**Replies:** 0\
**Last updated:** [May 28, 2014, 6:52pm UTC](https://community.dreamfactory.com/t/understanding-the-difference-between-schema-and-data/69 "2014-05-28T18:52:50Z")

</div>

What’s the difference between a table’s schema and its data? So, imagine this quick scenario. I have a table called Customer, it is a simple table. It contains three people, each having a unique ID (primary key), Name, …

---

## [Accessing phpMyAdmin](https://community.dreamfactory.com/t/accessing-phpmyadmin/236)

<div class="topic-metadata">

**Author:** [@Mark](https://community.dreamfactory.com/u/Mark)\
**Replies:** 0\
**Last updated:** [August 4, 2014, 1:48pm UTC](https://community.dreamfactory.com/t/accessing-phpmyadmin/236 "2014-08-04T13:48:32Z")

</div>

Here’s a quick way to access phpMyAdmin. I am running on a WAMP stack, so the picture will reflect that. \[The image you are requesting does not exist or is no longer available\] Alternatively, you can access via localho…

---

## [Confirmed MySQL API bug](https://community.dreamfactory.com/t/confirmed-mysql-api-bug/5217)

<div class="topic-metadata">

**Author:** [@r00tb33r](https://community.dreamfactory.com/u/r00tb33r)\
**Replies:** 1\
**Last updated:** [September 2, 2020, 10:03pm UTC](https://community.dreamfactory.com/t/confirmed-mysql-api-bug/5217 "2020-09-02T22:03:36Z")

</div>

One of the booleans is flipped in the returned JSON. “yes” field is virtual. Screenshot shows the API tester in the DreamFactory admin panel and phpMyAdmin for the same table opened at the same time. This is a simpl…

---

## [How to retain user id's of Users during import?](https://community.dreamfactory.com/t/how-to-retain-user-ids-of-users-during-import/1957)

<div class="topic-metadata">

**Author:** [@allensandiego](https://community.dreamfactory.com/u/allensandiego)\
**Replies:** 4\
**Last updated:** [May 31, 2019, 1:56am UTC](https://community.dreamfactory.com/t/how-to-retain-user-ids-of-users-during-import/1957 "2019-05-31T01:56:40Z")

</div>

Hi, I tried importing users from DF 1.9 to DF 2.0. However, user id's were not retained. DF generated new user id's for these users which caused some data relationship issues with my custom tables as I used user id as …

---

## [Design and create dashboard using Dreamfactory tools](https://community.dreamfactory.com/t/design-and-create-dashboard-using-dreamfactory-tools/4431)

<div class="topic-metadata">

**Author:** [@Sanji85](https://community.dreamfactory.com/u/Sanji85)\
**Replies:** 4\
**Last updated:** [September 21, 2018, 5:12am UTC](https://community.dreamfactory.com/t/design-and-create-dashboard-using-dreamfactory-tools/4431 "2018-09-21T05:12:46Z")

</div>

Hey we are using wireless sensor to interface pycom and we are using python library with to read the data from temperature sensor, following some of my doubts which I need to clear Can we integrate python library with …

---

## [Converting schema to standard JSON Schema](https://community.dreamfactory.com/t/converting-schema-to-standard-json-schema/4728)

<div class="topic-metadata">

**Author:** [@rockgoby](https://community.dreamfactory.com/u/rockgoby)\
**Replies:** 4\
**Last updated:** [December 11, 2018, 9:24pm UTC](https://community.dreamfactory.com/t/converting-schema-to-standard-json-schema/4728 "2018-12-11T21:24:58Z")

</div>

Hi All, I’ve been familiarising myself with DF - and from what I understand so far, it seems that the schema files generated from the database are not standard JSON schema files (I appreciate the rationale for this). I …

---

## [Some values not set when pushing schema to MongoDB](https://community.dreamfactory.com/t/some-values-not-set-when-pushing-schema-to-mongodb/4637)

<div class="topic-metadata">

**Author:** [@jsolbrig](https://community.dreamfactory.com/u/jsolbrig)\
**Replies:** 0\
**Last updated:** [September 26, 2018, 11:41pm UTC](https://community.dreamfactory.com/t/some-values-not-set-when-pushing-schema-to-mongodb/4637 "2018-09-26T23:41:37Z")

</div>

I’m having difficulty PUSHing a schema to MongoDB via the DreamFactory API. The same schema works as expected when PUSHed to MySQL. While some values get set appropriately, some of the values don’t get set or are set t…

---

## [Empty Array being Returned from MariaDB Table](https://community.dreamfactory.com/t/empty-array-being-returned-from-mariadb-table/4539)

<div class="topic-metadata">

**Author:** [@kHub](https://community.dreamfactory.com/u/kHub)\
**Replies:** 0\
**Last updated:** [July 19, 2018, 3:24pm UTC](https://community.dreamfactory.com/t/empty-array-being-returned-from-mariadb-table/4539 "2018-07-19T15:24:49Z")

</div>

I’m trying to track down the cause of a peculiar issue with one of our tables… and (of course) would appreciate any thoughts. We have an InnoDB table (version 10.1.22-MariaDB) with 65 columns. It is almost identical (…

---

## [User\_lookup\_by\_user\_id table missing](https://community.dreamfactory.com/t/user-lookup-by-user-id-table-missing/4439)

<div class="topic-metadata">

**Author:** [@erikkurtu](https://community.dreamfactory.com/u/erikkurtu)\
**Replies:** 8\
**Last updated:** [June 13, 2018, 5:58pm UTC](https://community.dreamfactory.com/t/user-lookup-by-user-id-table-missing/4439 "2018-06-13T17:58:20Z")

</div>

I’m using 2.12.0 on a Bitnami Linux VM. I’m getting the “Unknown relationship: user\_lookup\_by\_user\_id” error when calling platform.api.get(‘system/user/’+platform.session.user.id+’?related=user\_lookup\_by\_user\_id’); from…

---

## [Db limited to 1000 records, again](https://community.dreamfactory.com/t/db-limited-to-1000-records-again/4418)

<div class="topic-metadata">

**Author:** [@JeffBlackwell](https://community.dreamfactory.com/u/JeffBlackwell)\
**Replies:** 6\
**Last updated:** [May 15, 2018, 4:06pm UTC](https://community.dreamfactory.com/t/db-limited-to-1000-records-again/4418 "2018-05-15T16:06:36Z")

</div>

I’m getting records, and I appear to be limited to 1000 records per pull. I’ve changed the .env file after trying to RTFM, cleared caches, restarted machine, etc. still no joy… Am I missing something? Version = 2.12 …

---

## [How to remove virtual relationships](https://community.dreamfactory.com/t/how-to-remove-virtual-relationships/3822)

<div class="topic-metadata">

**Author:** [@filiptod](https://community.dreamfactory.com/u/filiptod)\
**Replies:** 4\
**Last updated:** [January 1, 2018, 5:31pm UTC](https://community.dreamfactory.com/t/how-to-remove-virtual-relationships/3822 "2018-01-01T17:31:42Z")

</div>

Hi, I tried to test out adding virtual relationships between tables, but it seems I cannot remove a relationship once it's set? I tried clicking on the relationship in the Relationships section in the Schema and have no …

---

## [Is there a way to add virtual foreign key pointing to system/user in Dreamfactory 2.9?](https://community.dreamfactory.com/t/is-there-a-way-to-add-virtual-foreign-key-pointing-to-system-user-in-dreamfactory-2-9/4178)

<div class="topic-metadata">

**Author:** [@aurerua](https://community.dreamfactory.com/u/aurerua)\
**Replies:** 0\
**Last updated:** [November 27, 2017, 2:37pm UTC](https://community.dreamfactory.com/t/is-there-a-way-to-add-virtual-foreign-key-pointing-to-system-user-in-dreamfactory-2-9/4178 "2017-11-27T14:37:34Z")

</div>

Hi, Is it possible to add a virtual foreign key pointing to a field in system/user in Dreamfactory 2.9 ? Thanks in advance.

---

## [Correct count from group by query](https://community.dreamfactory.com/t/correct-count-from-group-by-query/4038)

<div class="topic-metadata">

**Author:** [@radodr](https://community.dreamfactory.com/u/radodr)\
**Replies:** 0\
**Last updated:** [September 7, 2017, 6:36am UTC](https://community.dreamfactory.com/t/correct-count-from-group-by-query/4038 "2017-09-07T06:36:44Z")

</div>

Hi, Is it possible to get correct count of rows from query with group by? I am using db service connected to MySQL. Now it returns ‘standard’ count before grouping rows. When I wnat to get correct count in mysql ,than …

---

## [Default date format incompatible with my MS SQL Date Format](https://community.dreamfactory.com/t/default-date-format-incompatible-with-my-ms-sql-date-format/4009)

<div class="topic-metadata">

**Author:** [@Sam-Amin](https://community.dreamfactory.com/u/Sam-Amin)\
**Replies:** 0\
**Last updated:** [August 23, 2017, 3:37am UTC](https://community.dreamfactory.com/t/default-date-format-incompatible-with-my-ms-sql-date-format/4009 "2017-08-23T03:37:51Z")

</div>

Hi I am running dm v2803, which is connected to a remote MS SQL server. The problem I have is that when I try to retrieve data from a table using date as a filter, I get a out of range error. After looking at the resp…

---

## [Broken schema editor after update from 2.7 to 2.8](https://community.dreamfactory.com/t/broken-schema-editor-after-update-from-2-7-to-2-8/3982)

<div class="topic-metadata">

**Author:** [@tizzyapunkt](https://community.dreamfactory.com/u/tizzyapunkt)\
**Replies:** 0\
**Last updated:** [August 3, 2017, 11:02am UTC](https://community.dreamfactory.com/t/broken-schema-editor-after-update-from-2-7-to-2-8/3982 "2017-08-03T11:02:24Z")

</div>

Hi, it seems that the schema editor is broken in 2.8. Maybe it’s releated to updating from 2.7 to 2.8. There is no way to create or edit schemes. After selecting a db, the editor opens the section for creating db field…

---

## [Phpmyadmin access alongside df 2.8.0 on ubuntu 16.04](https://community.dreamfactory.com/t/phpmyadmin-access-alongside-df-2-8-0-on-ubuntu-16-04/3986)

<div class="topic-metadata">

**Author:** [@Aravinthu\_Durairajan](https://community.dreamfactory.com/u/Aravinthu_Durairajan)\
**Replies:** 1\
**Last updated:** [August 9, 2017, 6:21pm UTC](https://community.dreamfactory.com/t/phpmyadmin-access-alongside-df-2-8-0-on-ubuntu-16-04/3986 "2017-08-09T18:21:06Z")

</div>

i have manually installed df 2.8.0 using this link (https://wiki.dreamfactory.com/DreamFactory/APT/Ubuntu\_16.04/Installation) after that i have installed phpmyadmin but i can’t access using http://domain/phpmyadmin. plea…

---

## [Adding Virtual Relationships broken in DF 2.7.0?](https://community.dreamfactory.com/t/adding-virtual-relationships-broken-in-df-2-7-0/3881)

<div class="topic-metadata">

**Author:** [@tizzyapunkt](https://community.dreamfactory.com/u/tizzyapunkt)\
**Replies:** 2\
**Last updated:** [August 3, 2017, 12:37pm UTC](https://community.dreamfactory.com/t/adding-virtual-relationships-broken-in-df-2-7-0/3881 "2017-08-03T12:37:54Z")

</div>

I installed a fresh new version of DF 2.7 using the manual Github Method and I tried to add some tables with some Virtual Relationships but i could not select any fields, reference service etc. in the Schema configuratio…

---

## [POST to mysql error: user\_id\_on\_create always 3](https://community.dreamfactory.com/t/post-to-mysql-error-user-id-on-create-always-3/3974)

<div class="topic-metadata">

**Author:** [@EM\_FLK](https://community.dreamfactory.com/u/EM_FLK)\
**Replies:** 1\
**Last updated:** [August 1, 2017, 1:01pm UTC](https://community.dreamfactory.com/t/post-to-mysql-error-user-id-on-create-always-3/3974 "2017-08-01T13:01:23Z")

</div>

For some reason when I create a new record for my database table I am met with the following error: "code": "23000", "message": "SQLSTATE\[23000\]: Integrity constraint violation: 1062 Duplicate entry '3' for …

---

## [Cannot Assign A Primary Key](https://community.dreamfactory.com/t/cannot-assign-a-primary-key/3968)

<div class="topic-metadata">

**Author:** [@EM\_FLK](https://community.dreamfactory.com/u/EM_FLK)\
**Replies:** 0\
**Last updated:** [July 27, 2017, 11:23am UTC](https://community.dreamfactory.com/t/cannot-assign-a-primary-key/3968 "2017-07-27T11:23:49Z")

</div>

For some reason when I am on the Schema tab on the Dreamfactory directory I cannot set any of the fields as primary keys as the field is greyed out. Are there any known fixes for this.

---

## [Joining multiple tables in a single call](https://community.dreamfactory.com/t/joining-multiple-tables-in-a-single-call/3902)

<div class="topic-metadata">

**Author:** [@Ved\_Prakash](https://community.dreamfactory.com/u/Ved_Prakash)\
**Replies:** 0\
**Last updated:** [June 19, 2017, 1:47pm UTC](https://community.dreamfactory.com/t/joining-multiple-tables-in-a-single-call/3902 "2017-06-19T13:47:05Z")

</div>

Hi, For example I have three tables. Users userid, name, contactid Contacts contactid, contact Operators operatorid, operator, contactid The relation is like Each User can have mulitple Contacts, and each Conta…

---

## [Fields populated twice in mongodb](https://community.dreamfactory.com/t/fields-populated-twice-in-mongodb/3857)

<div class="topic-metadata">

**Author:** [@mrbijan](https://community.dreamfactory.com/u/mrbijan)\
**Replies:** 0\
**Last updated:** [May 30, 2017, 9:32pm UTC](https://community.dreamfactory.com/t/fields-populated-twice-in-mongodb/3857 "2017-05-30T21:32:48Z")

</div>

I am using Mongodb and have definded a schema. However when I post data through the API, some fields are populated twice. Once with the correct naming from the schema and another time all in lowercase. Eg. "createdByUser…

---

## [How can I filter/group/order by related fields in the API DOCS UI?](https://community.dreamfactory.com/t/how-can-i-filter-group-order-by-related-fields-in-the-api-docs-ui/2742)

<div class="topic-metadata">

**Author:** [@Andy\_Cahn](https://community.dreamfactory.com/u/Andy_Cahn)\
**Replies:** 1\
**Last updated:** [May 11, 2017, 9:37am UTC](https://community.dreamfactory.com/t/how-can-i-filter-group-order-by-related-fields-in-the-api-docs-ui/2742 "2017-05-11T09:37:41Z")

</div>

If I'm working with SQL data and a related table. How do I notate fields from the related table in the Filter, Group or Order parameters to the api URL? I figured out I can specify the related fields by adding "&Relat…

---

## [Should we use 'size' or 'length' in the JSON schemas that we import?](https://community.dreamfactory.com/t/should-we-use-size-or-length-in-the-json-schemas-that-we-import/3772)

<div class="topic-metadata">

**Author:** [@aurerua](https://community.dreamfactory.com/u/aurerua)\
**Replies:** 1\
**Last updated:** [April 13, 2017, 3:16pm UTC](https://community.dreamfactory.com/t/should-we-use-size-or-length-in-the-json-schemas-that-we-import/3772 "2017-04-13T15:16:22Z")

</div>

When I upload a JSON schema in Dreamfactory under the 'Schema' tab, an 'Todo' example is provided. In this example a field called 'name' specifies this:"size": 80 In the wiki an attribute 'length' is presented instea…

---

## [Creating My sql service error](https://community.dreamfactory.com/t/creating-my-sql-service-error/2159)

<div class="topic-metadata">

**Author:** [@Rohit\_Dhore](https://community.dreamfactory.com/u/Rohit_Dhore)\
**Replies:** 4\
**Last updated:** [April 7, 2017, 10:34am UTC](https://community.dreamfactory.com/t/creating-my-sql-service-error/2159 "2017-04-07T10:34:41Z")

</div>

When I try to create schema in My SQL driver service I get following error. Failed to connect to database. Connection failed to open the DB connection: SQLSTATE\[HY000\] \[1044\] Access denied for user ''@'localhost' to da…

---

## [Importing virtual relationships while using SQLite or MySql](https://community.dreamfactory.com/t/importing-virtual-relationships-while-using-sqlite-or-mysql/3691)

<div class="topic-metadata">

**Author:** [@Tyler\_Cox](https://community.dreamfactory.com/u/Tyler_Cox)\
**Replies:** 0\
**Last updated:** [March 2, 2017, 5:24pm UTC](https://community.dreamfactory.com/t/importing-virtual-relationships-while-using-sqlite-or-mysql/3691 "2017-03-02T17:24:28Z")

</div>

I am using an SQLite database, mostly because that is what the project started with, however I am willing to move it over to a MySQL database, which I probably will in the future for the better features. I am trying to …

[Next page](https://community.dreamfactory.com/c/schema-data/18.md?page=1)
