[ https://jira.fiware.org/browse/HELP-13310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez reassigned HELP-13310: ------------------------------------- Assignee: Backlog Manager > [fiware-stackoverflow] Modeling BD MYSQL Cygnus FIWARE > ------------------------------------------------------ > > Key: HELP-13310 > URL: https://jira.fiware.org/browse/HELP-13310 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Backlog Manager > Labels: fiware, fiware-cygnus, fiware-orion, mysql > > Created question in FIWARE Q/A platform on 26-09-2017 at 22:09 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/46435336/modeling-bd-mysql-cygnus-fiware > +Question:+ > Modeling BD MYSQL Cygnus FIWARE > +Description:+ > I am trying to model my DB in MYSQL, I would like my structure to be formed by a data collection table, which would be the one that generates cygnus automatically, then its subsequent related tables for those data with greenhouses and users. > All the data of all the sensors of each users in a table and then relate this to each user and greenhouse, I think it would be the correct way. > But I'm trying to create two subscriptions one that meta data in this table for an entity ID and another for another entity ID, but it automatically creates me two tables and the idea is to be all in one. > How could this be done? > I attach my entities: > GET /v2/entities/ HTTP/1.1 > Host: 1.2.3.4:1026 > Accept: application/json > Content-Type: application/json > Fiware-Service: pruebastienda > Fiware-ServicePath: /tienda1 > Cache-Control: no-cache > Postman-Token: e19de386-ca21-cd7d-cd24-f1dee9487196 > [ > { > "id": "palmerillas", > "type": "invernadero", > "pressure2": { > "type": "Integer", > "value": 6, > "metadata": {} > }, > "sensor32": { > "type": "Integer", > "value": 1, > "metadata": {} > }, > "sensor42": { > "type": "Integer", > "value": 44, > "metadata": {} > }, > "temperature2": { > "type": "float", > "value": 4, > "metadata": { > "accuracy": { > "type": "Float", > "value": 9 > } > } > } > }, > { > "id": "palmerillas2", > "type": "invernadero2", > "pressure2": { > "type": "Integer", > "value": 6, > "metadata": {} > }, > "sensor32": { > "type": "Integer", > "value": 1, > "metadata": {} > }, > "sensor42": { > "type": "Integer", > "value": 44, > "metadata": {} > }, > "temperature2": { > "type": "float", > "value": 4, > "metadata": { > "accuracy": { > "type": "Float", > "value": 9 > } > } > } > } > ] > And my subscriptions as well: > GET /v2/subscriptions/ HTTP/1.1 > Host: 1.2.3.4:1026 > Accept: application/json > Fiware-Service: pruebastienda > Fiware-ServicePath: /tienda1 > Cache-Control: no-cache > Postman-Token: 7898a397-2018-42fc-7edf-e35f25105901 > [ > { > "id": "59ca8b394df7c75fee3e1969", > "description": "A subscription to get info about palmerillas", > "status": "active", > "subject": { > "entities": [ > { > "id": "palmerillas", > "type": "invernadero" > } > ], > "condition": { > "attrs": [ > "pressure2" > ] > } > }, > "notification": { > "timesSent": 2, > "lastNotification": "2017-09-26T17:16:04.00Z", > "attrs": [ > "temperature2", > "pressure2", > "sensor32", > "sensor42" > ], > "attrsFormat": "legacy", > "http": { > "url": "http://localhost:5050/notify" > }, > "lastSuccess": "2017-09-26T17:16:04.00Z" > } > }, > { > "id": "59ca8bb94df7c75fee3e196a", > "description": "A subscription to get info about palmerillas", > "status": "active", > "subject": { > "entities": [ > { > "id": "palmerillas2", > "type": "invernadero2" > } > ], > "condition": { > "attrs": [ > "pressure2" > ] > } > }, > "notification": { > "timesSent": 2, > "lastNotification": "2017-09-26T17:17:56.00Z", > "attrs": [ > "temperature2", > "pressure2", > "sensor32", > "sensor42" > ], > "attrsFormat": "legacy", > "http": { > "url": "http://localhost:5050/notify" > }, > "lastSuccess": "2017-09-26T17:17:56.00Z" > } > } > ] > EDIT: > The names of the tables are: > tienda1_palmerillas_invernadero AND tienda1_palmerillas2_invernadero2 > as you can see in the picture -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy