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
1 answer

How to set default schema through URL in SQLAlchemy.create_engine for postgresql

I tried to make a python models for my flask application with sqlacodegen . and my database is postgresql in AWS_RDS . so I tried like below sqlacodegen postgresql://{RDS_USERNAME}:{RDS_PASSWORD}@{RDS_HOSTNAME}:{RDS_PORT}/{RDS_DB_NAME}' but it just…
runRyan
  • 713
  • 1
  • 5
  • 13
2
votes
2 answers

Mongo multiple queries or database normalization

I'm using MongoDB for my database. The query that I'm currently working on revealed a possible deficiency in my schema. Below is the relevant layout of my collections. Note that games.players is an array of 2 players since the game is chess. users…
Justin
  • 555
  • 4
  • 22
2
votes
0 answers

Avro Rust unsupported union of null and fixed

I have an avro created by a Java code. I am trying to read this with Rust reader and getting this error Result::unwrap()` on an `Err` value: DeserializeValue("unsupported union: Union(1, Fixed(4, [192, 168, 1, 2]))")' It seems that union of "null"…
Skoky
  • 849
  • 1
  • 9
  • 15
2
votes
1 answer

Pandas dates - Convert datetime to date including NaT

I'm converting CSVs to parquets and I need the schema to remain consistent. I have datetimes and I'd like to only save as a date. df.column.dt.date seems to work as long as there is at least one datetime, but when the column is all NaT, it remains…
zachvac
  • 650
  • 1
  • 6
  • 17
2
votes
0 answers

how to implement Joi validation on client side?

Is there any way to apply the same schemas I use as a middleware on express to be used on client side as well? can you give me a detailed example of how please? if not is there any example of Joi client side implementation? I googled it up but to no…
user19359397
2
votes
1 answer

How do you define and use a schema in JSON-LD?

First, Is there any relation between JSONSchema and JSON-LD? How do you create a schema in JSON-LD, and use it to validate some JSON-LD instances/records implementing each schema? Like how is schema.org defining their schemas? I don't see the…
Lance
  • 75,200
  • 93
  • 289
  • 503
2
votes
0 answers

When Solr 9 updates managed-schema.xml on the file system?

In the out of the box configuration (standalone) with a custom configset I observed that sometimes the managed-schema.xml changes, sometimes it does not when creating and filling new core with data. Noticed this because the configset is under…
Roman Susi
  • 4,135
  • 2
  • 32
  • 47
2
votes
2 answers

How To Make Joi Warning On Non-Existant property

How can I use Joi to throw a WARNING but not an ERROR if a particular element does not exist? My Code: const Joi = require('joi'); const schema = Joi.object({ username: Joi.string() .alphanum() .min(3) .max(30) …
Wayneio
  • 3,466
  • 7
  • 42
  • 73
2
votes
0 answers

Dynamic message generation in protos

I am writing a gRPC application which exposes an API to do schema validation. Client applications are allowed to send any object for validation. Since schema validations is needed, any encoding used to get data should preserve original object…
uzumas
  • 632
  • 1
  • 8
  • 23
2
votes
1 answer

How to define a user defined data type in clojure?

I want to use a user defined regex pattern for defining dates in edn file, for validation with malli. How do i define this pattern in core.clojure, so that I can use it in the edn file. This is how my edn file was before. (def reading-schema …
MouseNag
  • 303
  • 1
  • 9
2
votes
0 answers

Mongoose y NextJS: type error Cannot read properties of null (reading 'get')

Im a new coder! Im having troubles with a tutorial, client side is throwing me this error (screenshot of error in client) and this is the full error code in console Uncaught TypeError: Cannot read properties of null (reading 'get') at…
2
votes
1 answer

How to append number after liquid block object in Shopify?

I want to use block.settings.product_1 up to number 6 without repeating my code. Below is my code with schema. I use for loop for that but its not working. {% for block in section.blocks %} {% for i in (1..4) %} {% assign pro =…
Anupam Mistry
  • 403
  • 6
  • 21
2
votes
1 answer

List of struct's field names in Spark dataframe

I have a dataframe with the following schema: root |-- _id: long (nullable = true) |-- student_info: struct (nullable = true) | |-- firstname: string (nullable = true) | |-- lastname: string (nullable = true) | |-- major: string…
Pari
  • 45
  • 6
2
votes
1 answer

How to wrap one schema inside another for Malli?

This is my payload. (m/validate readingDetails-schema {:readingCode : "Code1", :readingNumber : "twenty two round off", :readingCheck : "First", :readings : [{ :readingDate : "2021-05-02", :readingType : "first check", …
Blaze
  • 368
  • 1
  • 10
2
votes
0 answers

Postman datadriven tests

We are doing some assertion checks in Postman. For doing so, we created a collection which is having set of Api's . Now, in order to perform data driven tests , we created a excel file. Here comes an issue when we run the collection through excel .…
1 2 3
99
100