Questions tagged [schema]

Schema means shape, or more generally, plan. It may be XML schema or Database schema.

XML schema

An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself.

These constraints are generally expressed using some combination of grammatical rules governing the order of elements, Boolean predicates that the content must satisfy, data types governing the content of elements and attributes, and more specialized rules such as uniqueness and referential integrity constraints.

There are languages developed specifically to express XML schemas. The Document Type Definition (DTD) language, which is native to the XML specification, is a schema language that is of relatively limited capability, but that also has other uses in XML aside from the expression of schemas. Two more expressive XML schema languages in widespread use are XML Schema (with a capital S) and RELAX NG.

The mechanism for associating an XML document with a schema varies according to the schema language. The association may be achieved via markup within the XML document itself, or via some external means.

More info about XML schema

Database schema

A database schema of a database system is its structure described in a formal language supported by the database management system (DBMS) and refers to the organization of data to create a blueprint of how a database will be constructed (divided into database tables).

The formal definition of database schema is a set of formulas (sentences) called integrity constraints imposed on a database. These integrity constraints ensure compatibility between parts of the schema. All constraints are expressible in the same language. A database can be considered a structure in realization of the database language. The states of a created conceptual schema are transformed into an explicit mapping, the database schema. This describes how real world entities are modeled in the database.

A schema can contain formulas representing integrity constraints specifically for an application and the constraints specifically for a type of database, all expressed in the same database language.

In a relational database, the schema defines the tables, fields, relationships, views, indexes, packages, procedures, functions, queues, triggers, types, sequences, materialized views, synonyms, database links, directories, Java, XML schemas, and other elements.

More info about Database schema

References:

7547 questions
2
votes
0 answers

Error in AWS Glue calling pyWriteDynamicFrame parquet column cannot be converted expected double found binary

I am having some troubles to write a dynamic frame from a table that I've read from the Data Catalog. This table is formatted in parquet. When calling writeFrame, AWS Glue is complaining about a column that I am not choosing in my dynamic frame to…
2
votes
0 answers

FastAPI schemas for GET requests using Pydantic

Intro: In FastAPI, when the input of a POST request is a Pydantic model (like in this example) The automatic docs generated by Fastapi contains a schema of that object ($ref) (as shown here). Question: Although the input of a GET request cannot be a…
Guy
  • 21
  • 3
2
votes
1 answer

Super column vs serialization vs 2 lookups in Cassandra

We have: users, each of which has events, each of which has several properties (time, type etc.). Our basic use case is to fetch all events of a given user in a given time-span. We've been considering the following alternatives in Cassandra for the…
2
votes
1 answer

Unique Particle Violations

I've been looking at this issue for too long. I suspect I'm missing something obvious because I'm overfamiliar with it. I have a schema that suffers from a unique particle violation error. I can see why but I've spent too long fiddling with it to be…
Nic Gibson
  • 7,051
  • 4
  • 31
  • 40
2
votes
2 answers

XML schema check error

I am using the following schema to check the following XML file. And I find when there is more than one Information elements inside People elements, the schema check will fail. Why and how to fix it (I want to allow People element to be able to nest…
George2
  • 44,761
  • 110
  • 317
  • 455
2
votes
4 answers

SQL Command for generating schema text (similar to CreateTo or AlterTo)

SQL Server 2005. Is there a sql query that will return a text field containing the same type of schema info as you would find in doing a right click table -> Script Table As -> Create To (or Alter To) from SQL Server Management Studio ? I'm looking…
Matt
  • 41,216
  • 30
  • 109
  • 147
2
votes
1 answer

How to migrate Schema to ISchema in aws cdk 2.61.1

Hi since the new aws cdk version (2.61.1) the Schema does no longer exist :/ So it's now impossible to import it from appsync: import { Schema } from "@aws-cdk/aws-appsync-alpha" Vscode suggest me to use ISchema instead…
2
votes
1 answer

Django Sitemap Generates https:// in loc TWICE in Development

The example.com/sitemap.xml is returning loc with double https:// making the generated sitemap to be incorrect/unacceptable.
Top Tier
  • 51
  • 5
2
votes
1 answer

System.Text.Json Schema Validation

Does System.Text.Json expose any methods to validate Json schemas? I have looked at their documentation but it appears that this is still tbd.
Kashif
  • 31
  • 3
2
votes
1 answer

Avro uint64 data type

I need to serialize a uint64 into a Avro field. However in the docs I only see signed integers: The set of primitive type names is: null: no value boolean: a binary value int: 32-bit signed integer long: 64-bit signed integer float: single…
code-gorilla
  • 2,231
  • 1
  • 6
  • 21
2
votes
3 answers

Database schema for a site like SO?

Since I took the basic undergrad course in databases design and SQL I haven't really touched anything like this. So my question is - how would the database schema for a site like this one would usually look like? What are you generally expected to…
shoosh
  • 76,898
  • 55
  • 205
  • 325
2
votes
1 answer

How to update database schema without dropping tables

To update an existing database we include a updates sql file which the installer runs. It looks to see if a table exists and if not then it creates it and the fields. This is an auto generated file from some nHibernate functionality. IF NOT EXISTS…
Neil
  • 5,179
  • 8
  • 48
  • 87
2
votes
5 answers

KeystoneJS 6 - graphQLSchemaExtension - No session

I have an issue with graphQLSchemaExtension I don’t have active session on my custom mutations.. An example below of the beginning of custom mutation And my graphQLSchemaExtension declaration And my Keystone.ts file On my generic queries/mutations…
2
votes
1 answer

Postgres + Airflow db: permission denied for schema public

I'm trying to setup Postgres as backend database for my Airflow installation. I followed what the documentation suggests. Particularly, I created a specific user for Airflow in Postgres, a specific new table, and granted all privileges to the user.…
PandaPhi
  • 157
  • 11
2
votes
1 answer

How to make Object Properties flexible with Zod?

New to Typescript, Zod & Trpc. Say I have a schema for both animals & plants. I want to store all their common properties in the "root" of the schema and then put the more specific properties into a sub-object called custom. (just a made-up example…
antonwilhelm
  • 5,768
  • 4
  • 19
  • 45
1 2 3
99
100