- Type
- Handout
- Course
- CS712 Distributed DBMS
- Size
- PDF 4 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 2, 3, 4 of 192. Download the file for all 192 pages.
In previous lecture:
- Fragmentation
In this lecture:
- Reasons for Fragmentation o Maximizes local access o Reduces table size, etc.
- PHF using the SQL Server on same machine
- Implemented PHF in a Banking Environment
Fragmentation We know there are different types, we start with the simplest one and that is the PHF Supposedly, you have already gone through the design phase and have got the predicates to be used as basis for PHF, just as a reminder From the user queries, we first collect the simple predicates and then we form a complete and minimal set of minterm predicates, a minterm predicate is ….., you know that otherwise refer back to lecture 16, 17 Lets say we go back to our Bank example, and lets say we have decided to place our servers at QTA and PESH so we have two servers where we are going to place our PHFs As before we register our servers and now at our Enterprise Manager we can see two instances of SS At each of the three sites we define one database named BANK and also one relation, normal base table, however, for the fragmentations to be disjoint (a correctness requirement) we place a check on each table at three sites, how…. We name our fragments/local tables as custQTA, custPESH Each table is defined as
create table custPESH(custId char(6), custName varchar(25), custBal number(10,2), custArea char(5)) In the same way we create 2 tables one at each of our two sites, meant for containing the local users Users that fall in that area and the value of the attribute custArea is going to be the area where a customer’s branch is, so its domain is {pesh, qta) To ensure the disjointness and also to ensure the proper functioning of the system, we apply a check on the tables The check is Peshawar customers are allocated from the range C00001 to C50000, likewise QTA is C50001 to C99999 So we apply the check on both tables/fragments accordingly, although they can be applied while creating the table, we can also apply them later, like Alter table custPesh add constraint chkPsh check ((custId between ‘C00001’ and ‘C50000’) and (custArea = ‘Pesh’)) Alter table custQTA add constraint chkQta check ((custId between ‘C50001’ and ‘C99999’) and (custArea = ‘Qta’)) Tables have been created on local sites and are ready to be populated, start running applications on them, and data enters the table, and the checks ensure the entry of proper data in each table. Now, the tables are being populated Example Data in PESH
C0001 Gul Khan 4593.33 Pesh
C0002 Ali Khan 45322.1 Pesh
C0003 Gul Bibi 6544.54 Pesh
C0005 Jan Khan 9849.44 Pesh
Example Data at QTA C50001 Suhail Gujjar 3593.33 Qta
C50002 Kauser Perveen 3322.1 Qta
C50003 Arif Jat 16544.5 Qta
C50004 Amjad Gul 8889.44 Qta
Next thing is to create a global view for the global access/queries, for this we have to link the servers with each other, this is required You have already registered both the servers, now to link them You can link them using Enterprise Manager or alternatively through SQL, we do here using SQL
Connect Pesh using Query Analyzer Then execute the stored procedure sp_addlinkedserver The syntax is
sp_addlinkedserver
provider = 'sqloledb', datasrc = ‘mysystem\QTA‘
You will get two messages, if successful, like ‘1 row added’ and ‘1 row added’ You have introduced QTA as a linked server with PESH. We have to perform this operation on the other server, that is, we have to add linked server PESH at QTA Setup is there, next thing is to create a partitioned view In SQL Server, a partitioned view joins horizontally partitioned data across multiple servers The statement to create the partitioned view is
Related CS712 files
All CS712 files →Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.