0% found this document useful (0 votes)
57 views9 pages

1.convert Information Model To ER Model (With Minimum 3 or More Entites)

The document describes converting an information model to an ER model with at least 3 entities: Shopping Cart, Customer, and Product. It then converts the ER model to a relational model with tables for each entity. To eliminate anomalies, the relational model undergoes normalization into 1NF, 2NF, and 3NF. DDL and DML scripts are created for the normalized relational model. Finally, various queries like WHERE, GROUP BY, HAVING, ORDER BY, nested queries, IN, LIKE, and relational operators are applied to the relational model.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views9 pages

1.convert Information Model To ER Model (With Minimum 3 or More Entites)

The document describes converting an information model to an ER model with at least 3 entities: Shopping Cart, Customer, and Product. It then converts the ER model to a relational model with tables for each entity. To eliminate anomalies, the relational model undergoes normalization into 1NF, 2NF, and 3NF. DDL and DML scripts are created for the normalized relational model. Finally, various queries like WHERE, GROUP BY, HAVING, ORDER BY, nested queries, IN, LIKE, and relational operators are applied to the relational model.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

1.

convert information model to ER Model ( with minimum 3 or more entites)

SHOPPING CART:

INFORMATION MODULE:

A online shopping cart enables us to shop online. As we all know that now-a-
days online shopping has became popular, because of it’s advantages. Online
shopping cart reduces the time for shopping and makes the shopping safe and
convenient for the users. Also, allows easy payment of bills.

1.ER MODEL:
2.convert ER Model to Relational Model.

RELATIONAL MODEL:

CUSTOMER

Customername Customer id Amount

abc 3787 50000

Xyz 5784 68490

Pqr 4789 47590

Efg 9850 80000

SHOPPING CART

Cart id Order status Total cost

783494 Pending 59000

R884u9 Delivered 46579

4758fw Pending 65090

4gr893 Delivered 70800

PRODUCT

Prd id Prd name No.of prd

D6488w Tv 2

Dyg7399 Fan 4

Dfg7487 Ac 2

Y937493 Computer 2

3.Elimination of Anomalies in Relational Model


A)Anomalies in a relational model can be eliminated by normalizing data.

Normalization:

Normalization is a technique of organizing the data in the database. Normalization is


a systematic approach of decomposing tables to eliminate data redundancy and
undesirable characteristics like Insertion, Update and Deletion Anomalies. It is a
multi-step process that puts data into tabular form by removing duplicated data from
the relational tables. There are mainly 3 normal forms:

1.)1 nf:

The first normal form. A table is said to be in 1nf if it satisfies the following
rules:

1.)It should contain a primary key.

2.)It should not contain repeating groups.

3.)It should contain only atomic values.

Ex:

Before 1nf:

Roll no Name Phno Sub1 Sub2

1 A 1265,3654 Dbms Os

2 B 4758 Os R

3 C 3647 R Dbms

After 1 nf:

Roll no Name

1 A

2 B

3 C

Roll no Phno

1 1265
2 4758

3 3647

1 3654

2.)2 nf:

1.)It should be in 1nf.

2.)Every non-key attribute is fully dependent on key attribute.

Ex:

Before 2nf:

Fid Sub Fname

1 Dbms A

1 Os A

2 R B

After 2nf:

Fid Fname

1 A

2 B

Fid Sub

1 Dbms

1 Os

2 R

3.)3 nf:
1.)It should be in 2nf.

2.)There is no transitive dependency.

Ex:

Before 3nf:

Eid Ename Pincode City State

1 A 57788 E Ap

2 B 79899 F Ts

After 3nf:

Eid Ename pincode

1 A 57788

2 B 79899

Pincode City State

57788 E Ap

79899 F Ts

4.DDL/DML Scripts on Relational Model

DDL COMMANDS:

Create:

Alter:
Drop:

DML COMMANDS:

Insert:

Update:

Delete:

5.Apply Different Queries on Relational model(where,group by,having,order


by,nested query,in,like,relational operators)

Where:

Group by:
Having:

Order by:

Nested query:

In:

Not in:
In:

Like:

Relational operators:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy