0% found this document useful (0 votes)
12 views4 pages

Test 1

The document discusses the structure and components of databases, including account representations, database schemas, keys, schema diagrams, and the SQL query language. It defines key concepts such as physical and logical database schemas, super keys, candidate keys, and primary keys, as well as the importance of schema diagrams in representing database relationships. Additionally, it provides an overview of SQL as a programming language for relational databases, detailing its evolution and standardization over time.

Uploaded by

govindanm223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

Test 1

The document discusses the structure and components of databases, including account representations, database schemas, keys, schema diagrams, and the SQL query language. It defines key concepts such as physical and logical database schemas, super keys, candidate keys, and primary keys, as well as the importance of schema diagrams in representing database relationships. Additionally, it provides an overview of SQL as a programming language for relational databases, detailing its evolution and standardization over time.

Uploaded by

govindanm223
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

In this table let D1 denotes the set of all account numbers

 D2 denotes the set of all branch name


 D3 denotes the set of all balance.
 Any row of account consists of 3-tuples(V1,V2,V3)
Where ,
 V1 is an account number(V1 is in domain D1)
 V2 is an account number(V2 is in domain D2)
 V3 is an account number(V3 is in domain D3)
 In general , account will contain only a subset of the set of all
possible rows. Account is the subset of D1* D2* D3,……
 Generally ,a table of n attributes must be a subset of D1*D2*………
*Dn -1*Dn.
 Relation is a subset of Cartesian product of a list of domains . Tables
and relations are exactly the same . A tuple variable is a variable
whose domain is the set of all tuples. In the above table, we have 4
tuples.

2.3 DATABASE SCHEMAS


A database schema is the skeleton structure that represents the
logical view of the entire database. It defines how the data is organized
and how the relations among them are associated. It formulates all the
constraints that are to be applied on the data.
A database schema defines its entities and the relationship among
them. It contains a descriptive detail of the database, which can be
depicted by means of schema diagrams. It’s the database designers who
design the schema to help programmers understand the database and
make it useful.
A database schema can be divided broadly into two categories −

 Physical Database Schema − This schema pertains to the actual


storage of data and its form of storage like files, indices, etc. It defines
how the data will be stored in a secondary storage.
 Logical Database Schema − This schema defines all the logical
constraints that need to be applied on the data stored. It defines
tables, views, and integrity constraints.

2.4 KEY
Key is an attribute or collection of attributes that uniquely identifies an
entity among entity set.
For example, the roll number of a student makes him/her identifiable
among students.
 Super Key − A set of attributes (one or more) that collectively
identifies an entity in an entity set.
 Candidate Key − A minimal super key is called a candidate key. An
entity set may have more than one candidate key.
 Primary Key − A primary key is one of the candidate keys chosen by
the database designer to uniquely identify the entity set.

2.5 SCHEMA DIAGRAMS


A database schema represents the logical configuration of all or part of
a relational database. It can exist both as a visual representation and as a
set of formulas known as integrity constraints that govern a database. These
formulas are expressed in a data definition language, such as SQL. As part of
a data dictionary, a database schema indicates how the entities that make
up the database relate to one another, including tables, views, stored
procedures, and more.

2
Users can be granted access to log into individual schemas on a case-
by-case basis, and ownership is transferable. Since each object is associated
with a particular schema, which serves as a kind of namespace, it’s helpful to
give some synonyms, which allows other users to access that object without
first referring to the schema it belongs to.
These schemas do not necessarily indicate the ways that the data files
are stored physically. Instead, schema objects are stored logically within a
table space. The database administrator can specify how much space to
assign to a particular object within a data file.
Finally, schemas and table spaces don’t necessarily line up perfectly:
objects from one schema can be found in multiple table spaces, while a table
space can include objects from several schemas.

2.6 RELATIONAL QUERY LANGUAGE


Relational databases are the most widely used database paradigm,
and are the basis for commercial developments in object-relational
paradigms.
Relations are subsets of a cross product of domains (sets of values), and
relational models are defined as collections of relations. With a relational
model, we can use very abstract algebraic (relational algebra) and logic

3
(relational calculus) languages can be used to specify transactions. With a
relational DBMS, the internal and conceptual schemas, as well as the views,
are defined by relations.

2.7 SQL
SQL is a programming language for Relational Databases. It is
designed over relational algebra and tuple relational calculus. SQL comes as
a package with all major distributions of RDBMS.
SQL comprises both data definition and data manipulation languages.
Using the data definition properties of SQL, one can design and modify
database schema, whereas data manipulation properties allows SQL to store
and retrieve data from database.

2.8 OVERVIEW OF THE SQL QUERY LANGUAGE


SQL is the most widely used commercial relational database language.
it was originally developed at IBM’s san jose research laboratory. This
language originally called sequel and its name has changed to SQL
IBM Sequel language developed as part of System R project at the IBM
San Jose Research Laboratory Renamed Structured Query Language (SQL)
ANSI and ISO standard SQL:-
 SQL-86
 SQL-89
 SQL-92
 SQL:1999 (language name became Y2K compliant!)
 SQL:2003

You might also like