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
2 answers

Best design for a database containing blobs

I was wandering what's the best design for the database of an application in which I have to store lots of records with blobs associated (One to one) to them. Is it better to use a separate table for blobs? My application relies on MySQL and…
mariosangiorgio
  • 5,520
  • 4
  • 32
  • 46
2
votes
1 answer

Modeling User, Group and Membership database tables

I am trying to create User, Group and Membership tables as follows. A User may belong to one or many groups and a Group may have one or many users. The many-to-many relationship between User and Group table is maintained using Membership table. I…
2
votes
1 answer

LINQ - to XML Schema - import of multiple XSD files (.NET)

My Goal: I would like to search for elements in large XML Schema spec. compound from multiple XSD files (with use of import). Is is possible to use the LINQ? How can I store whole SOM (schema object model) into memory and then ask? I tried: Dim…
Daniel
  • 113
  • 2
  • 11
2
votes
1 answer

Oracle SQL*Plus: How to include current schema in prompt?

In SQL*Plus, I can set the prompt to include the instance name: SET SQLPROMPT "_USER'@'_CONNECT_IDENTIFIER > " I can also query for the current schema: select sys_context( 'userenv', 'current_schema' ) from dual; Is there a way to get the current…
Lumi
  • 14,775
  • 8
  • 59
  • 92
2
votes
1 answer

Relationship with foreign keys in SQL?

I am translating a recursive relationship in a schema to sql and i am trying to reference two columns in a table to one column in another table the Schema is as following : Table: Request ( mem_id1, mem id2, approved ) desired foreign…
Fady Kamal
  • 1,302
  • 3
  • 13
  • 22
2
votes
1 answer

Logical grouping schemas in ORACLE?

We are planning a new system for a client in ORACLE 11g. I've been mostly in the Sql Server world for several years, and am not really current on the latest ORACLE updates. One particular feature I'm wondering if ORACLE has added in by this point…
eidylon
  • 7,068
  • 20
  • 75
  • 118
2
votes
3 answers

read Colander Schema from a config file or database

I googled for a while but I could not find reference on how to retrieve a Colander Schema from a config file or from a database. I think this is not difficult to implement but I might have overlooked something. Maybe somebody has done or seen…
moin moin
  • 2,263
  • 5
  • 32
  • 51
2
votes
1 answer

How can I create a schema alias in DB2 on System z?

Part of a reporting toolkit we use for our development is configured to always use the same schema (say XYZZY). However, certain customers have stored their data in a different schema PLUGH. Is there any way within DB2/z to alias the entire schema…
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
2
votes
2 answers

Preceding any database access with specific command in CakePHP

I'm new to CakePHP and using version 1.3. How can I dynamically change the 'schema' property as found in DATABASE_CONFIG prior to any database operation? What is the class where I could have the postgres-specific command "set search_path to…
JP Beaudry
  • 194
  • 5
2
votes
2 answers

Do cross-schema queries in views have a performance impact in Oracle?

Will moving views from one schema to another have any adverse effect on performance? I have about 40 views in one schema. I want to create a new schema which will have all the correct permissions. Suppose TableA resides in schema A. So my view will…
Saro Khatchatourian
  • 1,047
  • 3
  • 14
  • 24
2
votes
3 answers

Database schema changes needed yearly. Which Strategy should be used?

Every year our company holds a conference/stand where participants can show their products. We have a web-application which let the participants sign up for the conference. They can enter information such as the name of their company, billing…
James Fung
2
votes
1 answer

Combining XML data with data type information from XML Schema

I would like to automate creating a flat list/array type structure in a language such as Ruby,Python etc that takes XML data and for each node builds a list/array entry that contains the data plus data type information obtained from its XML…
John
  • 21
  • 1
2
votes
1 answer

enum in json-schema with a (RegEx) pattern

A certain category in my json dataset should be restricted to a limited number of values, so I put them in a list in enum. There are two issues: In some cases it is necessary to add an asterisk to the value; this can apply to all values, for…
Jopie
  • 129
  • 8
2
votes
4 answers

How to store absolute and relative date ranges in SQL database?

I'm trying to model a DateRange concept for a reporting application. Some date ranges need to be absolute, March 1, 2011 - March 31, 2011. Others are relative to current date, Last 30 Days, Next Week, etc. What's the best way to store that data in…
ant
  • 243
  • 2
  • 8
2
votes
1 answer

XML Schema Multiple Elements and Attributes

I have this code: C++ C# Java PHP MYSQL HTML
Howdy_McGee
  • 10,422
  • 29
  • 111
  • 186