Some model
Model represent my system in a logical way.
Individual database system is designed differently .
Hierarchy is different and Relational is different .
It is designed based on rules .
For different database different data model exist .
But the main thing will remain same .
- Logical Structure / Conceptual structure will same
Data model are represented are plotted thorough diagram .
Most data models can be represented by an accompnaying database diagram . Meaning data models can be expressed by diagram .
Hierarchical , Object oriented , Network based - have different data model .
These so many models are not our concern.
Our model is relational model .
Entity relationship model is important for us .
Relational model reprensentative is Entity relationship model .
We use tables to represent it .
Tables k represent korar jonno eta
Entity -> Attribute(Id,Name..etc) k reprensent kore
Column ->Attribute
To form a table we use so many model . It must be relavent .
We can take one as a main attribute . It is primary key .
Foreign key ->
Row -> Tuple
Relationship among entity -> One to one , One to many ,Many to many
Entity will make relation with each other.
Relation degree -> One to one , One to many ,Many to many .
Database model consider ->
Database table k normalize kora .
Normalizing mean where data will not be redundant or anomani .
File system Vs DataBase system
The dataset will clean . There is no unnecessary repeatation .
For Relational database -> SQL
ER Model -> EF Codd 1972
Relational Model -> It changed the model
ER MODEL - Entity Relationship Model
We use it to represent relational model .
It is a visual reprentation of relational database .
Query ->
Internal formation -> How the data related to each other
What parameter they are related ?
The internal data we are forming
ER -> Internally database khub dorkar .
Hospital database ,
Library / Hospital alada domain . Internally kivabe structured we understand that .
ER diagram symbol and notation
It is a visual representation of
History ->
Worth book Model importance -> ER symbol -> Chen ERD Model symbols
He is pioneer in Entity relationship model and introduced symbols .
He is ERD in database system .
Rectangle -> Entity(The important data is entity )
Book -> Information Technology by Sara
Unimportant data -> Out of area / Out of domain -> As a guest they exist -> They are excluded from entity .
Full University data -> Bus ,Student, Library , Faculty , Book
Tree information -> No needed -> It is not attribute
Flower shop , Nursery-> They need tree information
Some service looks entity
Student admission database -> Faculty , Book , Bus is not entity that time
Depends on the situation we will tell what is entity and what is not .
Employee information e student er role nai
Important -> In main database -> Main thing is being given importance .
Weak Entity -> No self identity those entity have .->No primary key ->Depends on other entity for primary key
Strong Entity -> Have self identity -> Have primary key
Relationship -> Entity and relationship .
The relationship symbol represent the relation .
Attribute ->
If underlined -> Primary key
Double circled -> Multi Valued attribute.
Simple and single valued attribute ->
Multi-valued attribute -> 2 ta phone number apnar
Derived attribute ->CGPA from GPA . Ekta theke arekta pawa jai
Solid line -> There is a mandatory relationship between them .
Relationship so many types ->
- Ekta entity r sathe arektar relation thakbe . Degree of relationship -> Just friend More than just friend
Curdinality ->
One to one
One to many
Many to one
Many to many
SBR ->Schumamas Series
One publisher publises many book .
Multiple book can have one section
ER Notation er basic jinish
Single Attribute ->
Weak attribute ->
Multi Valued attribute ->
Types of attribute ->
Simple Vs Composite attribute
Single valued vs multi-valued
Stored vs Derived
Key vs Non Key
Descriptive Attribute
Identifying attribute
Attribute application ->
Entity set
To make functional entity set we use attribute .
Without attribute entity has no existance.
If I say in a empty page that I have ERD we will say where?
ERD diagram has characteristic -> Entity
Ghor chilo .
Jacchi dekhlam gach kete felse . Oboshisto ache dekhe bujhtesi .
https://erikanacua.wordpress.com/2013/02/08/entity-relationship-diagrams/
Attribute branch -> Composite attribute
Address -> Composite attribute
The attribute needs several others contribute is called composite attribute .
Jei attribute formation er jonno needs more than one attribute, one value is not sufficient , -> Name -> First name last name middle name , address ,
Phone number -> Multi valued attribute -> Country code / Area code -> Unique number -> To make understand company there is a code
It is composite attribute . Permanent address -> Present address
The attribute should have used as entity but not used as entity is called composite attribute . Example -> Student Attribute -> Student course name ,course code , faculty name .
Making separate the department -> Department named attribute is composite .
Deparment is a separate entity . But if we use it as a attribute of a student then it is composite .
Simple attribute -> No brance . Doesn't need other attribute to express it . Not a key attribute not a derived attribute. Not have multiple valued . Example -> Street , Road ,Country .
Multi Valued attribute -> More than one attribute . Example - Phone number, Email . A student may have two phone number .
A student may have so many gpa in so many semester -> It is multi valued
A student may have so many
Derived Attribute -> Depends on other attribute . -> Date of birth to age .
Multi-valued simple -> Phone number
Stored Vs Derived -> Age -> Derived from Date of Birth
A attribute may become under so many types
Primary key -> Id , Phone number , Email .
Candidate key -> That can be primary key
Non-key attribute ->
Descriptive attribute -> Relationship attribute .
Identifying attribute ->
Notation
Create a database for a team , where
A team has 11 players to play
Database -> Team
Attribute -> 11
Paritioning ->
How to articulate our database design ->
How to get out the content of making or ariticulate the database
These points are 6->
To make a relationship database .
- Define Domain(Sports)
- Sub-domain(Team)
- Entity Set(To reprensent the sub domain the important attribute is entity ) -> Players name , -> Noun is entity entity set . Design a database A customer can buy a product
Entity -> Customer and Product . I can easily understand it by seeing noun .
- Existance of
For different domain the attribute will be different .
- Relationship ->
Inter relation is very important .
- Constraints -> Condition Irrelavent information cannot be here is condition Outlier -> Out of context -> Every one is between age 15 to 20 . One is 50 .He is not aligned with others .
Single Row Function
Multi Row Function
Ekhn
Tmader Same kaj ta agami din abar kora lagbe .
Restricting korar jonno jei method ta use korte hobe -
Operator use kora
- Single row and Multi row bolte ki bujahi seta ektu por bolbo
Lower case -> Upper Case conversion -> Single row conversion
Multi Row conversion -> Sum
Data calculation -> Expressive Calculation
Individual Data modify -> Single row function main concept comes
Single row function main concept ->
Take one data and make it uppercase and return it .
-> Individual data deals by it .
Why is being told single row function?
-> Each row converting a data and return . Works for each row .
Return result per set of row
MUlTI ROW FUNCTION
-> Manipulate output for groups of row . Output will be one .
-> It can change date format , Number format .It can do basic calculation . Can change format . Can convert data type
-Character
- Number
- Date
- Conversion
- General
Single Row function
->
Data separate .
The function which deals with character is character manipulation function .
Unit cap -> First er word capital baki gula small letter .