Escolar Documentos
Profissional Documentos
Cultura Documentos
database
A database consists of a number of interrelated tables.
Each table has a number of records which are used to represent real
world objects.
For example, the police may have a record for each criminal that has
ever been arrested (i.e., the rap-sheet)
Each record has a number of fields which are data items used to specify
a characteristic of the record.(table contains row and column)
Examples of fields are:
name
employee number
address
prior convictions
structure of databaseThe specification of fields of the records in a table is
called the structure of the table.
The structure specifies the type (or kind of data) for each field of each
record.
Different types of fields are treated differently when they are entered,
displayed, or used. Examples of types are:
integer
currency
real number
time
date
Databases Management Systems
A Database Management System, or DBMS, is a computer application
that allows you to work with databases on a computer.
A database management system allows you to easily...
Create/Delete tables
Modify tables: (e.g., adding, deleting, editing and rearranging records,
changing the table structure)
Retrieve data from a table or a number of tables: (e.g., finding and
displaying an individual record, answering queries (i.e., displaying
specified field of records that satisfy a set of specified conditions)
Create reports: (e.g., create formatted output of a list of specified fields
of records that satisfy a set of specified conditions)
database architecture
The external level is one closed to the users. That is the one concerned
with the way in which the data is viewed by individual users. At the
external level the DBMS presents each user with a shared or single view
or schema of the data. there are many views of the data at this level ,
and each view is a representation of part of the complete database. A
view allows a user access to their portion of the database ,and shields
the rest of the database from them. Each external view is defined by
means of an external schema, which consists basically of definitions of
each of the various types of external record found in that external view.
In external level, the different views may have different representations
of the same data. For example one user may view date in the form as
day,month,year while another may view as year ,month ,day.
The Conceptual Level
Conceptual level is the representation of entire contents of database. If
the external level is concerned with individual user views, the conceptual
level may be thought of as defining a community user view. In other
words ,there will be many external views, each consisting of a more or
less abstract representation of some portion of the database and there
will be a single Conceptual view, consisting of a similarly abstract
representation of the database in its entirety.
The conceptual view is defined by the various schema which includes
definition of each of the various types of data or the various types of
conceptual record. The conceptual schema hides the details of physical
structure and concentrates on describing entities, data type ,
relationships, user operations and constraints. The view is normally more
stable than the other two views.
The ultimate objective of the conceptual schema is to describe the
complete enterprise-not just its data but also how that data is used, how
it flows from point to point within the enterprise, what it is used for at
each point, what controls are to be applied at each point and so on.
In most existing system the Conceptual schema is little more than a
simple union of all individual external schemas, with the addition of
certain security and integrity rules.
Hence conceptual level is concerned with the following activities:
1.All entities, there attributes and their relationship.
2.Constraint on the data.
3.Security and integrity rules.
4.Semantic information about the data.
5.Validation checks to retain data consistency and integrity.
The Internal Level
The internal level is the closest to physical storage, that is the one
concerned with the way in which the data is actually stored.
the following aspects are considered at this level:
example
Network database
In hierarchical DBMS, we can have only one parent to a child. But in
Network, we can have more than one.
Unlike hierarchical , Network DBMS does not necessarily follow
downward tree structure. In some cases it may follow upward tree
structure.
Please go through the below example to understand better.
ABC College has two Child. i.e. Department A and College library. It
represents one to many relationship. Even though there is no relation
between Department A and College library, a student can be a member
of both Department A and College library. This represents many to one
relationship. So as per the above example, student has two parents
which tell us this is the Network DBMS model. This is the simple and good
example for Network DBMS.
RDBMS
What is table?
The data in RDBMS is stored in database objects called tables. The table
is a collection of related data entries and it consists of columns and rows.
Remember, a table is the most common and simplest form of data
storage in a relational database. Following is the example of a
CUSTOMERS table:
+----+----------+-----+-----------+----------+
| ID | NAME
| AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi
| 1500.00 |
| 3 | kaushik | 23 | Kota
| 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP
| 4500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
+----+----------+-----+-----------+----------+
What is field?
Every table is broken up into smaller entities called fields. The fields in
the CUSTOMERS table consist of ID, NAME, AGE, ADDRESS and SALARY.
A field is a column in a table that is designed to maintain specific
information about every record in the table.
What is record or row?
A record, also called a row of data, is each individual entry that exists in
a table. For example there are 7 records in the above CUSTOMERS table.
Following is a single row of data or record in the CUSTOMERS table:
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
+----+----------+-----+-----------+----------+
DBMS Interfaces
Types of interfaces provided by the DBMS include:
Menu-Based Interfaces for Web Clients or Browsing
Present users with list of options (menus)
Lead user through formulation of request
Query is composed of selection options from menu displayed by
system.
Forms-Based Interfaces
Displays a form to each user.
User can fill out form to insert new data or fill out only certain
entries.
Designed and programmed for nave users as interfaces to canned
transactions.
Graphical User Interfaces
Displays a schema to the user in diagram form. The user can
specify a query by manipulating the diagram. GUIs use both forms
and menus.
Interfaces for the DBA
Systems contain privileged commands only for DBA staff.
Include commands for creating accounts, setting parameters,
authorizing accounts, changing the schema, reorganizing the
storage structures etc.
ODBC
Open Database Connectivity (ODBC) is an open standard application
programming interface (API) for accessing a database. By using ODBC
statements in a program, you can access files in a number of different
databases, including Access, dBase, DB2, Excel, and Text. In addition to
the ODBC software, a separate module or driver is needed for each
database to be accessed. The main proponent and supplier of ODBC
programming support is Microsoft.
ODBC is based on and closely aligned with The Open Group standard
Structured Query Language (SQL) Call-Level Interface. It allows programs
to use SQL requests that will access databases without having to know
OLE DB
OLE DB is Microsoft's strategic low-level application program interface
(API) for access to different data sources. OLE DB includes not only the
Structured Query Language (SQL) capabilities of the Microsoft-sponsored
standard data interface Open Database Connectivity (ODBC) but also
includes access to data other than SQL data.
As a design from Microsoft's Component Object Model (COM), OLE DB is a
set of methods (in earlier days, these might have been called routines)
for reading and writing data. The objects in OLE DB consist mainly of a
data source object, a session object, a command object, and a rowset
object. An application using OLE DB would use this request sequence:
1 Initialize OLE.
2 Connect to a data source.
3 Issue a command.
4 Process the results.
5 Release the data source object and uninitialize OLE.
OLE once stood for "Object Link Embedding" and "DB" for database.
However, Microsoft no longer ascribes these meanings to the letters
"OLE" and DB."
ODBC provides access only to relational databases
OLE DB provides the following features
Access to data regardless of its format or location
Full access to ODBC data sources and ODBC drivers
So it would seem that OLE DB interacts with SQL-based datasources
THRU the ODBC driver layer.
Java application calls the JDBC library. JDBC loads a driver which talks to
the database. We can change database engines without changing
database code.
XML
XML stands for eXtensible Markup Language. XML is a meta-markup
language developed by the World Wide Web Consortium(W3C) to deal
with a number of the shortcomings of HTML. As more and more
functionality was added to HTML to account for the diverse needs of
users of the Web, the language began to grow increasingly complex and
unwieldy. The need for a way to create domain-specific markup
languages that did not contain all the cruft of HTML became increasingly
necessary and XML was born.
The main difference between HTML and XML is that whereas in HTML the
semantics and syntax of tags is fixed, in XML the author of the document
is free to create tags whose syntax and semantics are specific to the
target application. Also the semantics of a tag is not tied down but is
instead dependent on the context of the application that processes the
document. The other significant differences between HTML and XML is
that the an XML document must be well-formed.
Although the original purpose of XML was as a way to mark up content, it
became clear that XML also provided a way to describe structured data
thus making it important as a data storage and interchange format. XML
provides many advantages as a data format over others, including:
1 Built in support for internationalization due to the fact that it utilizes
unicode.
2 Platform independence (for instance, no need to worry about
endianess).
3 Human readable format makes it easier for developers to locate
and fix errors than with previous data storage formats.
4 Extensibility in a manner that allows developers to add extra
information to a format without breaking applications that where
based on older versions of the format.
5 Large number of off-the-shelf tools for processing XML documents
already exist.
The world of traditional data storage and XML have never been closer
together. To better understand how data storage and retrievel works in
an XML world, this paper will first discuss the past, present, and future of
structuring XML documents. Then we will delve into the languages that
add the ability to query an XML document similar to a traditional data
store. This will be followed by an exploration of how the most popular
RDBMSs have recognized the importance of this new data storage format
and have integrated XML into their latest releases. Finally the rise of new
data storage and retrieval systems specifically designed for handling XML
will be shown.