MSSQL Server Express: Create a diagram for linked server tables

I am running Microsoft SQL Server Express 64-bit version 14.0.2027.2 (X64) on Windows 10 Pro 10.
I created linked server connection tables from the Microsft Access MDB database in Server Objects / Linked Server on my MSSQL Express. All linked tables seem to work well.

I want to create a database diagram for linked tables. As I am new to MSSQL, I understand that it is possible to create an ER diagram only for the native MSSQL database.

Is there an option to create an ER diagram for linked server tables?
If not (if the diagram is only allowed for native databases / tables), is there a way to link tables directly to a native MSSQL database and then create a diagram for tables?

SQL Server 2017 – The linked MS Access table shows short text instead of the decimal data type

I linked tables in MS Access databases (various versions, 2007-2019) that are connected to SQL Server 2017 via SQL Server 2017 drivers (e.g. msodbcsql_17.2.0.1_x64). Fields of the Decimal (38.20) data type in SQL Server are displayed as short text in the linked tables.

According to the documentation, the data types are directly comparable.

Why could this come through as a different data type?

Put data in the middle of a linked list

In https://www.youtube.com/watch?v=0xoYNbVTiSE at around 5:54 (the code is always visible anyway)

We can use it

while(p!=insertposition)
{p=p->next}
new_node->next=p->next;
p->next=new_node;

Insert an element in the video instead of what is being done?

Where p is the data that goes through the list and new_node is what you want to insert.

C Implementation of a simply linked list

I am a beginner in C and am looking for feedback on my implementation of a simply linked list. The code is split between list.c and list.h.

list.h::

#ifndef LIST
#define LIST
#include 

typedef struct List {
    int val;
    struct List* next;
} List;
int list_len(List* head);
void list_insert(List* head, int val, int index);
void list_insert_end(List* head, int val);
void list_insert_all(List* head, int* vals, size_t size);
List* array_to_list(int* vals, size_t size);
int list_get(List* head, int index);
void list_set(List* head, int val, int index);
void list_remove(List* head, int index);
int list_indexof(List* head, int val);
int list_rindexof(List* head, int val);
void free_list(List* head);
void print_list(List* head);
#endif

list.c::

#include "list.h"

#include 
#include 
#include 
#include 

int list_len(List* head) {
    assert(head != NULL && "Empty List");
    List* curr = head;
    int i = 1;
    while (curr->next) {
        curr = curr->next;
        i++;
    }
    return i;
}
void list_insert_end(List* head, int val) {
    assert(head != NULL && "Empty List");
    List* item = malloc(sizeof(List));
    item->val = val;
    item->next = NULL;
    List* curr = head;
    while (curr->next) {
        curr = curr->next;
    }
    curr->next = item;
}
void list_insert(List* head, int val, int index) {
    assert(head != NULL && "Empty List");
    List* item = malloc(sizeof(List));
    item->val = val;
    if (index == 0) {
        item->next = head;
        head = item;
        return;
    }
    List* prev;
    List* curr = head;
    for (int i = 0; i < index; i++) {
        prev = head;
        assert(!curr->next && "Index Out of Bounds");
        curr = curr->next;
    }
    prev->next = item;
    item->next = curr;
    return;
}
void list_insert_all(List* head, int* vals, size_t size) {
    assert(head != NULL && "Empty List");
    for (size_t i = 0; i < size; i++) {
        list_insert_end(head, vals(i));
    }
}
List* array_to_list(int* vals, size_t size) {
    List* list = malloc(sizeof(List));
    list->val = vals(0);
    list->next = NULL;
    list_insert_all(list, vals + 1, size - 1);
    return list;
}
int list_get(List* head, int index) {
    assert(head != NULL && "Empty List");
    List* curr = head;
    for (int i = 0; i < index; i++) {
        assert((curr->next) != 0 && "Index Out of Bounds");
        curr = curr->next;
    }
    printf("%i", curr->val);
    return curr->val;
}
void list_set(List* head, int val, int index) {
    assert(head != NULL && "Empty List");
    List* curr = head;
    for (int i = 0; i < index; i++) {
        assert((curr->next) != 0 && "Index Out of Bounds");
        curr = curr->next;
    }
    curr->val = val;
}
void list_remove(List* head, int index) {
    assert(head != NULL && "Empty List");
    List* curr = head;

    if (index == 0) {
        head = head->next;
        free(curr);
        return;
    }
    for (int i = 0; i < index - 1; i++) {
        assert((curr->next) != 0 && "Index Out of Bounds");
        curr = curr->next;
    }
    List* next = curr->next->next;
    free(curr->next);
    curr->next = next;
}
int list_indexof(List* head, int val) {
    assert(head != NULL && "Empty List");
    List* curr = head;
    int i = 0;
    while (curr->next) {
        if (curr->val == val) {
            return i;
        }
        i++;
        curr = curr->next;
    }
    return -1;
}
int list_rindexof(List* head, int val) {
    assert(head != NULL && "Empty List");
    List* curr = head;
    int i = 0, j = -1;
    while (curr->next) {
        if (curr->val == val) {
            j = i;
        }
        i++;
        curr = curr->next;
    }
    return j;
}
void free_list(List* head) {
    assert(head != NULL && "Empty List");
    List* curr = head;
    List* next;
    while (curr->next) {
        next = curr->next;
        free(curr);
        curr = next;
    }
    head = NULL;
}
void print_list(List* head) {
    assert(head != NULL && "Empty List");
    List* curr = head;
    fputs("(", stdout);
    printf("%i", curr->val);
    while (curr->next) {
        curr = curr->next;
        printf(", %i", curr->val);
    }
    fputs(")", stdout);
}
int main() {
    List list = *array_to_list((int()){1, 2, 3, 4}, 4);
    list_insert_all(&list, (int()){1, 2, 3, 4}, 4);
    list_set(&list, 10, 2);
    print_list(&list);
    list_remove(&list, 7);
    print_list(&list);
    printf("%i ", list_get(&list, 3));
    printf("%i", list_len(&list));
    printf(" %i", list_rindexof(&list, 1));
}
```

c – What is more efficient: generating a binary search tree or a linked list from random (ish) data?

Given the fact that I have a data batch (of unknown size) with 16-bit information, what is the most efficient way to put that information into a sorted list (rebuild an index)? My intuition says an unbalanced binary tree because the insert (on average) should be faster than a linked list and the conversion to an actual array should be about the same.

However, the number of indications is likely to be small, since they each represent a certain "thing" that is important to users and the human brain tends to forget about 10 or 100 "things". And yes, this question is largely academic, as users are unlikely to notice a significant performance difference. This is also implemented on an embedded micro, so the code size and memory requirements are relevant.

object oriented – can someone teach me how to use linked lists with classes in C ++?

Here is my sample program that I cannot run 🙁
I've changed the structure in class, but most of them I don't know how to convert to oop.

#include 
#include 
#include 
#include 
#include 
using namespace std;


class stdata
{

    public:
        string rstudn, rname, rage, rpass, usname, passf;

    private:
    sdata * next;
    sdata *head = NULL;
    sdata *tail = NULL;
};



stdata *sdata = NULL;

    string  studnu,  uname, pass2, pass, studno, pass1, nname, nage;
    int choice1,  choice2,   ask, choice3;
    char ans, ans2;

    void facmenu();
    void studmenu();
    void newstudreg();
    void slogin();
    void studlog();
    void faclog();
    void secret();
    void studata();

int main()
{    
    system("cls");
    cout<<"nn";
    cout<<"Choose Option:n";
    cout<<"(1) - Studentn";
    cout<<"(2) - Facilityn";
    cin>>choice1;

    switch(choice1)
    {
        case 1:
        studlog();
        break;

        case 2:
        faclog();
        break;

    }
return 0;
}

        void studlog()
        {
            system("cls");
            cout<<"nnYou've chosen Student.n";
            cout<<"-------------------------nn";

            cout<<"Are you registered already?n";
            cout<<"nPress 'Y' if registered nPress'N' if not yet registered.n";
            cin>>ans2;

            switch(ans2)
            {
            case 'N':
            case 'n':
            newstudreg();
            break;

            case 'Y':
            case 'y':   
            slogin();
            break;  

            case 'X':
            case 'x':
            //view kung sino nagregister
            secret();
            }
        }


            void slogin()
            {
            system("cls");
            cout<<"Enter Student Number: ";
            cin>>studnu;
            cin.ignore();
            while(studnu!=sdata->rstudn)
            {
                system("cls");
                cout<<"nnStudent Number not registered.n";
                cout<<"Please try again.nn";
                system("pause");

                cout<<"Enter Student Number: ";
                cin>>studnu;
                cin.ignore();
            }

            cout<<"nnEnter password: ";           
            cin>>pass;
            cin.ignore();
            while(pass!=sdata->rpass)
            {       
            cout<<"nnPassword Incorrect!n";
            cout<<"Please try again.n";
            system("pause");

            cout<<"nnEnter password: ";           
            cin>>pass;
            cin.ignore();   
            }
            cout<<"nLog In Successful!n";
            system("pause");
            studmenu();

            }


            void faclog()
            {
            system("cls");
            cout<<"n";
            cout<<"You've chosen Facultyn";
            cout<<"-----------------------nn";
            cout<<"Enter Username: ";
            cin>>uname;
            cin.ignore();
            if(uname==sdata->usname)
            {
                cout<<"nEnter Password: ";
                cin>>pass2;
                cin.ignore();   
                if(pass2==sdata->passf)
                {
                    cout<<"nnLog in Successful!nn";
                    system("pause");
                    facmenu();
                }       
            }
            }


    void studmenu()
    {
    system("cls");
    cout<<"====================================n";
    cout<<"Welcome to Student Clinic Info Page:n";
    cout<<"------------------------------------nn";
    cout<<"Choose an option below: n";
    cout<<"(1) - Fill-up Student Info Sheetn";
    cout<<"(2) - View Student Info Sheetn";
    cout<<"(3) - FAQsn";
    cout<<"(4) - Log Outn";

    cin>>choice2;

    switch(choice2)
    {
        case 1:
        system("cls");
        studata();  
        break;


        case 2:
        system("cls");
        char sagot; 

        sdata = head;

        cout<<"View Student Info Sheetn";
        cout<<"-------------------------nn";

        if(sdata == NULL)
        {
        cout<<"Haven't Filled up yet!n";
        cout<<"Fill Up Now?n";
        cin>>sagot;
            if(sagot=='Y' || 'y')
            {
                studata();
            }
            if(sagot=='N' || 'n')
            {
                studmenu();
            }
        }

        while (sdata != NULL) 
        {
        cout<<"Name: "<rname<rage< next;
        }
            system("pause");
            studmenu();
            break;

        case 3:
            system("cls");
            cout<<"n           FAQSn";
            cout<<"--------------------------------n";
            cout<<"HELLO WALA PA!";
            system("pause");
            studmenu();
            break;      

        case 4:
            cout<<"Go back to Main Menu?n";
            cout<<" Press 'Y' to proceed 'N' if non";
            cin>>ans;
            //may problema pa
            if(ans='Y' || 'y')
            {
            main();
            }
            if(ans='N' || 'n')
            {
            exit(0);
            }

    }

    }

 void facmenu()
 {
    system("cls");

    cout<<"================================================n";
    cout<<"      Welcome to Faculty Clinic Data Centern";
    cout<<"------------------------------------------------nn";
    cout<<"(1) - View all Student Infon";
    cout<<"(2) - Search for student Infon";
    cout<<"(3) - Exit";
    cin>>choice3;

    switch(choice3)
    {
        case 1:
            system("cls");
            cout<<"n    Student Data Sheetn";
            cout<<"---------------------------------";
            cout<<"Name: "<rname<rage<>studno;
    //cin.ignore();

    cout<<"Create a password: ";
    cin>>pass1;
    //cin.ignore();

    while(pass1.size()<6)
    {
        cout<<"6 characters the leastn";
        cout<<"Create a password: ";
        cin>>pass1;
    }
    if(pass1.size()>=6)
    {
        cout<<"nAccount Registered!n";
    }

    sdata->rpass=pass1;
    sdata->rstudn=studno;
    sdata -> next = NULL;

    if(head == NULL) {
        head = tail = sdata;
    } else {
        tail->next = sdata;
        tail = sdata;
    }

    system("pause");
    studmenu();
 }

 void secret()
 {  

 system("cls");
 int counter = 1;

 cout << "Log In Recordsn";
 cout << "--------------------------nn";

    sdata = head;


    if(sdata == NULL)
        cout<<"No accounts registered.n";


 while (sdata != NULL) 
 {
    cout <<"Account Number "<rstudn<rpass< next;
}

 system("pause");
    main();
 }


void studata()
{

    sdata = new stdata;

            cout<<"Please Input all the necessary details below:n";
            cout<<"------------------------------------------------nn";
            cout<<"Name: ";
            cin>>nname;
            cout<<"nAge: ";
            cin>>nage;

            sdata->rname=nname;
            sdata->rage=nage;

            sdata -> next = NULL;

            if(head == NULL) 
            {
            head = tail = sdata;
            } 
            else 
            {
            tail->next = sdata;
            tail = sdata;
            }

            system("pause");
            studmenu();
}
```