DATA MODELS FOR BUSINESS MODELS, Lab Reports of Database Management Systems (DBMS)

THESE ARE SOME BASIC DATABASE LABS ASSIGNMENT EASY FOR BEGINNERS..THEY CONTAIN OUPUT PICS AND CODE AS WELL

Typology: Lab Reports

2021/2022

Available from 08/19/2022

SamenKhan
SamenKhan 🇵🇰

231 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
NUST
Military College of Signals,
Rawalpindi.
DATABASE SYSTEM
LAB # 2
BATCH- BESE 26 C
Submitted By:
AYMEN FATIMA
Submitted To:
Sir Kabeer Ahmed
DEPARTMENT OF COMPUTER SOFTWARE ENGINEERING.
MILITARY COLLEGE OF SIGNALS.
pf3
pf4
pf5

Partial preview of the text

Download DATA MODELS FOR BUSINESS MODELS and more Lab Reports Database Management Systems (DBMS) in PDF only on Docsity!

NUST

Military College of Signals,

Rawalpindi.

DATABASE SYSTEM

LAB # 2

BATCH- BESE 26 C

Submitted By:

AYMEN FATIMA

Submitted To:

Sir Kabeer Ahmed

DEPARTMENT OF COMPUTER SOFTWARE ENGINEERING.

MILITARY COLLEGE OF SIGNALS.

EXPERIMENT 2 – DEVELOP DATA MODELS FOR BUSINESS

MODELS

Problem 2.1 :

Define an ERD for the following narrative. The database should track homes and owners. A home has a unique homidentifier, a street address, a city, a state, a zip, a number of bedrooms, a number of bathrooms, and square feet. A home is either owner occupied or rented. An owner has a Social Security number, a name, an optional spouse name, a profession, and an optional spouse profession. An owner can possess one or more homes. Each home has only one owner.

Solution :

Procedure :

 Create entities Home and Owner.  Include home identifier (Integer), street address (VarChar), city (VarChar), state (Char), zip (VarChar), bedrooms (Integer), bathrooms (Integer), square feet(Decimal).  Make Home identifier as primaryKey.  Include Social Security number(integer), name(varchar), spouse name (VarChar), a profession (Char), and spouse profession (varchar).  An owner can possess one or more homes so maximum cardinality will be many and minimum will be optional.  Each home has only one owner so Maximum and minimum cardinalities will be One and mandatory respectively.  Name this 1-M relationship as owns. Diagram :

  • For mutual funds, the software supports attributes for the mutual fund symbol, the share balance (a real number), the fund type (stock, bond, or mixed), the last closing price, the region (domestic, international, or global), and the tax-exempt status (yes or no).

Solution:

Procedure:  Using inheritance, make Account as Parent entity having three sub entities checkingAcc, CreditCard, and Investment.  Investment Further has two child entities Stock and MutuaFunds.  Identify attributes of Accounts as account identifier(integer), account name (VarChar), date established (Date), and balance (Decimal).  Make AccountIdentifier as PrimaryKey.  Identify attributes of checking account as bank name (VarChar), bank address (VarChar), checking account number (Integer), and routing number (Integer).  Identify attributes of credit card as credit card number (Integer), expiration date (Date), and credit card limit (Integer).  Identify attributes of stocks as stock type (Char), last dividend amount (Integer), the last dividend date (Date), exchange (Decimal), last closing price (Integer), and number of shares (Integer).  Identify attributes of mutual funds as share balance (Integer), fund type (VarChar), last closing price (Integer), region (Char), and tax-exempt status(Boolean). Diagram: