sqlite – How to query/join tables where foreign key constraint is set in schema

I’m relatively new to sqlite and databases in general.
I’ve successfully setup a schema of 4 tables, each having a foreign key pointing to its parent table. The schema also has the foreign key constraint set on the child keys.

Performing a query where every table is joined with the SELECT * FROM…JOIN…ON ……… works without issue, but it is laborious manually connecting the keys.

My question is: Is it possible to perform a query/join of the tables without the ON statement which links each parent/child key relationship? Since this was already established in the schema definition, this seems to be redundant. I’m trying to simplify the sql command and make use of the parent/child relationship already defined. When I perform said query but omit the ON statements, the results are not what I expected. Any guidance is appreciated.

schema.org – Schema Markup for Sub-Brand Product Website

I am trying to improve my website’s SEO by getting our results to appear in the Knowledge Graph. The challenge I am having is that the website is for a product sold by a sub-brand of a larger organisation. What would be the best way to categorise this in Schema markup? Currently it is not appearing by using the sub-brand name in “Organization“,”name“.

For example, what would the website markup be for PlayStation being part of the larger organisation of Sony? Are there defined categories for this in Schema?

date – Is it possible to set timezone for a schema – Postgresql


You can either set the timezone at database level, or at session level (… or directly when accessing a date-like datatype, using the at time zone construct).

From the documentation:

The TimeZone configuration parameter can be set in the file postgresql.conf, or in any of the other standard ways described in Chapter 19. There are also some special ways to set it:

  • The SQL command SET TIME ZONE sets the time zone for the session. This is an alternative spelling of SET TIMEZONE TO with a more SQL-spec-compatible syntax.

  • The PGTZ environment variable is used by libpq clients to send a SET TIME ZONE command to the server upon connection.

permissions – SQL Server Grant CRUD to Users on One Schema

Is this the right approach?

This is the correct approach, users with that role will only be able to perform CRUD operations on objects in the training schema and nothing else. This is the least privilege approach and is correct.

True least privilege would actually be assigning permissions to only the specific objects in that schema, but as you’ve indicated users should have access to all objects, then applying permissions schema-wide is appropriate.

I do not want them to have any other permissions on any other object
outside that schema

You may not actually want this. Consider the public server role. For any object that does not have explicit permissions (GRANT or DENY), permissions are inherited from the public role for a user (any user, all users).

Since you cannot revoke public membership from a user, you would need to explicitly DENY permission on every single object just to prevent users from seeing the object listed in Management Studio – is this really necessary? They have no access beyond seeing the object exists, users still cannot interact with them.

Public access grants users, by default, nothing more than access to a few system catalog views to allow all users to view the name and definition of basic objects and some basic DB/Server info (see this article for more info).

Google search console: article schema error with "Name" and "Editor"

I am using the OceanWp WordPress theme and have enabled the outline option from the theme panel. When I checked the structure data through a structured data tool all the schemas work fine but the article schema shows these errors (in the screenshot below). I am using the free version of the theme and there is no support for me. I have no knowledge about coding etc. but please help me to solve the problem.

Here is the screenshot.
enter the image description here

postgresql – Best jsonb schema to query on postgres

I have a JSON with the following structure:

uid | item
1   |({"id":1, "m":"123", "s":1},{"id":2, "msg":"on","s":2},{"id":3, "msg":"of","s":1})
2   |({"id":1, "m":"yes", "s":2},{"id":3, "msg":"gh","s":0})
3   |({"id":1, "m":"qa", "s":1},{"id":4, "msg":"ks"},{"id":5, "m":"test"})

I want to consult this table based on id and get rows based on matching object values. For example. for id=3 I want:

uid | id | m  | s
 1  | 3  | of | 1
 2  | 3  | gh | 0

This table has more than 500 million rows, so you would need an index. Using GIN(item jsonb_path_ops) with item @> '({"id": 3})' It works, but I don't know how to get the exact json object from the matching array.

I can convert the JSON structure into:

    "1": { "m":"123", "s": 1 },
    "2": { "m":"on", "s":2 },
    "3": { "m":"of", "s": 1 }

and use GIN(item) and check if the key exists with ? and then try to get the key value. But the size of the index may increase, which may be an exaggeration since I just want to search based on id.

Maybe I can use a B-Tree index but I'm not sure how. What should my JSON structure be for the most efficient query? And what index should be used to get just the matching object from the array?

Some acts:

  1. Cardinality of id <<< uid. (id = ~ 100,000, uid = ~ 500,000,000)
  2. Normalizing this converts this table to 500M * 10,000 rows, which is extremely slow.

SharePoint 2016 search schema: unknown error occurred

We have a local SharePoint 2016 farm consisting of 3 servers (app and search + wfe + database). We recently discovered that business search was not working. When looking at trace logs in the search service application, the following error was reported and the trace did not work:

Content processing pipeline failed to process article

There were comments on the internet suggesting that this could be due to a problem with managed metadata property mappings, but when you click search schema in search administration it shows the following error without displaying managed properties.

An unknown error occurred.

We tried to restart the host search service and time service, but it did no good.

Any help in solving the problem is greatly appreciated.

seo – Which schema should I use for city pages?

I'm trying to determine which schema type to use for a business that's targeting searches that have a city on the search term.

The organization is an energy provider comparison site in which you can compare energy rates and plans and sign up for an energy plan:


The city pages were created to target searches with the city in the search query. Such as, electricity in Houston.

Here is an example of a city page: https://homeenergyclub.com/houston

I'm confused as well with this one as to which schema type might be the best fit.

Any thoughts / comments / ideas are greatly appreciated!

Thank you!

scala: throws an exception when parsing JSON with wrong schema in Optional field

During JSON parsing, I want to catch an exception for optional sequential files whose schema differs from my case class.
Let me elaborate

I have the following kind of case:

case class SimpleFeature(
  column: String,
  valueType: String,
  nullValue: String,
  func: Option(String))

case class TaskConfig(
  taskInfo: TaskInfo,
  inputType: String,
  training: Table,
  testing: Table,
  eval: Table,
  splitStrategy: SplitStrategy,
  label: Label,
  simpleFeatures: Option(List(SimpleFeature)),
  model: Model,
  evaluation: Evaluation,
  output: Output)

And this is part of the JSON file that I want to point to:

"simpleFeatures": (
    "column": "pcat_id",
    "value": "categorical",
    "nullValue": "DUMMY"
    "column": "brand_code",
    "valueType": "categorical",
    "nullValue": "DUMMY"

As you can see the first element has an error in the schema and upon parsing I want to generate an error. At the same time, I want to maintain optional behavior in case there is no object to parse.

An idea I've been researching for a while: create the custom serializer and manually check the fields, but I'm not sure I'm on the right track

object JSONSerializer extends CustomKeySerializer(SimpleFeatures)(format => {
  case jsonObj: JObject => {
    case Some(simplFeatures (jsonObj  "simpleFeatures")) => {
    // Extraction logic goes here

You may not be very proficient at Scala and json4s, so any advice is appreciated.

json4s version

scala version

jdk version

Algebraic geometry: first problems (historically) solved using schema theory

Tonight, during a pause in my studies, I was wondering how the mathematical community reacted to Grothendieck's EGA books in the sense of looking for the first problems solved by schemas, because I already took a homology theory course and read about the wonderful Jean Leray's story developing sheaf theory in a prison camp and reading about the early problems solved using sheaf cohomology. But I don't know anything about the schematics part. And since quarantining gave me extra time, I was wondering if reading those articles complements Hartshorne's book and Vakil's notes. Adding that to the fact that I don't know where to look for it, I came here for help and, if it's worth saying, I can read French newspapers. Well that's it and thanks for listening.