0% found this document useful (0 votes)
31 views27 pages

1 RDBMS

The document discusses different types of database systems including relational databases using SQL, NoSQL document databases that store data in documents, and NoSQL graph databases used for storing network data. It also covers database management systems, common data operations like create, read, update and delete, and examples of creating tables and inserting data in SQL as well as applying constraints.

Uploaded by

mohamed ghnam
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)
31 views27 pages

1 RDBMS

The document discusses different types of database systems including relational databases using SQL, NoSQL document databases that store data in documents, and NoSQL graph databases used for storing network data. It also covers database management systems, common data operations like create, read, update and delete, and examples of creating tables and inserting data in SQL as well as applying constraints.

Uploaded by

mohamed ghnam
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/ 27

DATABASE SYSTEMS

Dr.Amgad Monir
Refreshing
• What is a database ?
• Computers + databases = …..
• What is DBMS ?
• What is C.R.U.D ?
• Types of databases
• Database Queries
• Creating tables
• Inserting data
• Constraints
What is a database ?
Computers + databases
Database Management System (DBMS) ?
Amazon.com database diagram
C.R.U.D
Two types of databases
Relational databases (SQL)
Relational databases (SQL)
NoSQL Database Types
Discussing NoSQL databases is complicated
because there are a variety of types:

•Sorted ordered Column Store


•Optimized for queries over large datasets, and store
columns of data together, instead of rows
•Document databases:
•pair each key with a complex data structure known as a document.

•Key-Value Store :
•are the simplest NoSQL databases. Every single item in the database is stored as an attribute name (or 'key'),
together with its value.
•Graph Databases :
•are used to store information about networks of data, such as social connections.
Non-Relational databases (NoSQL)
Document Database (NoSQL)
Graph Database (NoSQL)
Database Queries
Tables and Keys
Tables and Keys
Tables and Keys
SQL
SQL
Tools
Basic Data Types in SQL
Creating tables
CREATE TABLE student (
student_id INT PRIMARY KEY,
name VARCHAR(40),
major VARCHAR(40)
);

DESCRIBE student;

ALTER TABLE student ADD gpa DECIMAL;

ALTER TABLE student DROP COLUMN gpa;

DROP TABLE student;


Inserting Data

INSERT INTO student VALUES(1, 'Jack', 'Biology');


INSERT INTO student VALUES(2, 'Kate', 'Sociology');
INSERT INTO student(student_id, name) VALUES(3, 'Claire');
INSERT INTO student VALUES(4, 'Jack', 'Biology');
INSERT INTO student VALUES(5, 'Mike', 'Computer Science');
Constraints

CREATE TABLE student (


student_id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(40) NOT NULL,
major VARCHAR(40) DEFAULT 'undecided' );

You might also like