You are on page 1of 10

DBMS

Database is a collection of records

RDBMS
Database is a collection of: {tables, views, synonyms, defaults, rules}

can be accessed through a SQL server only


table is a main object where you store data

http://it.toolbox.com/wiki/index.php/Relational_Database_Management_System

RELATIONAL DATA BASE MANAGEMENT SYSTEM

what is a Database?

collection of objects mainly

>>>in general is a collection of data<<<

for example any organization has data to store


student data and marks for a university

comes from small to large portions

group of data = record

group of records= database

data can be store used record be classified collected

raw data information can be converted in a database


presented the data to the user as relations (a presentation in tabular form, i.e. as a collection of
tables with each table consisting of a set of rows and columns, can satisfy this property) provided
relational operators to manipulate the data in tabular form

everything depends on the maintaining of the database

main goal of maintaining

DBMS

it helps to the performance(make it faster) of a system

because it is already grouped and classified

disadvantages

global exposure

RDBMS IS THE REQUIREMENT OF TODAYS INDUSTRY

check http://es.wikipedia.org/wiki/DBMS

http://es.wikipedia.org/wiki/Sistema_Administrador_de_Bases_de_Datos

Characteristics
supports very large storage

network

high security

Database

collection of objects (tables)

collection of records=objects

collection of data=record

data

relations between objects

1 to 1

1 to many

many to many

objects of the database

view

table

default

user
designer

what to do with a designed db?

SECURITY

IF DATA IS LOST YOUR DONE

rdbms is a highly secure software

types

the db is designed so depending on the user it will have limited or complete access

so like yahoo or Google only collect data from the user

data integrity

refers to the consistency order and condition in which the data is stored in the objects and the
relationship they have

data conectivity
conditions for the designs for example the same types of values, same fields between tables,
columns, rows

RELATIONAL DATABASE

PRIMARY KEY

FOREIGN KEY

Keys A unique key is a kind of constraint that ensures that an object, or critical information about
the object, occurs in at most one tuple in a given relation. For example, a school might want each
student to have a separate locker. To ensure this, the database designer creates a key on the
locker attribute of the student relation. Keys can include more than one attribute, for example, a
nation may impose a restriction that no province can have two cities with the same name. The
key would include province and city name. This would still allow two different provinces to have a
town called Springfield because their province is different. A key over more than one attribute is
called a compound key.

Foreign keys

A foreign key is a reference to a key in another relation, meaning that the referencing tuple has,
as one of its attributes, the values of a key in the referenced tuple. Foreign keys need not have
unique values in the referencing relation. Foreign keys effectively use the values of attributes in
the referenced relation to restrict the domain of one or more attributes in the referencing relation.

A foreign key could be described formally as "For all tuples in the referencing relation projected
over the referencing attributes, there must exist a tuple in the referenced relation projected over
those same attributes such that the values in each of the referencing attributes match the
corresponding values in the referenced attributes".
LANGUAGES

LEVELS:

external user level

conceptual administrator level

internal level programmer

4th level languages

DDL data defeinition language

DML data manipulation language


DCL data control language // administration of the data base // management of the resources in
general

resource: with commands you are going to use the objects

assigning the priviledges to the users:

read only --- no modification to the records whatsoever

read write ---modify but not delete

grant all --- can do anythind to the records

FUNCTIONAL COMPONENTS O DBMS

DATABASE MANAGER responsible for converting user queries to appropiate system calls

FILE MANAGER identifies the block containing the requested record

DISK MANAGER performs all the physical input and output

DESIGNING AND PLANNING

LANGUAGE SUPPORT FOR THE RELATIONAL MODEL

MOST RDB SUPPORT A QUERY LANGUAGE

GUI graphical user interface

USING SQL (structured query language)

Structured Query Language (SQL) is a standard programming language used for accessing and
maintaining a database.The key feature of the SQL is an interactive approach for getting
information from and updating a database. The SQL is both ANSI and ISO standard supported by
most standard databases and the most popular programming language for the retrieval and
management of data in relational database management systems, database schema creation and
modification, and database object access control management.Though the SQL comes in many
flavors, for instance besides the standard SQL syntax, the Oracle databases also utilize their
proprietary PL/SQL, similarly Microsoft SQL Server utilize their Transact-SQL.All of these
variations, through proprietary, are based upon the industry standard ANSI SQL.

SQL- Structured Query Language is the set of commands that are used to create , manipulate the
structures in a relational database. Also, SQL is the most powerful way of retriving the data from
DB. SQL supports different types of operations. Based on this the commands can be broadly
classified into following types.
• Data Definition Language
• Data Manipulation Language
• Transaction Control Language
• Session Control Language
• System Control Language

DDL(data definition language)

DML(data manipulation language)

DCL(data control language)

SQL code

example

create table <tablename> employee number(5),

employee character(10), designation character(10),

deparment character(10), salary number(5) );

table created

desc employee >>> description of the table "employee"(display)

the table is now created

drop employee >>>DDL(data definition language) is the


structure of the table

DML INSERTING, DELETING, ADDING, CREATING VALUES IN THE TABLE WE CREATED(IN THE
STRUCTURE)

insert into employee values(1001,"edwin","manager","sales",5000);

1 record created

many of these systems


submit

DISPLAY

select * from employee; >>>* means all the records will be displayed

you want to display on only two fields:

select employee, salary from employee;

condition if you want to retrieve the records, with math or logical operators

how to use operators:

select employee, employee, salary, salary + salary*100 / 10, from employee;

2000, 2200

the column with the operation will be a virtual column that is created

access various records with conditions

using clause for example if we want to fin employee 800th from a 1000 employees table:

select * from employee where employee=800;

so it will only select one record


select * from employee where designation="manager";

all employees that are managers will appear

select * from employee where salary>3000;

RELATIONAL, LOGICAL

You might also like