22
Database Systems දත සදාය පධ1

Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

Database Systems දත්ත සමුදාය පද්ධති

1

Page 2: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• විවිධ පුද්ගයන්ට භාවිතා කෂ ශැකි අයුරින් විධිමත් ආකාරයකට,

එකිනනකට වම්බන්ධිත දත්ත රලා තබාගැනීමක් දත්ත වමුදායකි.

– A collection of data stored in a standardized format, designed to be

shared by multiple users.

– A database is an organized collection of data.

- www.wikipedia.org

– A collection of related data. – Elmasri and Navathe

2

දත්ත සමුදායක් යනු...

A Database is…

Page 3: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• දත්ත සමුදාය කළමනාකරණ පද්ධතියක් යනු :ඳරිගණකගත ආකාරයට දත්ත වමුදාය ඳද්ධතියක් වෑදීමට වශ ඳලත්ලා ගැනීමට නිර්මාණය කර ඇති මෘදුකාාංග නේ.

• Database Management System (DBMS): A software package/ system to facilitate thecreation and maintenance of a computerizeddatabase.

• දත්ත සමුදාය පද්ධතියක් යනු:දත්ත ඇතුත් කර ඇති දත්ත වමුදාය ඳද්ධතියක් නබොනශෝ විට නම් නමින් ශැඳින්නේ. නබොනශෝ විට නම් වමග නලනත් මෘදුකාාංගද භාවිතා නේ.

• Database System:The DBMS software together with the data itself.Sometimes, the applications are also included.

3

Page 4: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• ඳාවැල් / Schools• බැාංකු / Banks• ගුලන් නතොටුඳ / Air Ports• දුරකථන වමාගම් / Telecommunication

Companies• දුම්රිය ගමනාගමනය / Railways• ලයාඳාරික ව්ථාන / Business Environment• මාධය ආයතන / Media Companies• නරෝශල් / Hospitals

4

දත්ත වමුදායන් භාවිතා ලන අලව්ථා

Where is database used mostly

Page 5: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• පුද්ගයන් අතර දත්ත නබදාගැනීම වශ හුලමාරු කරගත ශැකිවීම.

• Sharing of data among multiple users.• අලවර නනොමැතිල දත්ත ශැසිරවීම ඳානය කෂ ශැකිවීම.

• Restricting unauthorized access to data.• අලය විටක දත්ත අතරින් නිලැරදි නතොරතුරු

නවොයාගැනීම ඳශසුවීම.

• Providing Storage Structures for efficient QueryProcessing.

5

දත්ත වමුදායන් භාවිතනේ ලාසි

Advantages of Databases

Page 6: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• දත්ත උඳව්ථ කරගැනීනම් ඳශසුකම.

• Providing backup and recovery services.

• දත්ත අතර ඳලතින වාංකීර්ණ වම්බන්ධතා ශඳුනාගත ශැකිවීම.

• Representing complex relationships among data.• දත්ත වමුදාය ඳද්ධති භාවිතා කරන විවිධ පුද්ගයන්ට

විවිධ අතුරු මුහුණත් වඳයා දිය ශැකි වීම.

• Providing multiple interfaces to different classes of users.

6

දත්ත සමුදායන් භාවිතයේ ලාසි

Advantages of Databases

Page 7: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• වම්ප්‍රදායික දත්ත වමුදාය ඳද්ධති (Traditional Database)

• බහුමාධය දත්ත වමුදාය ඳද්ධති (Multimedia Database)

• භූනගෝලීය දත්ත වමුදාය ඳද්ධති (Geographical Database)

• Data warehouse & Online Transaction Processing Systems.

• Real Time Databases.

7

දත්ත වමුදාය ඳද්ධති ලර්ග

Types of Database System

Page 8: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• ඳෂමු යුගය (1st Generation)– ඳැතලි නගොනු ආකෘතිය / ඒක නගොනු ඳද්ධතීන් (Flat File Model)– ධූරාලලි ආකෘතිය (Hierarchical Model)– ජා ආකෘතිය (Network Model)

• නදලන යුගය (2nd Generation)– වම්බන්ධක ආකෘතිය (Relational Model)

• නතලන යුගය (3rd Generation)– Object Oriented Model– ලව්තු වම්බන්ධක ආකෘතිය (Object Relational Model)– XML දත්ත වමුදාය ඳද්ධති

8

දත්ත සමුදාය පද්ධති ල විකාණය

Evolution of Databases

Page 9: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• මුල්ම යුගනේ ඳරිගණක ල දත්ත ගබඩා කර තබාගැනීමට නයොදාගත් ක්‍රමයයි. නමහිදී සිදුවූනේ ඳරිගණකනයන් වකව් ක ඳාඨ නගොනුලක සියළුම දත්ත යතුරුලියනය කර තිබීමයි. වෑම නේලියක්ම එක් නරනකෝඩයක් නව වැකිනි. එම නරනකෝඩනේ වශන් කර තිබූ දත්ත එකිනනකට නලන්වූනේ නකොමාලලින් නශෝ හිව් අලකා මගිනි.

• A flat file database is a database that stores data in aplain text file. Each line of the text file holds onerecord, with fields separated by delimiters, such ascommas or tabs.

9

ඳැතලි නගොනු ආකෘතිය / ඒක නගොනු ඳද්ධතීන්

Flat File Model

Page 10: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

10

නමහිදී වම්පූර්ණ දත්ත ඳාදකනේ නතොරතුරු එක් ලගුලක ගබඩා කරයි.

පැතලි ය ොනු ආකෘතිය / ඒක ය ොනු පද්ධතීන්

Flat File Model

Page 11: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• සියළුම දත්ත එක් ලගුලක තැම්ඳත් කිරීම.– All records are store in one place.

• ඳශසුනලන් අලනබෝධ කරගත ශැකිවීම.– Easy to understand.

• දත්ත අනුපිළිනලකට වැකසීම වශ බාගැනීම ඳශසුවීම.– Simple sorting & filtering can be carried out.

11

පැතලි ය ොනු ආකෘතියේ ලාසිAdvantages of Flat File Model

Page 12: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• එකම දත්තය නැලත නැලත ලියවීමට ඇති ශැකියාල– Potential Duplicate

• යාලත්කාලීන කිරීම අඳශසු වීම.– Harder to update

• ඇතුත් කර ඇති දත්ත ල ලර්ගය නලනව් කිරීම අඳශසු වීම.– Harder to change data format

• දත්ත නවොයාගැනීනම් අඳශසුතා.– Poor at complex queries

12

පැතලි ය ොනු ආකෘතියේ අලාසිDisadvantages of Flat File Model

Page 13: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• A hierarchical database model is a data model in

which the data is organized into a tree -like structure.

The structure allows representing information using

parent/child relationships: each parent can have many

children, but each child has only one parent (also

known as a 1-to-many relationship). All attributes of a

specific record are listed under an entity type.

13

ධූරාලලි ආකෘතිය Hierarchical Model

Page 14: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• ගවක ලූශයක ආකාරයට පිළිනය වූ දත්ත වමුදාය ආකෘතියකි. නමම

ලූශනේදී නදමාපිය - දරු වම්බන්ධතා ආකාරයට දත්ත ශා නතොරතුරු

එකිනනකට වම්බන්ධ නේ.

• නමහි ඳාදය නව තනි ලගුලක් ක්‍රියාකරයි. අනිකුත් ලගු එහි අතු ාඛා නව ක්‍රියාකරයි.

• නදමාපිය - දරු වම්බන්ධතාලයට අනුක වම්බන්ධයක් ඳලතී. එනම් එක් දරුලකුට එක් නදමේපිනයකු සිටින අතර නදමේපියන්ට දරුලන් කිහිඳනදනනකු සිටිය ශැක.

• නමහිදී ඳශ මට්ටනම් ලගුලක නතොරතුරු බාගැනීනම්දී ඳාදමය ලගුනේ සිට පිළිනලලින් ඳශට යා යුතු නේ.

14

ධූරාලලි ආකෘතිය Hierarchical Model

Page 15: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• ධූරාලලි ආකෘතිනේම උඳ කුකයක් නව ශැඳින්විය ශැකිය.

• එකිනනකට වම්බන්ධ අතු වහිත ගව් රාශියක එකතුලක් නව ද

ශැඳින්විය ශැකිය.

• ඉශත නදමාපිය වම්බන්ධතාලය ට අනුල නමහිදී එක් දරුනලකුට

නදමාපියන් රාශියක් සිටිය ශැක.

• නමලැනි ඳද්ධතියක් ඳලත්ලානගන යාම ශා නඩත්තු කිරීම

ප්‍රානයෝගිකල ඉතා අඳශසු කාර්යයකි.

15

ජා ආකෘතිය

Network Model

Page 16: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

16

ධූරාලලි ආකෘතිය Hierarchical Model

Page 17: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• A network database model is a database model that allows multiple

records to be linked to the same owner file.

• The multiple linkages which this information allows the network database

model to be very flexible.

• In addition, the relationship that the information has in the network

database model is defined as many-to-many relationship because one

owner file can be linked to many member files and vice versa.

17

ජා ආකෘතිය

Network Model

Page 18: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

18

ජා ආකෘතිය

Network Model

Page 19: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• නමලැනි ආකෘතියක් ශඳුන්ලා දීමට නශේතුවූ කරුණ වූනේ දත්ත ඳද්ධති භාවිතා කරන්නන්ට අලය නතොරතුරු ක්ණිකල ශා නිලැරදිල නතෝරා නේරා දත්ත ඳද්ධතිය තුලින් බාගැනීමයි.

• The purpose of the relational model is to providea declarative method for specifying data and queries: usersdirectly state what information the database contains andwhat information they want from it, and let the databasemanagement system software take care of describing datastructures for storing the data and retrieval procedures foranswering queries.

19

සම්බන්ධක ආකෘතිය

Relational Model

Page 20: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

20

සම්බන්ධක ආකෘතිය

Relational Model

Page 21: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

• නමයද වාමානය වම්බන්ධක ආකෘතියට නබනශවින් වමාන නේ.

• විවත්ෘත වම්බන්ධක ආකෘතිය නවද ශැඳින්නේ.

• නමහිදී දත්ත වමුදාය ඳද්ධති කෂමනාකරණය වශා Python, Java, C++ ලැනි

ලවත්ු නැඹුරු භාාලන් භාවිතා කරයි.

• මුල් ආකෘති ලට ජයගැනීමට නනොශැකි වූ ඳරිගණක ආශ්‍රිත නිර්මාණකරණය

(Computer Aided Drawing), භූනගෝලීය නතොරතුරු ඳද්ධති (Geographic

Information Systems), බහුමාධය ආචයන ඳද්ධති (Multimedia Storage

Systems) ලැනි අාං ජයගැනීමට නමම ක්‍රමනයන් ශැකිවිය.

21

ලස්තු සම්බන්ධක ආකෘතිය

Object Relational Model

Page 22: Database Systems - E-thaksalawa · •A hierarchical database model is a data model in which the data is organized into a tree -like structure. The structure allows representing information

22