it faculty software engineering seniors uml for a simple database management system prepared by:...
TRANSCRIPT
IT FacultyIT FacultySoftware EngineeringSoftware Engineering
SeniorsSeniors
UML for a simple DataBase Management SystemUML for a simple DataBase Management SystemPrepared by:Prepared by:
األسود األسود أنس أنسالفروان الفروان بشير بشيرالزعبي الزعبي زهير زهيرالمحمد المحمد ياسر ياسر
Tips:Tips:Who interacts with our system:Who interacts with our system:
- we’ll consider - we’ll consider an administratoran administrator who manages the system who manages the system itself, he itself, he
can also create users and define their authoritycan also create users and define their authority- - a usera user who uses the database, query, modify items… who uses the database, query, modify items…
The NEW Functionality allows the user for multiple choices like: The NEW Functionality allows the user for multiple choices like:
- new DataBase- new DataBase: creates an empty database: creates an empty database- - new tablenew table: creates a table in the current selected database: creates a table in the current selected database- - new Column:new Column: creates a column in the current selected creates a column in the current selected table….table….
after defining a new column a user can define it’s after defining a new column a user can define it’s constraints, like:constraints, like:
primary key, foreign key…primary key, foreign key…if a user defined a primary key: after saving we can if a user defined a primary key: after saving we can
create an create an index by default for itindex by default for itwe my allow checking referencing table and referencing we my allow checking referencing table and referencing
column column in foreign key definition in foreign key definition
We could also make a new:We could also make a new: View, row, user, index, stored procedure…View, row, user, index, stored procedure… We assume these functions are achieved through an We assume these functions are achieved through an
invocation for a data designer UI.invocation for a data designer UI. Any new command accompanies with checking the user Any new command accompanies with checking the user
authority i.e. :authority i.e. : Not all users can make a new databaseNot all users can make a new database Some users can create tables, indexes, but others Some users can create tables, indexes, but others
can’tcan’t In general: the Administrator creates users and In general: the Administrator creates users and
define their privilegesdefine their privileges One who create a table considered to be the table One who create a table considered to be the table
ownerowner
And he’s the one who defines who can access it and And he’s the one who defines who can access it and how.how.
Users can create other users if they have the authorityUsers can create other users if they have the authority
Saving completes the creation, it can Saving completes the creation, it can consist of:consist of: checking duplicate itemschecking duplicate items updating data files if everything is okupdating data files if everything is ok updating metadata if structure changedupdating metadata if structure changed report errors if any exists and redoing changes if report errors if any exists and redoing changes if
necessary.necessary. We assume there is a query system inside the data base:We assume there is a query system inside the data base:Adding, deleting, modifying can be done using a UI but Adding, deleting, modifying can be done using a UI but
anyway it’sanyway it’sExecuted Through the query system which also give the Executed Through the query system which also give the
user theuser theability to retrieve infoability to retrieve info
The diagrams are not relative to a specific database The diagrams are not relative to a specific database management systemmanagement system
Now we’ll present the Use Cases:Now we’ll present the Use Cases:II
This is a simple use case
We considered the manage system use case As a set of operation an administrator can do an no one else.
When checking authority and it was denied it reports this
Add, delete, modify runs it’s functionality through the query system
The next pages contains more detailed use case.
check authority
report
<<extend>>
manage system
create new
<<include>>
administrator
add
<<include>>
delete
modify
query
<<extend>>
<<include>>
<<extend>><<extend>>
<<extend>>user
save
check user authority
create DataBase
create table
create column
insert row create index
create user
create redolog files create dataFiles
<<include>>
define constraints define foreign key
define primary key
<<include>>
report
<<extend>>
<<extend>>
check referenceTable-Column
<<include>>
update meta data
Administrator
user
create new
<<include>>
<<include>>
<<include>>
update DataFiles
update MetaData
set a redo Point
report
check duplicate items
save changes
<<include>>
<<include>>
<<include>>
<<include>>
parse_check
ckeck authority
retrieve data
user
query
<<extend>>
<<extend>>
<<extend>><<include>>
<<include>>
We considered a query system which runs the real We considered a query system which runs the real internal operations i.e.:internal operations i.e.: When a user saves changes the system simply do a commitWhen a user saves changes the system simply do a commit When a user creates something the system simply builds When a user creates something the system simply builds
an SQL commands, accumulate them, after saving it runs an SQL commands, accumulate them, after saving it runs these commands internally.these commands internally.
Next we’ll present an introductory overview of the classes relative to our system as
Notes:
-We could consider an administrator is a special user( power user) so two kinds of users: ordinary and power users.
-It is possible to make a DataBaseObject an ancestor for all objects(database, table, column, index….) with common attributes(like owner), this type is used mainly in generalized options like: authorities class
DataFile
ReportSystem
report(String)
Authoritiesobject : DBObjectuser : UseraccessType : AccessType
checkAuthority(user, authority)add(user, object, accessType)delete(user, authority)modify(user, authority)
MetaData
Colomncol_name : Stringis_forignkey : Booleantype : type
Add_Col()Delete_Col()Set_ForignKey()Update_Col()
RedoLogFilefile : File;redoPoints : Array of Dateowner : DataBase
redo(Date)redo(RedoPoint)
DataBasename : Stringowner : User
Create_db()Save_db()Delete_db()Update_db()Check_validation()
Viewview_name : String
Create_View()Delete_View()
Tabletable_name : String
Set_Name()Get_Name()Create_Table()Save_Table()Delete_Table()Update_Table()
Useruser_name : Stringpassword : Stringvalid_type : Integer
Cell
cell_col : Colomncell_row : Integercell_value : type
Set_Cell()Get_Cell()Change_Cell()
Indexindex_name
Create_Index()Delete_Index()
QuerySystem
currentQuery : String
Parse(query String)