
اسکریپت: لیست جداول Graph در یک دیتابیس
نوشته شده توسط:
زهرا فرهنگی
تاریخ انتشار: ۲۵ مهر ۱۳۹۷
آخرین بروزرسانی: 23 دی 1403
زمان مطالعه: 5 دقیقه
مقدمه
همانطور که میدانید در SQL Server 2017 نوع جدیدی از جداول به نام Graph Tableها معرفی شدند که هدف آنها مدل سازی داده بر پایه نظریه گرافها میباشد.
موجودیتها و ارتباطات بین آنها از طریق دو مفهوم Node و Edge پیاده سازی خواهد شد.
توسط دستور زیر میتوان لیست این نوع جداول را در یک دیتابیس بدست آورد
select case when is_node = 1 then 'Node'
when is_edge = 1 then 'Edge'
end table_type,
schema_name(schema_id) as schema_name,
name as table_name
from sys.tables
where is_node = 1 or is_edge = 1
order by is_edge, schema_name, table_name
select case when is_node = 1 then 'Node'
when is_edge = 1 then 'Edge'
end table_type,
schema_name(schema_id) as schema_name,
name as table_name
from sys.tables
where is_node = 1 or is_edge = 1
order by is_edge, schema_name, table_name
select case when is_node = 1 then 'Node' when is_edge = 1 then 'Edge' end table_type, schema_name(schema_id) as schema_name, name as table_name from sys.tables where is_node = 1 or is_edge = 1 order by is_edge, schema_name, table_name
- Table_Type: نوع جدول گراف Node / Edge
- Schema_Name: نام Schema
- Table_Name: نام جدول
یک نمونه از اجرای دستور بالا
برای بدست آوردن اطلاعات بیشتر در مورد اسکریپت های پرکاربرد SQL ، به مقاله زیر مراجعه کنید.
دانلود مقاله
اسکریپت: لیست جداول Graph در یک دیتابیس
فرمت PDF
صفحه
حجم 1 مگابایت
معرفی نویسنده
مقالات
51 مقاله توسط این نویسنده
محصولات
0 دوره توسط این نویسنده
زهرا فرهنگی
کارشناس پایگاه داده، در حال کسب تجربه در زمینههای تحلیل انباره داده، BI، بهینه سازی پایگاههای داده
معرفی محصول
ایمان باقری
آموزش کوئری نویسی در sql server
2.190.000 تومان
مقالات مرتبط
دیدگاه کاربران