0% found this document useful (0 votes)
2 views2 pages

Database Architecture and Data Models

The document outlines the architecture of database systems, which includes physical, logical, and view levels, emphasizing data abstraction and independence. It explains Data Definition Language (DDL) and Data Manipulation Language (DML) for defining and manipulating data, along with various data models such as Entity-Relationship, Network, Relational, and Object-Oriented models. Additionally, it covers integrity constraints like PRIMARY KEY and FOREIGN KEY that ensure data validity and relationships between tables.

Uploaded by

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

Database Architecture and Data Models

The document outlines the architecture of database systems, which includes physical, logical, and view levels, emphasizing data abstraction and independence. It explains Data Definition Language (DDL) and Data Manipulation Language (DML) for defining and manipulating data, along with various data models such as Entity-Relationship, Network, Relational, and Object-Oriented models. Additionally, it covers integrity constraints like PRIMARY KEY and FOREIGN KEY that ensure data validity and relationships between tables.

Uploaded by

ask4anish
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module-1: Database System Architecture and Data Model

1. Database System Architecture


It consists of 3 levels:

- Physical Level: Describes how data is actually stored.

- Logical Level: Describes what data is stored and the relationships among the data.

- View Level: Describes only part of the entire database to the users.

Data Abstraction helps simplify user interaction with data by hiding complexity.

2. Data Independence
- Logical Data Independence: Changes in logical schema do not affect external views.

- Physical Data Independence: Changes in physical schema do not affect logical schema.

3. Data Definition Language (DDL)


DDL commands define the structure of the database.

Example:

CREATE TABLE Students (

id INT PRIMARY KEY,

name VARCHAR(50),

age INT

);

4. Data Manipulation Language (DML)


DML is used for accessing and manipulating data:

- SELECT

- INSERT

- UPDATE

- DELETE
Example:

INSERT INTO Students VALUES (1, 'Anish', 21);

SELECT * FROM Students;

5. Data Models
- Entity-Relationship Model: Uses entities and relationships. Visualized using ER Diagrams.

- Network Model: Uses records and sets with links (pointers).

- Relational Model: Data represented in tables with rows and columns.

- Object-Oriented Model: Uses classes, objects, inheritance like in programming.

6. Integrity Constraints and Data Operations


- PRIMARY KEY: Unique value for each record.

- FOREIGN KEY: Reference to a primary key in another table.

- NOT NULL: Attribute must have a value.

- CHECK: Constraint to ensure value meets a condition.

Example:

CREATE TABLE Enrollments (

student_id INT,

course_id INT,

FOREIGN KEY (student_id) REFERENCES Students(id)

);

You might also like