Sei sulla pagina 1di 26

PHYSICAL MODEL

FOR PROJECT

MODEL

RE Microsoft SQL Server 2008

Version

PHYSICAL MODEL FOR PROJECT MODEL RE Microsoft SQL Server 2008 Version Created: 9/21/2011 Last Modified: 9/21/2011

Created: 9/21/2011 Last Modified: 9/21/2011

Entity Report

Entities

   

#

Entity Name

Primary Key

Attribu

tes

dbo.tblCourses

cid

3

dbo.tblDepartment

did

3

dbo.tblStudents

sid

8

dbo.tblStudentSubjects

ssid

3

dbo.tblSubjects

subid

3

did 3 dbo.tblStudents sid 8 dbo.tblStudentSubjects ssid 3 dbo.tblSubjects subid 3 - 2-

- 2-

Entity 'dbo.tblCourses'

Entities

Caption

tblCourses

Primary Key

pk_tblCourses_cid

Entity Properties

Filegroup

PRIMARY

Primary Key 'pk_tblCourses_cid'

Attribute Name

type

Parent Entity

cid

PK

-----

Attributes

Attribute N 1) U 2) C 3) D 4) Key Domain Data Type Comments Name
Attribute
N 1)
U 2)
C 3)
D 4)
Key
Domain
Data Type
Comments
Name
PK
cid
Int
YES
NO
NO
NO
cname
Varchar(30)
NO
NO
NO
NO
FK
did
Int
NO
NO
NO
NO
Relationships
Relationship
Relationship Name
Parent Entity
Child Entity
Card.
Type
fk_tblDepartment_tblC
Non-identifying
dbo.tblDepartment
dbo.tblCourses
1:N
ourses_did
fk_tblCourses_tblStude
Non-identifying
dbo.tblCourses
dbo.tblStudents
1:N
nts_cid
fk_tblCourses_tblSubje
Non-identifying
dbo.tblCourses
dbo.tblSubjects
1:N
ct_cid

- 3-

Entity 'dbo.tblDepartment'

Entities

Caption

tblDepartment

Primary Key

pk_tblDepartment_did

Entity Properties

Filegroup

PRIMARY

Primary Key 'pk_tblDepartment_did'

Attribute Name

type

Parent Entity

did

PK

-----

Attributes

Attribute N 1) U 2) C 3) D 4) Key Domain Data Type Comments Name
Attribute
N 1)
U 2)
C 3)
D 4)
Key
Domain
Data Type
Comments
Name
PK
did
Int
YES
NO
NO
NO
dname
Varchar(30)
NO
NO
NO
NO
hod
Varchar(30)
NO
NO
NO
NO
Relationships
Relationship
Relationship Name
Parent Entity
Child Entity
Card.
Type
fk_tblDepartment_tblC
Non-identifying
dbo.tblDepartment
dbo.tblCourses
1:N
ourses_did

- 4-

Entity 'dbo.tblStudents'

Entities

Caption

tblStudents

Primary Key

pk_tblStudents_sid

Entity Properties

Filegroup

PRIMARY

Primary Key 'pk_tblStudents_sid'

Attribute Name

type

Parent Entity

sid

PK

-----

Attributes

Attribute N 1) U 2) C 3) D 4) Key Domain Data Type Comments Name
Attribute
N 1)
U 2)
C 3)
D 4)
Key
Domain
Data Type
Comments
Name
PK
sid
Int
YES
NO
NO
NO
sroll
Varchar(15)
YES
NO
NO
NO
sname
Varchar(30)
NO
NO
NO
NO
Varchar(20
sadd
NO
NO
NO
NO
0)
sphone
Varchar(15)
NO
NO
NO
NO
semail
Varchar(50)
NO
NO
NO
NO
FK
cid
Int
NO
NO
NO
NO
section
Varchar(1)
NO
NO
NO
NO
Relationships
Relationship
Relationship Name
Parent Entity
Child Entity
Card.
Type
fk_tblCourses_tblStude
Non-identifying
dbo.tblCourses
dbo.tblStudents
1:N
nts_cid
fk_tblStudents_tblStud
dbo.tblStudentSubject
Non-identifying
dbo.tblStudents
1:N
entSubjects_sid
s
Keys

Key

Constraint Name

Attributes

Type

PK

pk_tblStudents_sid

sid

AK

uk_tblStudents_sroll

sroll

- 5-

Entity 'dbo.tblStudentSubjects'

Entities

Caption

tblStudentSubjects

Primary Key

pk_tblStudentSubjects_ssid

Entity Properties

Filegroup

PRIMARY

Primary Key 'pk_tblStudentSubjects_ssid'

Attribute Name

type

Parent Entity

ssid

PK

-----

Attributes

Attribute N 1) U 2) C 3) D 4) Key Domain Data Type Comments Name
Attribute
N 1)
U 2)
C 3)
D 4)
Key
Domain
Data Type
Comments
Name
PK
ssid
Int
YES
NO
NO
NO
FK
sid
Int
NO
NO
NO
NO
subid
Int
NO
NO
NO
NO
Relationships
Relationship
Relationship Name
Parent Entity
Child Entity
Card.
Type
fk_tblStudents_tblStud
dbo.tblStudentSubject
Non-identifying
dbo.tblStudents
1:N
entSubjects_sid
s

- 6-

Entity 'dbo.tblSubjects'

Entities

Caption

tblSubjects

Primary Key

pk_tblSubjects_subid

Entity Properties

Filegroup

PRIMARY

Primary Key 'pk_tblSubjects_subid'

Attribute Name

type

Parent Entity

subid

PK

-----

Attributes

Attribute N 1) U 2) C 3) D 4) Key Domain Data Type Comments Name
Attribute
N 1)
U 2)
C 3)
D 4)
Key
Domain
Data Type
Comments
Name
PK
subid
Int
YES
NO
NO
NO
FK
cid
Int
NO
NO
NO
NO
subname
Varchar(30)
NO
NO
NO
NO
Relationships
Relationship
Relationship Name
Parent Entity
Child Entity
Card.
Type
fk_tblCourses_tblSubje
Non-identifying
dbo.tblCourses
dbo.tblSubjects
1:N
ct_cid
2)
3)
4)
1) Not Null
Unique
Check
Default

- 7-

Attribute Report

Attributes

Attribute Name Entity Name Domain Data Type PK FK cid dbo.tblCourses Int YES NO cname
Attribute Name
Entity Name
Domain
Data Type
PK
FK
cid
dbo.tblCourses
Int
YES
NO
cname
dbo.tblCourses
Varchar(30)
NO
NO
did
dbo.tblCourses
Int
NO
YES
did
dbo.tblDepartment
Int
YES
NO
dname
dbo.tblDepartment
Varchar(30)
NO
NO
hod
dbo.tblDepartment
Varchar(30)
NO
NO
cid
dbo.tblStudents
Int
NO
YES
sadd
dbo.tblStudents
Varchar(200)
NO
NO
section
dbo.tblStudents
Varchar(1)
NO
NO
semail
dbo.tblStudents
Varchar(50)
NO
NO
sid
dbo.tblStudents
Int
YES
NO
sname
dbo.tblStudents
Varchar(30)
NO
NO
sphone
dbo.tblStudents
Varchar(15)
NO
NO
sroll
dbo.tblStudents
Varchar(15)
NO
NO
sid
dbo.tblStudentSubjects
Int
NO
YES
ssid
dbo.tblStudentSubjects
Int
YES
NO
subid
dbo.tblStudentSubjects
Int
NO
NO
cid
dbo.tblSubjects
Int
NO
YES
subid
dbo.tblSubjects
Int
YES
NO
subname
dbo.tblSubjects
Varchar(30)
NO
NO

- 8-

Attribute 'cid'

Attributes

Caption

cid

Entity Name

dbo.tblCourses

Primary Key

YES

Foreign Key

NO

Data Type

Int

Not Null

YES

Unique

NO

Attribute Properties

Identity

YES

Identity Seed

1

Identity

1

Increment

Attribute 'cname'

Caption cname Entity Name dbo.tblCourses Primary Key NO Foreign Key NO Data Type Varchar(30) Not
Caption
cname
Entity Name
dbo.tblCourses
Primary Key
NO
Foreign Key
NO
Data Type
Varchar(30)
Not Null
NO
Unique
NO
Attribute Properties
Collation For the
Column
SQL_Latin1_General_CP1_CI_AS
Attribute 'did'
Caption
did
Entity Name
dbo.tblCourses
Primary Key
NO
Foreign Key
YES
Parent Entity
dbo.tblDepartment
Data Type
Int
Not Null
NO
Unique
NO

Attribute 'did'

Caption

did

Entity Name

dbo.tblDepartment

Primary Key

YES

Foreign Key

NO

Data Type

Int

Not Null

YES

Unique

NO

- 9-

Attributes

Attribute Properties

Identity

YES

Identity Seed

1

Identity

1

Increment

Attribute 'dname'

Caption

dname

Entity Name

dbo.tblDepartment

Primary Key

NO

Foreign Key

NO

Data Type

Varchar(30)

Not Null

NO

Unique

NO

Attribute Properties

Collation For the Column SQL_Latin1_General_CP1_CI_AS Attribute 'hod' Caption hod Entity Name
Collation For the
Column
SQL_Latin1_General_CP1_CI_AS
Attribute 'hod'
Caption
hod
Entity Name
dbo.tblDepartment
Primary Key
NO
Foreign Key
NO
Data Type
Varchar(30)
Not Null
NO
Unique
NO
Attribute Properties
Collation For the
Column
SQL_Latin1_General_CP1_CI_AS

Attribute 'cid'

Caption

cid

Entity Name

dbo.tblStudents

Primary Key

NO

Foreign Key

YES

Parent Entity

dbo.tblCourses

Data Type

Int

Not Null

NO

Unique

NO

Attribute 'sadd'

Caption

sadd

Entity Name

dbo.tblStudents

Primary Key

NO

Foreign Key

NO

Data Type

Varchar(200)

Not Null

NO

Unique

NO

-10-

Attributes

Attribute Properties

Collation For the Column

SQL_Latin1_General_CP1_CI_AS

Attribute 'section'

Caption

section

Entity Name

dbo.tblStudents

Primary Key

NO

Foreign Key

NO

Data Type

Varchar(1)

Not Null

NO

Unique

NO

Attribute Properties

Collation For the Column

SQL_Latin1_General_CP1_CI_AS

Attribute 'semail' Caption semail Entity Name dbo.tblStudents Primary Key NO Foreign Key NO Data Type
Attribute 'semail'
Caption
semail
Entity Name
dbo.tblStudents
Primary Key
NO
Foreign Key
NO
Data Type
Varchar(50)
Not Null
NO
Unique
NO
Attribute Properties
Collation For the
Column
SQL_Latin1_General_CP1_CI_AS
Attribute 'sid'
Caption
sid
Entity Name
dbo.tblStudents
Primary Key
YES
Foreign Key
NO
Data Type
Int
Not Null
YES
Unique
NO

Attribute Properties

Identity

YES

Identity Seed

1

Identity

1

Increment

-11-

Attribute 'sname'

Attributes

Caption

sname

Entity Name

dbo.tblStudents

Primary Key

NO

Foreign Key

NO

Data Type

Varchar(30)

Not Null

NO

Unique

NO

Attribute Properties

Collation For the Column

SQL_Latin1_General_CP1_CI_AS

Attribute 'sphone'

Caption sphone Entity Name dbo.tblStudents Primary Key NO Foreign Key NO Data Type Varchar(15) Not
Caption
sphone
Entity Name
dbo.tblStudents
Primary Key
NO
Foreign Key
NO
Data Type
Varchar(15)
Not Null
NO
Unique
NO
Attribute Properties
Collation For the
Column
SQL_Latin1_General_CP1_CI_AS
Attribute 'sroll'
Caption
sroll
Entity Name
dbo.tblStudents
Primary Key
NO
Foreign Key
NO
Data Type
Varchar(15)
Not Null
YES
Unique
NO

Attribute Properties

Collation For the Column

SQL_Latin1_General_CP1_CI_AS

Attribute 'sid'

Caption

sid

Entity Name

dbo.tblStudentSubjects

Primary Key

NO

Foreign Key

YES

Parent Entity

dbo.tblStudents

Data Type

Int

Not Null

NO

Unique

NO

-12-

Attribute 'ssid'

Attributes

Caption

ssid

Entity Name

dbo.tblStudentSubjects

Primary Key

YES

Foreign Key

NO

Data Type

Int

Not Null

YES

Unique

NO

Attribute Properties

Identity

YES

Identity Seed

1

Identity

1

Increment

Attribute 'subid'

Caption subid Entity Name dbo.tblStudentSubjects Primary Key NO Foreign Key NO Data Type Int Not
Caption
subid
Entity Name
dbo.tblStudentSubjects
Primary Key
NO
Foreign Key
NO
Data Type
Int
Not Null
NO
Unique
NO
Attribute 'cid'
Caption
cid
Entity Name
dbo.tblSubjects
Primary Key
NO
Foreign Key
YES
Parent Entity
dbo.tblCourses
Data Type
Int
Not Null
NO
Unique
NO

Attribute 'subid'

Caption

subid

Entity Name

dbo.tblSubjects

Primary Key

YES

Foreign Key

NO

Data Type

Int

Not Null

YES

Unique

NO

Attribute Properties

Identity

YES

Identity Seed

1

Identity

1

Increment

-13-

Attribute 'subname'

Attributes

Caption

subname

Entity Name

dbo.tblSubjects

Primary Key

NO

Foreign Key

NO

Data Type

Varchar(30)

Not Null

NO

Unique

NO

Attribute Properties

Collation For the Column

SQL_Latin1_General_CP1_CI_AS

Not Null NO Unique NO Attribute Properties Collation For the Column SQL_Latin1_General_CP1_CI_AS -14-

-14-

Key Report

Keys

Key

Key Name

Entity Name

Type

PK

pk_tblCourses_cid

dbo.tblCourses

PK

pk_tblDepartment_did

dbo.tblDepartment

PK

pk_tblStudents_sid

dbo.tblStudents

AK

uk_tblStudents_sroll

dbo.tblStudents

PK

pk_tblStudentSubjects_ssid

dbo.tblStudentSubjects

PK

pk_tblSubjects_subid

dbo.tblSubjects

PK pk_tblStudentSubjects_ssid dbo.tblStudentSubjects PK pk_tblSubjects_subid dbo.tblSubjects -15-

-15-

Key 'pk_tblCourses_cid'

Keys

Caption

pk_tblCourses_cid

Key Type

Primary Key

Entity Name

dbo.tblCourses

Attribute

Order

Foreign Key

cid

ASC

NO

Key Properties

Clustered

YES

Filegroup

PRIMARY

Key 'pk_tblDepartment_did'

Caption pk_tblDepartment_did Key Type Primary Key Entity Name dbo.tblDepartment Attribute Order Foreign Key did
Caption
pk_tblDepartment_did
Key Type
Primary Key
Entity Name
dbo.tblDepartment
Attribute
Order
Foreign Key
did
ASC
NO
Key Properties
Clustered
YES
Filegroup
PRIMARY
Key 'pk_tblStudents_sid'
Caption
pk_tblStudents_sid
Key Type
Primary Key
Entity Name
dbo.tblStudents
Attribute
Order
Foreign Key
sid
ASC
NO
Key Properties
Clustered
YES
Filegroup
PRIMARY

Key 'uk_tblStudents_sroll'

Caption

uk_tblStudents_sroll

Key Type

Alternate Key

Entity Name

dbo.tblStudents

Attribute

Order

Foreign Key

sroll

ASC

NO

Key Properties

Clustered

NO

Filegroup

PRIMARY

-16-

Key 'pk_tblStudentSubjects_ssid'

Keys

Caption

pk_tblStudentSubjects_ssid

 

Key Type

Primary Key

Entity Name

dbo.tblStudentSubjects

Attribute

Order

Foreign Key

ssid

ASC

NO

Key Properties

Clustered

YES

Filegroup

PRIMARY

Key 'pk_tblSubjects_subid'

Caption pk_tblSubjects_subid Key Type Primary Key Entity Name dbo.tblSubjects Attribute Order Foreign Key subid
Caption
pk_tblSubjects_subid
Key Type
Primary Key
Entity Name
dbo.tblSubjects
Attribute
Order
Foreign Key
subid
ASC
NO
Key Properties
Clustered
YES
Filegroup
PRIMARY

-17-

Relationships

Relationship Report

Relationship Name

Relationship

Parent Entity

Child Entity

Card.

Type

fk_tblCourses_tblStude

Non-identifying

dbo.tblCourses

dbo.tblStudents

1:N

nts_cid

fk_tblCourses_tblSubje

Non-identifying

dbo.tblCourses

dbo.tblSubjects

1:N

ct_cid

fk_tblDepartment_tblC

Non-identifying

dbo.tblDepartment

dbo.tblCourses

1:N

ourses_did

fk_tblStudents_tblStud

Non-identifying

dbo.tblStudents

dbo.tblStudentSubject

1:N

entSubjects_sid

s

fk_tblStudents_tblStud Non-identifying dbo.tblStudents dbo.tblStudentSubject 1:N entSubjects_sid s -18-

-18-

Relationships

Relationship Name 'fk_tblCourses_tblStudents_cid'

 

Caption

fk_tblCourses_tblStudents_cid

 

Relationship Type

Non-identifying

Cardinality

1:N

Mandatory Parent

NO

Mandatory Child

NO

Parent Entity

dbo.tblCourses

Child Entity

dbo.tblStudents

Referential Integrity

 
   

Insert

Update

Delete

Parent

----

RESTRICT

CASCADE

Child

NONE

NONE

----

Keys

Key Type

Parent Key

Child Key

Primary Key 'pk_tblCourses_cid'

cid

cid

Relationship Name 'fk_tblCourses_tblSubject_cid' Caption fk_tblCourses_tblSubject_cid Relationship Type
Relationship Name 'fk_tblCourses_tblSubject_cid'
Caption
fk_tblCourses_tblSubject_cid
Relationship Type
Non-identifying
Cardinality
1:N
Mandatory Parent
NO
Mandatory Child
NO
Parent Entity
dbo.tblCourses
Child Entity
dbo.tblSubjects
Referential Integrity
Insert
Update
Delete
Parent
----
RESTRICT
CASCADE
Child
NONE
NONE
----
Keys
Key Type
Parent Key
Child Key
Primary Key 'pk_tblCourses_cid'
cid
cid

Relationship Name 'fk_tblDepartment_tblCourses_did'

 

Caption

fk_tblDepartment_tblCourses_did

 

Relationship Type

Non-identifying

Cardinality

1:N

Mandatory Parent

NO

Mandatory Child

NO

Parent Entity

dbo.tblDepartment

Child Entity

dbo.tblCourses

Referential Integrity

 
   

Insert

Update

Delete

Parent

----

RESTRICT

CASCADE

Child

NONE

NONE

----

-19-

Relationships

Keys

Key Type

Parent Key

Child Key

Primary Key 'pk_tblDepartment_did'

did

did

Relationship Name 'fk_tblStudents_tblStudentSubjects_sid'

Caption

fk_tblStudents_tblStudentSubjects_sid

Relationship Type

Non-identifying

Cardinality

1:N

Mandatory Parent

NO

Mandatory Child

NO

Parent Entity

dbo.tblStudents

Child Entity

dbo.tblStudentSubjects

Referential Integrity

 

Insert

Update

Delete

Parent

----

RESTRICT

CASCADE

Child

NONE

NONE

----

Keys Key Type Parent Key Child Key Primary Key 'pk_tblStudents_sid' sid sid
Keys
Key Type
Parent Key
Child Key
Primary Key 'pk_tblStudents_sid'
sid
sid

-20-

Filegroups

Filegroup Report

Filegroup Name

PRIMARY

Filegroups Filegroup Report Filegroup Name PRIMARY -21-

-21-

Filegroup 'PRIMARY'

Used in

Filegroups

Entity Name

dbo.tblCourses

dbo.tblDepartment

dbo.tblStudents

dbo.tblStudentSubjects

dbo.tblSubjects

Key Constraint Name (Entity Name)

pk_tblCourses_cid (dbo.tblCourses)

pk_tblDepartment_did (dbo.tblDepartment)

pk_tblStudents_sid (dbo.tblStudents)

uk_tblStudents_sroll (dbo.tblStudents)

pk_tblStudentSubjects_ssid (dbo.tblStudentSubjects)

pk_tblSubjects_subid (dbo.tblSubjects)

(dbo.tblStudents) pk_tblStudentSubjects_ssid (dbo.tblStudentSubjects) pk_tblSubjects_subid (dbo.tblSubjects) -22-

-22-

User Report

Users

User Name

dbo

guest

INFORMATION_SCHEMA

sys

User Report Users User Name dbo guest INFORMATION_SCHEMA sys -23-

-23-

User 'dbo'

Users

Caption

dbo

Membership

User Group Name

db_owner

User 'guest'

Caption

guest

User 'INFORMATION_SCHEMA'

Caption

INFORMATION_SCHEMA

User 'sys'

Caption

sys

Caption guest User 'INFORMATION_SCHEMA' Caption INFORMATION_SCHEMA User 'sys' Caption sys -24-

-24-

User Groups

User Group Report

User Group Name

db_accessadmin

db_backupoperator

db_datareader

db_datawriter

db_ddladmin

db_denydatareader

db_denydatawriter

db_owner

db_securityadmin

public

db_ddladmin db_denydatareader db_denydatawriter db_owner db_securityadmin public -25-

-25-

User Group 'db_accessadmin'

User Groups

Caption

db_accessadmin

User Group 'db_backupoperator'

Caption

db_backupoperator

User Group 'db_datareader'

Caption

db_datareader

User Group 'db_datawriter'

Caption

db_datawriter

User Group 'db_ddladmin'

Caption

db_ddladmin

User Group 'db_denydatareader' Caption db_denydatareader User Group 'db_denydatawriter' Caption
User Group 'db_denydatareader'
Caption
db_denydatareader
User Group 'db_denydatawriter'
Caption
db_denydatawriter
User Group 'db_owner'
Caption
db_owner
Members
User Name or User Group Name
dbo
User Group 'db_securityadmin'

Caption

db_securityadmin

User Group 'public'

public

Caption

-26-