0% found this document useful (0 votes)
21 views16 pages

Database Fundamentals Lab1

Databases allow for the organization of information in a way that allows quick retrieval of specific data. A database management system (DBMS) provides an interface to create, manage, and access databases. The relational database model organizes data into tables with rows and columns, and relates tables through primary and foreign keys. Structured Query Language (SQL) is used to define, manipulate, and query data in relational database systems like Microsoft SQL Server.

Uploaded by

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

Database Fundamentals Lab1

Databases allow for the organization of information in a way that allows quick retrieval of specific data. A database management system (DBMS) provides an interface to create, manage, and access databases. The relational database model organizes data into tables with rows and columns, and relates tables through primary and foreign keys. Structured Query Language (SQL) is used to define, manipulate, and query data in relational database systems like Microsoft SQL Server.

Uploaded by

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

Database Fundamentals

What is the database?


A collection of information organized in
such a way that a computer program can
quickly select desired pieces of data.

You can think of a database as an electronic


filling system.
Where do we use Database?
Database Management System (DBMS)
Simply DBMS helps you to create and
manage databases- same like MSWord
helps you to create or manage word
documents.
Database Management System (DBMS)

 DBMS is a computer software providing the interface between users

and a database (databases).

 It’s a software system designed to allow the definition, creation,

querying, update, and administration of databases.

 Different types of DBMS are RDBMS, object oriented DBMS,

Network DBMS, Hierarchical DBMS

 Examples: Oracle, MySQL, PostureSQL, SQL Server, Firebird, etc.

 The RDBMS follows Entity-Relationship model.

 The data in RDBMS is stored in database objects called tables.


What is Entity-Relationship (ER) Data
model?
 In ER model all data can be viewed as Entities, Attributes
and different relations that can be defined between Entities.

 Entities
- Is an object in the real-world that is distinguishable
from other objects.
- Ex. Employees, Places.

 Attributes
- An entity is described in the database using a set of
attributes.
- Ex. Employee_Name, Employee_Age, Gender.
What is Entity-Relationship (ER) Data
model?
Relationships
- A relationship is an association among two or more entities.
- There are three types of relationships existing between tables in a database (one-
to-one, one-to-many, many-to-many).
 one-to-one relationship: each record in the table on the one side of the
relationship can have only one matching record in the table on the other
side of the relationship
 One-to-many relationship: A record in one table can have many related
records in another table.
 Many-to-many: Each record in the table on the one side of the relationship
can have only one or many matching records in the table on the other side
of the relationship.
 So a relation means simply a two dimensional table.
 Entities will be data within a table. Table is a collection of related data entries
and it consists of columns and rows.
 And attributes will be the columns of that table.
Relational model basics
Data is viewed as existing in two
dimensional tables known as a relations.
A relation (table) consists of unique
attributes (columns) and tuples (rows).
Relational model Example
Keys in relational model
Primary key
Here there are 2 employees with name
“Deepak” but each can be identified
distinctly by defining a primary key
Keys in relational model
Primary key
The Primary Key Constraint uniquely
identifies each record in a database table.
Keys in relational model
Foreign Key
A Foreign Key is one table points to a primary key in
another table.
SQL SERVER
Microsoft SQL Server is a relational
database management system developed by
Microsoft.
This software is implemented using SQL
SQL stands for Structured Query Language.
SQL is a standard language for accessing
and manipulating databases.
SQL is an ANSI (American National
Standards Institute).
Structure Query Language
SQL can execute queries against a database
 SQL can store and retrieve data from a
database in a secure and safe manner.
SQL is not case sensitive. Generally,
keywords of SQL are written in uppercase.
Statements of SQL are dependent on text
lines. We can use a single SQL statement on
one or multiple text lines.
What is the SQL Data type?
SQL Data type is used to define the
values that a column can contain.
Every column is required to have a name
and data type in the database table.
SQL Commands
 SQL commands are instructions. It is used to
communicate with the database. It’s also used to
perform specific tasks, functions, and queries of data.
 There are five types of SQL Commands: DDL, DML,
DCL, TCL, and DQL

You might also like